/* Copyright 2011 Rex Kerr and the Howard Hughes Medical Institute, all rights reserved */
/* This file is covered by the BSD license with HHMI as the organization */
/* See http://www.opensource.org/licenses/bsd-license.php for licence template text. */
package org.kerrlab.shipvl

package vector {
  import scalar._
  import matrix._
  abstract class GVec2S extends Cloneable {
    def x: Short
    def y: Short
    override def toString = "["+x+", "+y+"]"
    override def hashCode = (y)*16777619 ^ x
    override def equals(any: Any) = any match { case sg2: GVec2S => {x==sg2.x && y==sg2.y }; case ig2: GVec2I => {x==ig2.x && y==ig2.y }; case lg2: GVec2L => {x==lg2.x && y==lg2.y }; case fg2: GVec2F => {x==fg2.x && y==fg2.y }; case dg2: GVec2D => {x==dg2.x && y==dg2.y }; case _ => false }
    override def clone(): GVec2S = new IVec2S(x, y)
    def copy(x0: Short = x, y0: Short = y): GVec2S = new IVec2S(x0, y0)
    def pad(padding: Short = 1): GVec3S = new IVec3S(x, y, padding)
    def toI: GVec2I = new IVec2I((x).toInt, (y).toInt)
    def toL: GVec2L = new IVec2L((x).toLong, (y).toLong)
    def toF: GVec2F = new IVec2F((x).toFloat, (y).toFloat)
    def toD: GVec2D = new IVec2D((x).toDouble, (y).toDouble)
    def imm = new IVec2S(x, y)
    def mut = new MVec2S(x, y)
    def lenSq = x*x + y*y
    def unary_-() = new IVec2S((-x).toShort, (-y).toShort)
    def cw = new IVec2S(y, (-x).toShort)
    def ccw = new IVec2S((-y).toShort, x)
    def +(x0: Short) = new IVec2S((x + x0).toShort, (y + x0).toShort)
    def +(x0: Int) = new IVec2I((x).toInt + x0, (y).toInt + x0)
    def +(x0: Long) = new IVec2L((x).toLong + x0, (y).toLong + x0)
    def +(x0: Float) = new IVec2F((x).toFloat + x0, (y).toFloat + x0)
    def +(x0: Double) = new IVec2D((x).toDouble + x0, (y).toDouble + x0)
    def +(sg2: GVec2S) = new IVec2S((x + sg2.x).toShort, (y + sg2.y).toShort)
    def +(x0: Short, y0: Short) = new IVec2S((x + x0).toShort, (y + y0).toShort)
    def +(ig2: GVec2I) = new IVec2I((x).toInt + ig2.x, (y).toInt + ig2.y)
    def +(lg2: GVec2L) = new IVec2L((x).toLong + lg2.x, (y).toLong + lg2.y)
    def +(fg2: GVec2F) = new IVec2F((x).toFloat + fg2.x, (y).toFloat + fg2.y)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (y).toDouble + dg2.y)
    def -(x0: Short) = new IVec2S((x - x0).toShort, (y - x0).toShort)
    def -(x0: Int) = new IVec2I((x).toInt - x0, (y).toInt - x0)
    def -(x0: Long) = new IVec2L((x).toLong - x0, (y).toLong - x0)
    def -(x0: Float) = new IVec2F((x).toFloat - x0, (y).toFloat - x0)
    def -(x0: Double) = new IVec2D((x).toDouble - x0, (y).toDouble - x0)
    def -(sg2: GVec2S) = new IVec2S((x - sg2.x).toShort, (y - sg2.y).toShort)
    def -(x0: Short, y0: Short) = new IVec2S((x - x0).toShort, (y - y0).toShort)
    def -(ig2: GVec2I) = new IVec2I((x).toInt - ig2.x, (y).toInt - ig2.y)
    def -(lg2: GVec2L) = new IVec2L((x).toLong - lg2.x, (y).toLong - lg2.y)
    def -(fg2: GVec2F) = new IVec2F((x).toFloat - fg2.x, (y).toFloat - fg2.y)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (y).toDouble - dg2.y)
    def *(x0: Short) = new IVec2S((x * x0).toShort, (y * x0).toShort)
    def *(x0: Int) = new IVec2I((x).toInt * x0, (y).toInt * x0)
    def *(x0: Long) = new IVec2L((x).toLong * x0, (y).toLong * x0)
    def *(x0: Float) = new IVec2F((x).toFloat * x0, (y).toFloat * x0)
    def *(x0: Double) = new IVec2D((x).toDouble * x0, (y).toDouble * x0)
    def *(sg2: GVec2S) = new IVec2S((x * sg2.x).toShort, (y * sg2.y).toShort)
    def *(x0: Short, y0: Short) = new IVec2S((x * x0).toShort, (y * y0).toShort)
    def *(ig2: GVec2I) = new IVec2I((x).toInt * ig2.x, (y).toInt * ig2.y)
    def *(lg2: GVec2L) = new IVec2L((x).toLong * lg2.x, (y).toLong * lg2.y)
    def *(fg2: GVec2F) = new IVec2F((x).toFloat * fg2.x, (y).toFloat * fg2.y)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (y).toDouble * dg2.y)
    def /(x0: Short) = new IVec2S((x / x0).toShort, (y / x0).toShort)
    def /(x0: Int) = new IVec2I((x).toInt / x0, (y).toInt / x0)
    def /(x0: Long) = new IVec2L((x).toLong / x0, (y).toLong / x0)
    def /(x0: Float) = new IVec2F((x).toFloat / x0, (y).toFloat / x0)
    def /(x0: Double) = new IVec2D((x).toDouble / x0, (y).toDouble / x0)
    def /(sg2: GVec2S) = new IVec2S((x / sg2.x).toShort, (y / sg2.y).toShort)
    def /(x0: Short, y0: Short) = new IVec2S((x / x0).toShort, (y / y0).toShort)
    def /(ig2: GVec2I) = new IVec2I((x).toInt / ig2.x, (y).toInt / ig2.y)
    def /(lg2: GVec2L) = new IVec2L((x).toLong / lg2.x, (y).toLong / lg2.y)
    def /(fg2: GVec2F) = new IVec2F((x).toFloat / fg2.x, (y).toFloat / fg2.y)
    def /(dg2: GVec2D) = new IVec2D((x).toDouble / dg2.x, (y).toDouble / dg2.y)
    def max(x0: Short) = new IVec2S((math.max(x,x0)).toShort, (math.max(y,x0)).toShort)
    def max(x0: Int) = new IVec2I(math.max((x).toInt,x0), math.max((y).toInt,x0))
    def max(x0: Long) = new IVec2L(math.max((x).toLong,x0), math.max((y).toLong,x0))
    def max(x0: Float) = new IVec2F(math.max((x).toFloat,x0), math.max((y).toFloat,x0))
    def max(x0: Double) = new IVec2D(math.max((x).toDouble,x0), math.max((y).toDouble,x0))
    def max(sg2: GVec2S) = new IVec2S((math.max(x,sg2.x)).toShort, (math.max(y,sg2.y)).toShort)
    def max(x0: Short, y0: Short) = new IVec2S((math.max(x,x0)).toShort, (math.max(y,y0)).toShort)
    def max(ig2: GVec2I) = new IVec2I(math.max((x).toInt,ig2.x), math.max((y).toInt,ig2.y))
    def max(lg2: GVec2L) = new IVec2L(math.max((x).toLong,lg2.x), math.max((y).toLong,lg2.y))
    def max(fg2: GVec2F) = new IVec2F(math.max((x).toFloat,fg2.x), math.max((y).toFloat,fg2.y))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((y).toDouble,dg2.y))
    def min(x0: Short) = new IVec2S((math.min(x,x0)).toShort, (math.min(y,x0)).toShort)
    def min(x0: Int) = new IVec2I(math.min((x).toInt,x0), math.min((y).toInt,x0))
    def min(x0: Long) = new IVec2L(math.min((x).toLong,x0), math.min((y).toLong,x0))
    def min(x0: Float) = new IVec2F(math.min((x).toFloat,x0), math.min((y).toFloat,x0))
    def min(x0: Double) = new IVec2D(math.min((x).toDouble,x0), math.min((y).toDouble,x0))
    def min(sg2: GVec2S) = new IVec2S((math.min(x,sg2.x)).toShort, (math.min(y,sg2.y)).toShort)
    def min(x0: Short, y0: Short) = new IVec2S((math.min(x,x0)).toShort, (math.min(y,y0)).toShort)
    def min(ig2: GVec2I) = new IVec2I(math.min((x).toInt,ig2.x), math.min((y).toInt,ig2.y))
    def min(lg2: GVec2L) = new IVec2L(math.min((x).toLong,lg2.x), math.min((y).toLong,lg2.y))
    def min(fg2: GVec2F) = new IVec2F(math.min((x).toFloat,fg2.x), math.min((y).toFloat,fg2.y))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((y).toDouble,dg2.y))
    def operate(sg2: GVec2S)(fun: (Short,Short)=>Short) = new IVec2S((fun(x,sg2.x)).toShort, (fun(y,sg2.y)).toShort)
    def operate(ig2: GVec2I)(fun: (Int,Int)=>Int) = new IVec2I(fun((x).toInt,ig2.x), fun((y).toInt,ig2.y))
    def operate(lg2: GVec2L)(fun: (Long,Long)=>Long) = new IVec2L(fun((x).toLong,lg2.x), fun((y).toLong,lg2.y))
    def operate(fg2: GVec2F)(fun: (Float,Float)=>Float) = new IVec2F(fun((x).toFloat,fg2.x), fun((y).toFloat,fg2.y))
    def operate(dg2: GVec2D)(fun: (Double,Double)=>Double) = new IVec2D(fun((x).toDouble,dg2.x), fun((y).toDouble,dg2.y))
    def dot(sg2: GVec2S) = ((x*sg2.x).toShort + (y*sg2.y).toShort).toShort
    def dot(ig2: GVec2I) = (x).toInt*ig2.x + (y).toInt*ig2.y
    def dot(lg2: GVec2L) = (x).toLong*lg2.x + (y).toLong*lg2.y
    def dot(fg2: GVec2F) = (x).toFloat*fg2.x + (y).toFloat*fg2.y
    def dot(dg2: GVec2D) = (x).toDouble*dg2.x + (y).toDouble*dg2.y
    final def **(sg2: GVec2S): Short = this.dot(sg2)
    final def **(ig2: GVec2I): Int = this.dot(ig2)
    final def **(lg2: GVec2L): Long = this.dot(lg2)
    final def **(fg2: GVec2F): Float = this.dot(fg2)
    final def **(dg2: GVec2D): Double = this.dot(dg2)
    def dot(x0: Short, y0: Short) = ((x*x0).toShort + (y*y0).toShort).toShort
    final def **(x0: Short, y0: Short): Short = this.dot(x0, y0)
    final def unitDot(fg2: GVec2F): Float = (this.dot(fg2) / math.sqrt(lenSq * fg2.lenSq)).toFloat
    final def unitDot(dg2: GVec2D): Double = this.dot(dg2) / math.sqrt(lenSq * dg2.lenSq)
    final def *^*(fg2: GVec2F): Float = this.unitDot(fg2)
    final def *^*(dg2: GVec2D): Double = this.unitDot(dg2)
    def outer(sg2: GVec2S) = new IMat2S((x*sg2.x).toShort, (x*sg2.y).toShort, (y*sg2.x).toShort, (y*sg2.y).toShort)
    def outer(ig2: GVec2I) = new IMat2I(x*ig2.x, x*ig2.y, y*ig2.x, y*ig2.y)
    def outer(lg2: GVec2L) = new IMat2L(x*lg2.x, x*lg2.y, y*lg2.x, y*lg2.y)
    def outer(fg2: GVec2F) = new IMat2F(x*fg2.x, x*fg2.y, y*fg2.x, y*fg2.y)
    def outer(dg2: GVec2D) = new IMat2D(x*dg2.x, x*dg2.y, y*dg2.x, y*dg2.y)
    def rotdot(sg2: GVec2S) = ((x*sg2.y).toShort - (y*sg2.x).toShort).toShort
    def rotdot(ig2: GVec2I) = (x).toInt*ig2.y - (y).toInt*ig2.x
    def rotdot(lg2: GVec2L) = (x).toLong*lg2.y - (y).toLong*lg2.x
    def rotdot(fg2: GVec2F) = (x).toFloat*fg2.y - (y).toFloat*fg2.x
    def rotdot(dg2: GVec2D) = (x).toDouble*dg2.y - (y).toDouble*dg2.x
    final def X(sg2: GVec2S): Short = this.rotdot(sg2)
    final def X(ig2: GVec2I): Int = this.rotdot(ig2)
    final def X(lg2: GVec2L): Long = this.rotdot(lg2)
    final def X(fg2: GVec2F): Float = this.rotdot(fg2)
    final def X(dg2: GVec2D): Double = this.rotdot(dg2)
    def rotdot(x0: Short, y0: Short) = ((x*y0).toShort - (y*x0).toShort).toShort
    final def X(x0: Short, y0: Short): Short = this.rotdot(x0, y0)
    def distSq(sg2: GVec2S) = (((x-sg2.x)*(x-sg2.x)).toShort + ((y-sg2.y)*(y-sg2.y)).toShort).toShort
    def distSq(ig2: GVec2I) = ((x).toInt-ig2.x)*((x).toInt-ig2.x) + ((y).toInt-ig2.y)*((y).toInt-ig2.y)
    def distSq(lg2: GVec2L) = ((x).toLong-lg2.x)*((x).toLong-lg2.x) + ((y).toLong-lg2.y)*((y).toLong-lg2.y)
    def distSq(fg2: GVec2F) = ((x).toFloat-fg2.x)*((x).toFloat-fg2.x) + ((y).toFloat-fg2.y)*((y).toFloat-fg2.y)
    def distSq(dg2: GVec2D) = ((x).toDouble-dg2.x)*((x).toDouble-dg2.x) + ((y).toDouble-dg2.y)*((y).toDouble-dg2.y)
    final def dist(sg2: GVec2S): Short = (math.round(math.sqrt(this.distSq(sg2)))).toShort
    final def dist(ig2: GVec2I): Int = (math.round(math.sqrt(this.distSq(ig2)))).toInt
    final def dist(lg2: GVec2L): Long = math.round(math.sqrt(this.distSq(lg2)))
    final def dist(fg2: GVec2F): Float = (math.sqrt(this.distSq(fg2))).toFloat
    final def dist(dg2: GVec2D): Double = math.sqrt(this.distSq(dg2))
    def distSq(x0: Short, y0: Short) = (((x-x0)*(x-x0)).toShort + ((y-y0)*(y-y0)).toShort).toShort
    final def dist(x0: Short, y0: Short): Short = (math.round(math.sqrt(this.distSq(x0, y0)))).toShort
    def ===(sg2: GVec2S) = x==sg2.x && y==sg2.y
    def ===(x0: Short, y0: Short) = x==x0 && y==y0
    def **(sg22: GMat2S) = new IVec2S((x*sg22.xx+y*sg22.yx).toShort, (x*sg22.xy+y*sg22.yy).toShort)
    def **(ig22: GMat2I) = new IVec2I((x).toInt*ig22.xx+(y).toInt*ig22.yx, (x).toInt*ig22.xy+(y).toInt*ig22.yy)
    def **(lg22: GMat2L) = new IVec2L((x).toLong*lg22.xx+(y).toLong*lg22.yx, (x).toLong*lg22.xy+(y).toLong*lg22.yy)
    def **(fg22: GMat2F) = new IVec2F((x).toFloat*fg22.xx+(y).toFloat*fg22.yx, (x).toFloat*fg22.xy+(y).toFloat*fg22.yy)
    def **(dg22: GMat2D) = new IVec2D((x).toDouble*dg22.xx+(y).toDouble*dg22.yx, (x).toDouble*dg22.xy+(y).toDouble*dg22.yy)
  } // class GVec2S

  object GVec2S {
    def apply(x0: Short, y0: Short): GVec2S = new IVec2S(x0, y0)
    def parse(str: String): GVec2S = IVec2S.parse(str)
    val zero: GVec2S = IVec2S.zero
    val xUnit: GVec2S = IVec2S.xUnit
    val yUnit: GVec2S = IVec2S.yUnit
  } // object GVec2S


  abstract class GVec2I extends Cloneable {
    def x: Int
    def y: Int
    override def toString = "["+x+", "+y+"]"
    override def hashCode = (y)*16777619 ^ x
    override def equals(any: Any) = any match { case sg2: GVec2S => {x==sg2.x && y==sg2.y }; case ig2: GVec2I => {x==ig2.x && y==ig2.y }; case lg2: GVec2L => {x==lg2.x && y==lg2.y }; case fg2: GVec2F => {x==fg2.x && y==fg2.y }; case dg2: GVec2D => {x==dg2.x && y==dg2.y }; case _ => false }
    override def clone(): GVec2I = new IVec2I(x, y)
    def toS: GVec2S = new IVec2S((x).toShort, (y).toShort)
    def copy(x0: Int = x, y0: Int = y): GVec2I = new IVec2I(x0, y0)
    def pad(padding: Int = 1): GVec3I = new IVec3I(x, y, padding)
    def mapI(fun: Int => Int) = new IVec2I(fun(x), fun(y))
    def toL: GVec2L = new IVec2L((x).toLong, (y).toLong)
    def mapL(fun: Int => Long) = new IVec2L((fun(x)).toLong, (fun(y)).toLong)
    def toF: GVec2F = new IVec2F((x).toFloat, (y).toFloat)
    def mapF(fun: Int => Float) = new IVec2F((fun(x)).toFloat, (fun(y)).toFloat)
    def toD: GVec2D = new IVec2D((x).toDouble, (y).toDouble)
    def mapD(fun: Int => Double) = new IVec2D((fun(x)).toDouble, (fun(y)).toDouble)
    def imm = new IVec2I(x, y)
    def mut = new MVec2I(x, y)
    def lenSq = x*x + y*y
    def unary_-() = new IVec2I(-x, -y)
    def cw = new IVec2I(y, -x)
    def ccw = new IVec2I(-y, x)
    def +(x0: Int) = new IVec2I(x + x0, y + x0)
    def +(x0: Long) = new IVec2L((x).toLong + x0, (y).toLong + x0)
    def +(x0: Float) = new IVec2F((x).toFloat + x0, (y).toFloat + x0)
    def +(x0: Double) = new IVec2D((x).toDouble + x0, (y).toDouble + x0)
    def +(sg2: GVec2S) = new IVec2I(x + (sg2.x).toInt, y + (sg2.y).toInt)
    def +(ig2: GVec2I) = new IVec2I(x + ig2.x, y + ig2.y)
    def +(x0: Int, y0: Int) = new IVec2I(x + x0, y + y0)
    def +(lg2: GVec2L) = new IVec2L((x).toLong + lg2.x, (y).toLong + lg2.y)
    def +(fg2: GVec2F) = new IVec2F((x).toFloat + fg2.x, (y).toFloat + fg2.y)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (y).toDouble + dg2.y)
    def -(x0: Int) = new IVec2I(x - x0, y - x0)
    def -(x0: Long) = new IVec2L((x).toLong - x0, (y).toLong - x0)
    def -(x0: Float) = new IVec2F((x).toFloat - x0, (y).toFloat - x0)
    def -(x0: Double) = new IVec2D((x).toDouble - x0, (y).toDouble - x0)
    def -(sg2: GVec2S) = new IVec2I(x - (sg2.x).toInt, y - (sg2.y).toInt)
    def -(ig2: GVec2I) = new IVec2I(x - ig2.x, y - ig2.y)
    def -(x0: Int, y0: Int) = new IVec2I(x - x0, y - y0)
    def -(lg2: GVec2L) = new IVec2L((x).toLong - lg2.x, (y).toLong - lg2.y)
    def -(fg2: GVec2F) = new IVec2F((x).toFloat - fg2.x, (y).toFloat - fg2.y)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (y).toDouble - dg2.y)
    def *(x0: Int) = new IVec2I(x * x0, y * x0)
    def *(x0: Long) = new IVec2L((x).toLong * x0, (y).toLong * x0)
    def *(x0: Float) = new IVec2F((x).toFloat * x0, (y).toFloat * x0)
    def *(x0: Double) = new IVec2D((x).toDouble * x0, (y).toDouble * x0)
    def *(sg2: GVec2S) = new IVec2I(x * (sg2.x).toInt, y * (sg2.y).toInt)
    def *(ig2: GVec2I) = new IVec2I(x * ig2.x, y * ig2.y)
    def *(x0: Int, y0: Int) = new IVec2I(x * x0, y * y0)
    def *(lg2: GVec2L) = new IVec2L((x).toLong * lg2.x, (y).toLong * lg2.y)
    def *(fg2: GVec2F) = new IVec2F((x).toFloat * fg2.x, (y).toFloat * fg2.y)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (y).toDouble * dg2.y)
    def /(x0: Int) = new IVec2I(x / x0, y / x0)
    def /(x0: Long) = new IVec2L((x).toLong / x0, (y).toLong / x0)
    def /(x0: Float) = new IVec2F((x).toFloat / x0, (y).toFloat / x0)
    def /(x0: Double) = new IVec2D((x).toDouble / x0, (y).toDouble / x0)
    def /(sg2: GVec2S) = new IVec2I(x / (sg2.x).toInt, y / (sg2.y).toInt)
    def /(ig2: GVec2I) = new IVec2I(x / ig2.x, y / ig2.y)
    def /(x0: Int, y0: Int) = new IVec2I(x / x0, y / y0)
    def /(lg2: GVec2L) = new IVec2L((x).toLong / lg2.x, (y).toLong / lg2.y)
    def /(fg2: GVec2F) = new IVec2F((x).toFloat / fg2.x, (y).toFloat / fg2.y)
    def /(dg2: GVec2D) = new IVec2D((x).toDouble / dg2.x, (y).toDouble / dg2.y)
    def max(x0: Int) = new IVec2I(math.max(x,x0), math.max(y,x0))
    def max(x0: Long) = new IVec2L(math.max((x).toLong,x0), math.max((y).toLong,x0))
    def max(x0: Float) = new IVec2F(math.max((x).toFloat,x0), math.max((y).toFloat,x0))
    def max(x0: Double) = new IVec2D(math.max((x).toDouble,x0), math.max((y).toDouble,x0))
    def max(sg2: GVec2S) = new IVec2I(math.max(x,(sg2.x).toInt), math.max(y,(sg2.y).toInt))
    def max(ig2: GVec2I) = new IVec2I(math.max(x,ig2.x), math.max(y,ig2.y))
    def max(x0: Int, y0: Int) = new IVec2I(math.max(x,x0), math.max(y,y0))
    def max(lg2: GVec2L) = new IVec2L(math.max((x).toLong,lg2.x), math.max((y).toLong,lg2.y))
    def max(fg2: GVec2F) = new IVec2F(math.max((x).toFloat,fg2.x), math.max((y).toFloat,fg2.y))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((y).toDouble,dg2.y))
    def min(x0: Int) = new IVec2I(math.min(x,x0), math.min(y,x0))
    def min(x0: Long) = new IVec2L(math.min((x).toLong,x0), math.min((y).toLong,x0))
    def min(x0: Float) = new IVec2F(math.min((x).toFloat,x0), math.min((y).toFloat,x0))
    def min(x0: Double) = new IVec2D(math.min((x).toDouble,x0), math.min((y).toDouble,x0))
    def min(sg2: GVec2S) = new IVec2I(math.min(x,(sg2.x).toInt), math.min(y,(sg2.y).toInt))
    def min(ig2: GVec2I) = new IVec2I(math.min(x,ig2.x), math.min(y,ig2.y))
    def min(x0: Int, y0: Int) = new IVec2I(math.min(x,x0), math.min(y,y0))
    def min(lg2: GVec2L) = new IVec2L(math.min((x).toLong,lg2.x), math.min((y).toLong,lg2.y))
    def min(fg2: GVec2F) = new IVec2F(math.min((x).toFloat,fg2.x), math.min((y).toFloat,fg2.y))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((y).toDouble,dg2.y))
    def operate(sg2: GVec2S)(fun: (Int,Int)=>Int) = new IVec2I(fun(x,(sg2.x).toInt), fun(y,(sg2.y).toInt))
    def operate(ig2: GVec2I)(fun: (Int,Int)=>Int) = new IVec2I(fun(x,ig2.x), fun(y,ig2.y))
    def operate(lg2: GVec2L)(fun: (Long,Long)=>Long) = new IVec2L(fun((x).toLong,lg2.x), fun((y).toLong,lg2.y))
    def operate(fg2: GVec2F)(fun: (Float,Float)=>Float) = new IVec2F(fun((x).toFloat,fg2.x), fun((y).toFloat,fg2.y))
    def operate(dg2: GVec2D)(fun: (Double,Double)=>Double) = new IVec2D(fun((x).toDouble,dg2.x), fun((y).toDouble,dg2.y))
    def dot(sg2: GVec2S) = x*(sg2.x).toInt + y*(sg2.y).toInt
    def dot(ig2: GVec2I) = x*ig2.x + y*ig2.y
    def dot(lg2: GVec2L) = (x).toLong*lg2.x + (y).toLong*lg2.y
    def dot(fg2: GVec2F) = (x).toFloat*fg2.x + (y).toFloat*fg2.y
    def dot(dg2: GVec2D) = (x).toDouble*dg2.x + (y).toDouble*dg2.y
    final def **(sg2: GVec2S): Int = this.dot(sg2)
    final def **(ig2: GVec2I): Int = this.dot(ig2)
    final def **(lg2: GVec2L): Long = this.dot(lg2)
    final def **(fg2: GVec2F): Float = this.dot(fg2)
    final def **(dg2: GVec2D): Double = this.dot(dg2)
    def dot(x0: Int, y0: Int) = x*x0 + y*y0
    final def **(x0: Int, y0: Int): Int = this.dot(x0, y0)
    final def unitDot(fg2: GVec2F): Float = (this.dot(fg2) / math.sqrt(lenSq * fg2.lenSq)).toFloat
    final def unitDot(dg2: GVec2D): Double = this.dot(dg2) / math.sqrt(lenSq * dg2.lenSq)
    final def *^*(fg2: GVec2F): Float = this.unitDot(fg2)
    final def *^*(dg2: GVec2D): Double = this.unitDot(dg2)
    def fold(zero: Int)(fun: (Int,Int)=>Int) = fun(fun(zero,x),y)
    def fold(zero: Long)(fun: (Long,Int)=>Long) = fun(fun(zero,x),y)
    def fold(zero: Float)(fun: (Float,Int)=>Float) = fun(fun(zero,x),y)
    def fold(zero: Double)(fun: (Double,Int)=>Double) = fun(fun(zero,x),y)
    def reduce(fun: (Int,Int)=>Int) = fun(x,y)
    def outer(sg2: GVec2S) = new IMat2I(x*sg2.x, x*sg2.y, y*sg2.x, y*sg2.y)
    def outer(ig2: GVec2I) = new IMat2I(x*ig2.x, x*ig2.y, y*ig2.x, y*ig2.y)
    def outer(lg2: GVec2L) = new IMat2L(x*lg2.x, x*lg2.y, y*lg2.x, y*lg2.y)
    def outer(fg2: GVec2F) = new IMat2F(x*fg2.x, x*fg2.y, y*fg2.x, y*fg2.y)
    def outer(dg2: GVec2D) = new IMat2D(x*dg2.x, x*dg2.y, y*dg2.x, y*dg2.y)
    def rotdot(sg2: GVec2S) = x*(sg2.y).toInt - y*(sg2.x).toInt
    def rotdot(ig2: GVec2I) = x*ig2.y - y*ig2.x
    def rotdot(lg2: GVec2L) = (x).toLong*lg2.y - (y).toLong*lg2.x
    def rotdot(fg2: GVec2F) = (x).toFloat*fg2.y - (y).toFloat*fg2.x
    def rotdot(dg2: GVec2D) = (x).toDouble*dg2.y - (y).toDouble*dg2.x
    final def X(sg2: GVec2S): Int = this.rotdot(sg2)
    final def X(ig2: GVec2I): Int = this.rotdot(ig2)
    final def X(lg2: GVec2L): Long = this.rotdot(lg2)
    final def X(fg2: GVec2F): Float = this.rotdot(fg2)
    final def X(dg2: GVec2D): Double = this.rotdot(dg2)
    def rotdot(x0: Int, y0: Int) = x*y0 - y*x0
    final def X(x0: Int, y0: Int): Int = this.rotdot(x0, y0)
    def distSq(sg2: GVec2S) = (x-(sg2.x).toInt)*(x-(sg2.x).toInt) + (y-(sg2.y).toInt)*(y-(sg2.y).toInt)
    def distSq(ig2: GVec2I) = (x-ig2.x)*(x-ig2.x) + (y-ig2.y)*(y-ig2.y)
    def distSq(lg2: GVec2L) = ((x).toLong-lg2.x)*((x).toLong-lg2.x) + ((y).toLong-lg2.y)*((y).toLong-lg2.y)
    def distSq(fg2: GVec2F) = ((x).toFloat-fg2.x)*((x).toFloat-fg2.x) + ((y).toFloat-fg2.y)*((y).toFloat-fg2.y)
    def distSq(dg2: GVec2D) = ((x).toDouble-dg2.x)*((x).toDouble-dg2.x) + ((y).toDouble-dg2.y)*((y).toDouble-dg2.y)
    final def dist(sg2: GVec2S): Int = (math.round(math.sqrt(this.distSq(sg2)))).toInt
    final def dist(ig2: GVec2I): Int = (math.round(math.sqrt(this.distSq(ig2)))).toInt
    final def dist(lg2: GVec2L): Long = math.round(math.sqrt(this.distSq(lg2)))
    final def dist(fg2: GVec2F): Float = (math.sqrt(this.distSq(fg2))).toFloat
    final def dist(dg2: GVec2D): Double = math.sqrt(this.distSq(dg2))
    def distSq(x0: Int, y0: Int) = (x-x0)*(x-x0) + (y-y0)*(y-y0)
    final def dist(x0: Int, y0: Int): Int = (math.round(math.sqrt(this.distSq(x0, y0)))).toInt
    def ===(ig2: GVec2I) = x==ig2.x && y==ig2.y
    def ===(x0: Int, y0: Int) = x==x0 && y==y0
    def **(sg22: GMat2S) = new IVec2I(x*(sg22.xx).toInt+y*(sg22.yx).toInt, x*(sg22.xy).toInt+y*(sg22.yy).toInt)
    def **(ig22: GMat2I) = new IVec2I(x*ig22.xx+y*ig22.yx, x*ig22.xy+y*ig22.yy)
    def **(lg22: GMat2L) = new IVec2L((x).toLong*lg22.xx+(y).toLong*lg22.yx, (x).toLong*lg22.xy+(y).toLong*lg22.yy)
    def **(fg22: GMat2F) = new IVec2F((x).toFloat*fg22.xx+(y).toFloat*fg22.yx, (x).toFloat*fg22.xy+(y).toFloat*fg22.yy)
    def **(dg22: GMat2D) = new IVec2D((x).toDouble*dg22.xx+(y).toDouble*dg22.yx, (x).toDouble*dg22.xy+(y).toDouble*dg22.yy)
  } // class GVec2I

  object GVec2I {
    def apply(x0: Int, y0: Int): GVec2I = new IVec2I(x0, y0)
    def parse(str: String): GVec2I = IVec2I.parse(str)
    val zero: GVec2I = IVec2I.zero
    val xUnit: GVec2I = IVec2I.xUnit
    val yUnit: GVec2I = IVec2I.yUnit
  } // object GVec2I


  abstract class GVec2L extends Cloneable {
    def x: Long
    def y: Long
    override def toString = "["+x+", "+y+"]"
    override def hashCode = (y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg2: GVec2S => {x==sg2.x && y==sg2.y }; case ig2: GVec2I => {x==ig2.x && y==ig2.y }; case lg2: GVec2L => {x==lg2.x && y==lg2.y }; case fg2: GVec2F => {x==fg2.x && y==fg2.y }; case dg2: GVec2D => {x==dg2.x && y==dg2.y }; case _ => false }
    override def clone(): GVec2L = new IVec2L(x, y)
    def toS: GVec2S = new IVec2S((x).toShort, (y).toShort)
    def toI: GVec2I = new IVec2I((x).toInt, (y).toInt)
    def mapI(fun: Long => Int) = new IVec2I((fun(x)).toInt, (fun(y)).toInt)
    def copy(x0: Long = x, y0: Long = y): GVec2L = new IVec2L(x0, y0)
    def pad(padding: Long = 1): GVec3L = new IVec3L(x, y, padding)
    def mapL(fun: Long => Long) = new IVec2L(fun(x), fun(y))
    def toF: GVec2F = new IVec2F((x).toFloat, (y).toFloat)
    def mapF(fun: Long => Float) = new IVec2F((fun(x)).toFloat, (fun(y)).toFloat)
    def toD: GVec2D = new IVec2D((x).toDouble, (y).toDouble)
    def mapD(fun: Long => Double) = new IVec2D((fun(x)).toDouble, (fun(y)).toDouble)
    def imm = new IVec2L(x, y)
    def mut = new MVec2L(x, y)
    def lenSq = x*x + y*y
    def unary_-() = new IVec2L(-x, -y)
    def cw = new IVec2L(y, -x)
    def ccw = new IVec2L(-y, x)
    def +(x0: Long) = new IVec2L(x + x0, y + x0)
    def +(x0: Double) = new IVec2D((x).toDouble + x0, (y).toDouble + x0)
    def +(sg2: GVec2S) = new IVec2L(x + (sg2.x).toLong, y + (sg2.y).toLong)
    def +(ig2: GVec2I) = new IVec2L(x + (ig2.x).toLong, y + (ig2.y).toLong)
    def +(lg2: GVec2L) = new IVec2L(x + lg2.x, y + lg2.y)
    def +(x0: Long, y0: Long) = new IVec2L(x + x0, y + y0)
    def +(fg2: GVec2F) = new IVec2D((x).toDouble + (fg2.x).toDouble, (y).toDouble + (fg2.y).toDouble)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (y).toDouble + dg2.y)
    def -(x0: Long) = new IVec2L(x - x0, y - x0)
    def -(x0: Double) = new IVec2D((x).toDouble - x0, (y).toDouble - x0)
    def -(sg2: GVec2S) = new IVec2L(x - (sg2.x).toLong, y - (sg2.y).toLong)
    def -(ig2: GVec2I) = new IVec2L(x - (ig2.x).toLong, y - (ig2.y).toLong)
    def -(lg2: GVec2L) = new IVec2L(x - lg2.x, y - lg2.y)
    def -(x0: Long, y0: Long) = new IVec2L(x - x0, y - y0)
    def -(fg2: GVec2F) = new IVec2D((x).toDouble - (fg2.x).toDouble, (y).toDouble - (fg2.y).toDouble)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (y).toDouble - dg2.y)
    def *(x0: Long) = new IVec2L(x * x0, y * x0)
    def *(x0: Double) = new IVec2D((x).toDouble * x0, (y).toDouble * x0)
    def *(sg2: GVec2S) = new IVec2L(x * (sg2.x).toLong, y * (sg2.y).toLong)
    def *(ig2: GVec2I) = new IVec2L(x * (ig2.x).toLong, y * (ig2.y).toLong)
    def *(lg2: GVec2L) = new IVec2L(x * lg2.x, y * lg2.y)
    def *(x0: Long, y0: Long) = new IVec2L(x * x0, y * y0)
    def *(fg2: GVec2F) = new IVec2D((x).toDouble * (fg2.x).toDouble, (y).toDouble * (fg2.y).toDouble)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (y).toDouble * dg2.y)
    def /(x0: Long) = new IVec2L(x / x0, y / x0)
    def /(x0: Double) = new IVec2D((x).toDouble / x0, (y).toDouble / x0)
    def /(sg2: GVec2S) = new IVec2L(x / (sg2.x).toLong, y / (sg2.y).toLong)
    def /(ig2: GVec2I) = new IVec2L(x / (ig2.x).toLong, y / (ig2.y).toLong)
    def /(lg2: GVec2L) = new IVec2L(x / lg2.x, y / lg2.y)
    def /(x0: Long, y0: Long) = new IVec2L(x / x0, y / y0)
    def /(fg2: GVec2F) = new IVec2D((x).toDouble / (fg2.x).toDouble, (y).toDouble / (fg2.y).toDouble)
    def /(dg2: GVec2D) = new IVec2D((x).toDouble / dg2.x, (y).toDouble / dg2.y)
    def max(x0: Long) = new IVec2L(math.max(x,x0), math.max(y,x0))
    def max(x0: Double) = new IVec2D(math.max((x).toDouble,x0), math.max((y).toDouble,x0))
    def max(sg2: GVec2S) = new IVec2L(math.max(x,(sg2.x).toLong), math.max(y,(sg2.y).toLong))
    def max(ig2: GVec2I) = new IVec2L(math.max(x,(ig2.x).toLong), math.max(y,(ig2.y).toLong))
    def max(lg2: GVec2L) = new IVec2L(math.max(x,lg2.x), math.max(y,lg2.y))
    def max(x0: Long, y0: Long) = new IVec2L(math.max(x,x0), math.max(y,y0))
    def max(fg2: GVec2F) = new IVec2D(math.max((x).toDouble,(fg2.x).toDouble), math.max((y).toDouble,(fg2.y).toDouble))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((y).toDouble,dg2.y))
    def min(x0: Long) = new IVec2L(math.min(x,x0), math.min(y,x0))
    def min(x0: Double) = new IVec2D(math.min((x).toDouble,x0), math.min((y).toDouble,x0))
    def min(sg2: GVec2S) = new IVec2L(math.min(x,(sg2.x).toLong), math.min(y,(sg2.y).toLong))
    def min(ig2: GVec2I) = new IVec2L(math.min(x,(ig2.x).toLong), math.min(y,(ig2.y).toLong))
    def min(lg2: GVec2L) = new IVec2L(math.min(x,lg2.x), math.min(y,lg2.y))
    def min(x0: Long, y0: Long) = new IVec2L(math.min(x,x0), math.min(y,y0))
    def min(fg2: GVec2F) = new IVec2D(math.min((x).toDouble,(fg2.x).toDouble), math.min((y).toDouble,(fg2.y).toDouble))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((y).toDouble,dg2.y))
    def operate(sg2: GVec2S)(fun: (Long,Long)=>Long) = new IVec2L(fun(x,(sg2.x).toLong), fun(y,(sg2.y).toLong))
    def operate(ig2: GVec2I)(fun: (Long,Long)=>Long) = new IVec2L(fun(x,(ig2.x).toLong), fun(y,(ig2.y).toLong))
    def operate(lg2: GVec2L)(fun: (Long,Long)=>Long) = new IVec2L(fun(x,lg2.x), fun(y,lg2.y))
    def operate(fg2: GVec2F)(fun: (Double,Double)=>Double) = new IVec2D(fun((x).toDouble,(fg2.x).toDouble), fun((y).toDouble,(fg2.y).toDouble))
    def operate(dg2: GVec2D)(fun: (Double,Double)=>Double) = new IVec2D(fun((x).toDouble,dg2.x), fun((y).toDouble,dg2.y))
    def dot(sg2: GVec2S) = x*(sg2.x).toLong + y*(sg2.y).toLong
    def dot(ig2: GVec2I) = x*(ig2.x).toLong + y*(ig2.y).toLong
    def dot(lg2: GVec2L) = x*lg2.x + y*lg2.y
    def dot(fg2: GVec2F) = (x).toDouble*(fg2.x).toDouble + (y).toDouble*(fg2.y).toDouble
    def dot(dg2: GVec2D) = (x).toDouble*dg2.x + (y).toDouble*dg2.y
    final def **(sg2: GVec2S): Long = this.dot(sg2)
    final def **(ig2: GVec2I): Long = this.dot(ig2)
    final def **(lg2: GVec2L): Long = this.dot(lg2)
    final def **(fg2: GVec2F): Double = this.dot(fg2)
    final def **(dg2: GVec2D): Double = this.dot(dg2)
    def dot(x0: Long, y0: Long) = x*x0 + y*y0
    final def **(x0: Long, y0: Long): Long = this.dot(x0, y0)
    final def unitDot(fg2: GVec2F): Double = this.dot(fg2) / math.sqrt(lenSq * fg2.lenSq)
    final def unitDot(dg2: GVec2D): Double = this.dot(dg2) / math.sqrt(lenSq * dg2.lenSq)
    final def *^*(fg2: GVec2F): Double = this.unitDot(fg2)
    final def *^*(dg2: GVec2D): Double = this.unitDot(dg2)
    def fold(zero: Int)(fun: (Int,Long)=>Int) = fun(fun(zero,x),y)
    def fold(zero: Long)(fun: (Long,Long)=>Long) = fun(fun(zero,x),y)
    def fold(zero: Float)(fun: (Float,Long)=>Float) = fun(fun(zero,x),y)
    def fold(zero: Double)(fun: (Double,Long)=>Double) = fun(fun(zero,x),y)
    def reduce(fun: (Long,Long)=>Long) = fun(x,y)
    def outer(sg2: GVec2S) = new IMat2L(x*sg2.x, x*sg2.y, y*sg2.x, y*sg2.y)
    def outer(ig2: GVec2I) = new IMat2L(x*ig2.x, x*ig2.y, y*ig2.x, y*ig2.y)
    def outer(lg2: GVec2L) = new IMat2L(x*lg2.x, x*lg2.y, y*lg2.x, y*lg2.y)
    def outer(fg2: GVec2F) = new IMat2D(x*fg2.x, x*fg2.y, y*fg2.x, y*fg2.y)
    def outer(dg2: GVec2D) = new IMat2D(x*dg2.x, x*dg2.y, y*dg2.x, y*dg2.y)
    def rotdot(sg2: GVec2S) = x*(sg2.y).toLong - y*(sg2.x).toLong
    def rotdot(ig2: GVec2I) = x*(ig2.y).toLong - y*(ig2.x).toLong
    def rotdot(lg2: GVec2L) = x*lg2.y - y*lg2.x
    def rotdot(fg2: GVec2F) = (x).toDouble*(fg2.y).toDouble - (y).toDouble*(fg2.x).toDouble
    def rotdot(dg2: GVec2D) = (x).toDouble*dg2.y - (y).toDouble*dg2.x
    final def X(sg2: GVec2S): Long = this.rotdot(sg2)
    final def X(ig2: GVec2I): Long = this.rotdot(ig2)
    final def X(lg2: GVec2L): Long = this.rotdot(lg2)
    final def X(fg2: GVec2F): Double = this.rotdot(fg2)
    final def X(dg2: GVec2D): Double = this.rotdot(dg2)
    def rotdot(x0: Long, y0: Long) = x*y0 - y*x0
    final def X(x0: Long, y0: Long): Long = this.rotdot(x0, y0)
    def distSq(sg2: GVec2S) = (x-(sg2.x).toLong)*(x-(sg2.x).toLong) + (y-(sg2.y).toLong)*(y-(sg2.y).toLong)
    def distSq(ig2: GVec2I) = (x-(ig2.x).toLong)*(x-(ig2.x).toLong) + (y-(ig2.y).toLong)*(y-(ig2.y).toLong)
    def distSq(lg2: GVec2L) = (x-lg2.x)*(x-lg2.x) + (y-lg2.y)*(y-lg2.y)
    def distSq(fg2: GVec2F) = ((x).toDouble-(fg2.x).toDouble)*((x).toDouble-(fg2.x).toDouble) + ((y).toDouble-(fg2.y).toDouble)*((y).toDouble-(fg2.y).toDouble)
    def distSq(dg2: GVec2D) = ((x).toDouble-dg2.x)*((x).toDouble-dg2.x) + ((y).toDouble-dg2.y)*((y).toDouble-dg2.y)
    final def dist(sg2: GVec2S): Long = math.round(math.sqrt(this.distSq(sg2)))
    final def dist(ig2: GVec2I): Long = math.round(math.sqrt(this.distSq(ig2)))
    final def dist(lg2: GVec2L): Long = math.round(math.sqrt(this.distSq(lg2)))
    final def dist(fg2: GVec2F): Double = math.sqrt(this.distSq(fg2))
    final def dist(dg2: GVec2D): Double = math.sqrt(this.distSq(dg2))
    def distSq(x0: Long, y0: Long) = (x-x0)*(x-x0) + (y-y0)*(y-y0)
    final def dist(x0: Long, y0: Long): Long = math.round(math.sqrt(this.distSq(x0, y0)))
    def ===(lg2: GVec2L) = x==lg2.x && y==lg2.y
    def ===(x0: Long, y0: Long) = x==x0 && y==y0
    def **(sg22: GMat2S) = new IVec2L(x*(sg22.xx).toLong+y*(sg22.yx).toLong, x*(sg22.xy).toLong+y*(sg22.yy).toLong)
    def **(ig22: GMat2I) = new IVec2L(x*(ig22.xx).toLong+y*(ig22.yx).toLong, x*(ig22.xy).toLong+y*(ig22.yy).toLong)
    def **(lg22: GMat2L) = new IVec2L(x*lg22.xx+y*lg22.yx, x*lg22.xy+y*lg22.yy)
    def **(fg22: GMat2F) = new IVec2D((x).toDouble*(fg22.xx).toDouble+(y).toDouble*(fg22.yx).toDouble, (x).toDouble*(fg22.xy).toDouble+(y).toDouble*(fg22.yy).toDouble)
    def **(dg22: GMat2D) = new IVec2D((x).toDouble*dg22.xx+(y).toDouble*dg22.yx, (x).toDouble*dg22.xy+(y).toDouble*dg22.yy)
  } // class GVec2L

  object GVec2L {
    def apply(x0: Long, y0: Long): GVec2L = new IVec2L(x0, y0)
    def parse(str: String): GVec2L = IVec2L.parse(str)
    val zero: GVec2L = IVec2L.zero
    val xUnit: GVec2L = IVec2L.xUnit
    val yUnit: GVec2L = IVec2L.yUnit
  } // object GVec2L


  abstract class GVec2F extends Cloneable {
    def x: Float
    def y: Float
    override def toString = "["+x+", "+y+"]"
    override def hashCode = (y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg2: GVec2S => {x==sg2.x && y==sg2.y }; case ig2: GVec2I => {x==ig2.x && y==ig2.y }; case lg2: GVec2L => {x==lg2.x && y==lg2.y }; case fg2: GVec2F => {x==fg2.x && y==fg2.y }; case dg2: GVec2D => {x==dg2.x && y==dg2.y }; case _ => false }
    override def clone(): GVec2F = new IVec2F(x, y)
    def toS: GVec2S = new IVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    def toI: GVec2I = new IVec2I(math.round(x), math.round(y))
    def mapI(fun: Float => Int) = new IVec2I(math.round(fun(x)), math.round(fun(y)))
    def toL: GVec2L = new IVec2L(math.round((x).toDouble), math.round((y).toDouble))
    def mapL(fun: Float => Long) = new IVec2L(math.round((fun(x)).toDouble), math.round((fun(y)).toDouble))
    def copy(x0: Float = x, y0: Float = y): GVec2F = new IVec2F(x0, y0)
    def pad(padding: Float = 1): GVec3F = new IVec3F(x, y, padding)
    def mapF(fun: Float => Float) = new IVec2F(fun(x), fun(y))
    def toD: GVec2D = new IVec2D((x).toDouble, (y).toDouble)
    def mapD(fun: Float => Double) = new IVec2D((fun(x)).toDouble, (fun(y)).toDouble)
    def imm = new IVec2F(x, y)
    def mut = new MVec2F(x, y)
    def lenSq = x*x + y*y
    final def len = (math.sqrt(lenSq)).toFloat
    def theta = (math.atan2(y,x)).toFloat
    def unary_-() = new IVec2F(-x, -y)
    def cw = new IVec2F(y, -x)
    def ccw = new IVec2F(-y, x)
    def norm = { val k0 = 1/this.len; new IVec2F(x*k0, y*k0) }
    def +(x0: Long) = new IVec2D((x).toDouble + (x0).toDouble, (y).toDouble + (x0).toDouble)
    def +(x0: Float) = new IVec2F(x + x0, y + x0)
    def +(x0: Double) = new IVec2D((x).toDouble + x0, (y).toDouble + x0)
    def +(sg2: GVec2S) = new IVec2F(x + (sg2.x).toFloat, y + (sg2.y).toFloat)
    def +(ig2: GVec2I) = new IVec2F(x + (ig2.x).toFloat, y + (ig2.y).toFloat)
    def +(lg2: GVec2L) = new IVec2D((x).toDouble + (lg2.x).toDouble, (y).toDouble + (lg2.y).toDouble)
    def +(fg2: GVec2F) = new IVec2F(x + fg2.x, y + fg2.y)
    def +(x0: Float, y0: Float) = new IVec2F(x + x0, y + y0)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (y).toDouble + dg2.y)
    def -(x0: Long) = new IVec2D((x).toDouble - (x0).toDouble, (y).toDouble - (x0).toDouble)
    def -(x0: Float) = new IVec2F(x - x0, y - x0)
    def -(x0: Double) = new IVec2D((x).toDouble - x0, (y).toDouble - x0)
    def -(sg2: GVec2S) = new IVec2F(x - (sg2.x).toFloat, y - (sg2.y).toFloat)
    def -(ig2: GVec2I) = new IVec2F(x - (ig2.x).toFloat, y - (ig2.y).toFloat)
    def -(lg2: GVec2L) = new IVec2D((x).toDouble - (lg2.x).toDouble, (y).toDouble - (lg2.y).toDouble)
    def -(fg2: GVec2F) = new IVec2F(x - fg2.x, y - fg2.y)
    def -(x0: Float, y0: Float) = new IVec2F(x - x0, y - y0)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (y).toDouble - dg2.y)
    def *(x0: Long) = new IVec2D((x).toDouble * (x0).toDouble, (y).toDouble * (x0).toDouble)
    def *(x0: Float) = new IVec2F(x * x0, y * x0)
    def *(x0: Double) = new IVec2D((x).toDouble * x0, (y).toDouble * x0)
    def *(sg2: GVec2S) = new IVec2F(x * (sg2.x).toFloat, y * (sg2.y).toFloat)
    def *(ig2: GVec2I) = new IVec2F(x * (ig2.x).toFloat, y * (ig2.y).toFloat)
    def *(lg2: GVec2L) = new IVec2D((x).toDouble * (lg2.x).toDouble, (y).toDouble * (lg2.y).toDouble)
    def *(fg2: GVec2F) = new IVec2F(x * fg2.x, y * fg2.y)
    def *(x0: Float, y0: Float) = new IVec2F(x * x0, y * y0)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (y).toDouble * dg2.y)
    def /(x0: Long) = new IVec2D((x).toDouble / (x0).toDouble, (y).toDouble / (x0).toDouble)
    def /(x0: Float) = new IVec2F(x / x0, y / x0)
    def /(x0: Double) = new IVec2D((x).toDouble / x0, (y).toDouble / x0)
    def /(sg2: GVec2S) = new IVec2F(x / (sg2.x).toFloat, y / (sg2.y).toFloat)
    def /(ig2: GVec2I) = new IVec2F(x / (ig2.x).toFloat, y / (ig2.y).toFloat)
    def /(lg2: GVec2L) = new IVec2D((x).toDouble / (lg2.x).toDouble, (y).toDouble / (lg2.y).toDouble)
    def /(fg2: GVec2F) = new IVec2F(x / fg2.x, y / fg2.y)
    def /(x0: Float, y0: Float) = new IVec2F(x / x0, y / y0)
    def /(dg2: GVec2D) = new IVec2D((x).toDouble / dg2.x, (y).toDouble / dg2.y)
    def max(x0: Long) = new IVec2D(math.max((x).toDouble,(x0).toDouble), math.max((y).toDouble,(x0).toDouble))
    def max(x0: Float) = new IVec2F(math.max(x,x0), math.max(y,x0))
    def max(x0: Double) = new IVec2D(math.max((x).toDouble,x0), math.max((y).toDouble,x0))
    def max(sg2: GVec2S) = new IVec2F(math.max(x,(sg2.x).toFloat), math.max(y,(sg2.y).toFloat))
    def max(ig2: GVec2I) = new IVec2F(math.max(x,(ig2.x).toFloat), math.max(y,(ig2.y).toFloat))
    def max(lg2: GVec2L) = new IVec2D(math.max((x).toDouble,(lg2.x).toDouble), math.max((y).toDouble,(lg2.y).toDouble))
    def max(fg2: GVec2F) = new IVec2F(math.max(x,fg2.x), math.max(y,fg2.y))
    def max(x0: Float, y0: Float) = new IVec2F(math.max(x,x0), math.max(y,y0))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((y).toDouble,dg2.y))
    def min(x0: Long) = new IVec2D(math.min((x).toDouble,(x0).toDouble), math.min((y).toDouble,(x0).toDouble))
    def min(x0: Float) = new IVec2F(math.min(x,x0), math.min(y,x0))
    def min(x0: Double) = new IVec2D(math.min((x).toDouble,x0), math.min((y).toDouble,x0))
    def min(sg2: GVec2S) = new IVec2F(math.min(x,(sg2.x).toFloat), math.min(y,(sg2.y).toFloat))
    def min(ig2: GVec2I) = new IVec2F(math.min(x,(ig2.x).toFloat), math.min(y,(ig2.y).toFloat))
    def min(lg2: GVec2L) = new IVec2D(math.min((x).toDouble,(lg2.x).toDouble), math.min((y).toDouble,(lg2.y).toDouble))
    def min(fg2: GVec2F) = new IVec2F(math.min(x,fg2.x), math.min(y,fg2.y))
    def min(x0: Float, y0: Float) = new IVec2F(math.min(x,x0), math.min(y,y0))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((y).toDouble,dg2.y))
    def operate(sg2: GVec2S)(fun: (Float,Float)=>Float) = new IVec2F(fun(x,(sg2.x).toFloat), fun(y,(sg2.y).toFloat))
    def operate(ig2: GVec2I)(fun: (Float,Float)=>Float) = new IVec2F(fun(x,(ig2.x).toFloat), fun(y,(ig2.y).toFloat))
    def operate(lg2: GVec2L)(fun: (Double,Double)=>Double) = new IVec2D(fun((x).toDouble,(lg2.x).toDouble), fun((y).toDouble,(lg2.y).toDouble))
    def operate(fg2: GVec2F)(fun: (Float,Float)=>Float) = new IVec2F(fun(x,fg2.x), fun(y,fg2.y))
    def operate(dg2: GVec2D)(fun: (Double,Double)=>Double) = new IVec2D(fun((x).toDouble,dg2.x), fun((y).toDouble,dg2.y))
    def dot(sg2: GVec2S) = x*(sg2.x).toFloat + y*(sg2.y).toFloat
    def dot(ig2: GVec2I) = x*(ig2.x).toFloat + y*(ig2.y).toFloat
    def dot(lg2: GVec2L) = (x).toDouble*(lg2.x).toDouble + (y).toDouble*(lg2.y).toDouble
    def dot(fg2: GVec2F) = x*fg2.x + y*fg2.y
    def dot(dg2: GVec2D) = (x).toDouble*dg2.x + (y).toDouble*dg2.y
    final def **(sg2: GVec2S): Float = this.dot(sg2)
    final def **(ig2: GVec2I): Float = this.dot(ig2)
    final def **(lg2: GVec2L): Double = this.dot(lg2)
    final def **(fg2: GVec2F): Float = this.dot(fg2)
    final def **(dg2: GVec2D): Double = this.dot(dg2)
    def dot(x0: Float, y0: Float) = x*x0 + y*y0
    final def **(x0: Float, y0: Float): Float = this.dot(x0, y0)
    final def unitDot(sg2: GVec2S): Float = (this.dot(sg2) / math.sqrt(lenSq * sg2.lenSq)).toFloat
    final def unitDot(ig2: GVec2I): Float = (this.dot(ig2) / math.sqrt(lenSq * ig2.lenSq)).toFloat
    final def unitDot(lg2: GVec2L): Double = this.dot(lg2) / math.sqrt(lenSq * lg2.lenSq)
    final def unitDot(fg2: GVec2F): Float = (this.dot(fg2) / math.sqrt(lenSq * fg2.lenSq)).toFloat
    final def unitDot(dg2: GVec2D): Double = this.dot(dg2) / math.sqrt(lenSq * dg2.lenSq)
    final def *^*(sg2: GVec2S): Float = this.unitDot(sg2)
    final def *^*(ig2: GVec2I): Float = this.unitDot(ig2)
    final def *^*(lg2: GVec2L): Double = this.unitDot(lg2)
    final def *^*(fg2: GVec2F): Float = this.unitDot(fg2)
    final def *^*(dg2: GVec2D): Double = this.unitDot(dg2)
    def fold(zero: Int)(fun: (Int,Float)=>Int) = fun(fun(zero,x),y)
    def fold(zero: Long)(fun: (Long,Float)=>Long) = fun(fun(zero,x),y)
    def fold(zero: Float)(fun: (Float,Float)=>Float) = fun(fun(zero,x),y)
    def fold(zero: Double)(fun: (Double,Float)=>Double) = fun(fun(zero,x),y)
    def reduce(fun: (Float,Float)=>Float) = fun(x,y)
    def outer(sg2: GVec2S) = new IMat2F(x*sg2.x, x*sg2.y, y*sg2.x, y*sg2.y)
    def outer(ig2: GVec2I) = new IMat2F(x*ig2.x, x*ig2.y, y*ig2.x, y*ig2.y)
    def outer(lg2: GVec2L) = new IMat2D(x*lg2.x, x*lg2.y, y*lg2.x, y*lg2.y)
    def outer(fg2: GVec2F) = new IMat2F(x*fg2.x, x*fg2.y, y*fg2.x, y*fg2.y)
    def outer(dg2: GVec2D) = new IMat2D(x*dg2.x, x*dg2.y, y*dg2.x, y*dg2.y)
    def rotdot(sg2: GVec2S) = x*(sg2.y).toFloat - y*(sg2.x).toFloat
    def rotdot(ig2: GVec2I) = x*(ig2.y).toFloat - y*(ig2.x).toFloat
    def rotdot(lg2: GVec2L) = (x).toDouble*(lg2.y).toDouble - (y).toDouble*(lg2.x).toDouble
    def rotdot(fg2: GVec2F) = x*fg2.y - y*fg2.x
    def rotdot(dg2: GVec2D) = (x).toDouble*dg2.y - (y).toDouble*dg2.x
    final def X(sg2: GVec2S): Float = this.rotdot(sg2)
    final def X(ig2: GVec2I): Float = this.rotdot(ig2)
    final def X(lg2: GVec2L): Double = this.rotdot(lg2)
    final def X(fg2: GVec2F): Float = this.rotdot(fg2)
    final def X(dg2: GVec2D): Double = this.rotdot(dg2)
    def rotdot(x0: Float, y0: Float) = x*y0 - y*x0
    final def X(x0: Float, y0: Float): Float = this.rotdot(x0, y0)
    def distSq(sg2: GVec2S) = (x-(sg2.x).toFloat)*(x-(sg2.x).toFloat) + (y-(sg2.y).toFloat)*(y-(sg2.y).toFloat)
    def distSq(ig2: GVec2I) = (x-(ig2.x).toFloat)*(x-(ig2.x).toFloat) + (y-(ig2.y).toFloat)*(y-(ig2.y).toFloat)
    def distSq(lg2: GVec2L) = ((x).toDouble-(lg2.x).toDouble)*((x).toDouble-(lg2.x).toDouble) + ((y).toDouble-(lg2.y).toDouble)*((y).toDouble-(lg2.y).toDouble)
    def distSq(fg2: GVec2F) = (x-fg2.x)*(x-fg2.x) + (y-fg2.y)*(y-fg2.y)
    def distSq(dg2: GVec2D) = ((x).toDouble-dg2.x)*((x).toDouble-dg2.x) + ((y).toDouble-dg2.y)*((y).toDouble-dg2.y)
    final def dist(sg2: GVec2S): Float = (math.sqrt(this.distSq(sg2))).toFloat
    final def dist(ig2: GVec2I): Float = (math.sqrt(this.distSq(ig2))).toFloat
    final def dist(lg2: GVec2L): Double = math.sqrt(this.distSq(lg2))
    final def dist(fg2: GVec2F): Float = (math.sqrt(this.distSq(fg2))).toFloat
    final def dist(dg2: GVec2D): Double = math.sqrt(this.distSq(dg2))
    def distSq(x0: Float, y0: Float) = (x-x0)*(x-x0) + (y-y0)*(y-y0)
    final def dist(x0: Float, y0: Float): Float = (math.sqrt(this.distSq(x0, y0))).toFloat
    def ===(fg2: GVec2F) = x==fg2.x && y==fg2.y
    def ===(x0: Float, y0: Float) = x==x0 && y==y0
    def approx(fg2: GVec2F, eps: Float) = ScalarF.close(x,fg2.x,eps) && ScalarF.close(y,fg2.y,eps)
    def approx(dg2: GVec2D, eps: Double) = ScalarD.close(x,dg2.x,eps) && ScalarD.close(y,dg2.y,eps)
    final def =~=(fg2: GVec2F) = approx(fg2, 1e-10f)
    final def =~=(dg2: GVec2D) = approx(dg2, 1e-10)
    def approx(x0: Float, y0: Float, eps: Float) = ScalarF.close(x,x0,eps) && ScalarF.close(y,y0,eps)
    def **(sg22: GMat2S) = new IVec2F(x*(sg22.xx).toFloat+y*(sg22.yx).toFloat, x*(sg22.xy).toFloat+y*(sg22.yy).toFloat)
    def **(ig22: GMat2I) = new IVec2F(x*(ig22.xx).toFloat+y*(ig22.yx).toFloat, x*(ig22.xy).toFloat+y*(ig22.yy).toFloat)
    def **(lg22: GMat2L) = new IVec2D((x).toDouble*(lg22.xx).toDouble+(y).toDouble*(lg22.yx).toDouble, (x).toDouble*(lg22.xy).toDouble+(y).toDouble*(lg22.yy).toDouble)
    def **(fg22: GMat2F) = new IVec2F(x*fg22.xx+y*fg22.yx, x*fg22.xy+y*fg22.yy)
    def **(dg22: GMat2D) = new IVec2D((x).toDouble*dg22.xx+(y).toDouble*dg22.yx, (x).toDouble*dg22.xy+(y).toDouble*dg22.yy)
  } // class GVec2F

  object GVec2F {
    def apply(x0: Float, y0: Float): GVec2F = new IVec2F(x0, y0)
    def parse(str: String): GVec2F = IVec2F.parse(str)
    def polar(r0: Float, theta: Float): GVec2F = new IVec2F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat)
    val zero: GVec2F = IVec2F.zero
    val xUnit: GVec2F = IVec2F.xUnit
    val yUnit: GVec2F = IVec2F.yUnit
  } // object GVec2F


  abstract class GVec2D extends Cloneable {
    def x: Double
    def y: Double
    override def toString = "["+x+", "+y+"]"
    override def hashCode = (y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg2: GVec2S => {x==sg2.x && y==sg2.y }; case ig2: GVec2I => {x==ig2.x && y==ig2.y }; case lg2: GVec2L => {x==lg2.x && y==lg2.y }; case fg2: GVec2F => {x==fg2.x && y==fg2.y }; case dg2: GVec2D => {x==dg2.x && y==dg2.y }; case _ => false }
    override def clone(): GVec2D = new IVec2D(x, y)
    def toS: GVec2S = new IVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    def toI: GVec2I = new IVec2I((math.round(x)).toInt, (math.round(y)).toInt)
    def mapI(fun: Double => Int) = new IVec2I((math.round(fun(x))).toInt, (math.round(fun(y))).toInt)
    def toL: GVec2L = new IVec2L(math.round(x), math.round(y))
    def mapL(fun: Double => Long) = new IVec2L(math.round(fun(x)), math.round(fun(y)))
    def toF: GVec2F = new IVec2F((x).toFloat, (y).toFloat)
    def mapF(fun: Double => Float) = new IVec2F((fun(x)).toFloat, (fun(y)).toFloat)
    def copy(x0: Double = x, y0: Double = y): GVec2D = new IVec2D(x0, y0)
    def pad(padding: Double = 1): GVec3D = new IVec3D(x, y, padding)
    def mapD(fun: Double => Double) = new IVec2D(fun(x), fun(y))
    def imm = new IVec2D(x, y)
    def mut = new MVec2D(x, y)
    def lenSq = x*x + y*y
    final def len = math.sqrt(lenSq)
    def theta = math.atan2(y,x)
    def unary_-() = new IVec2D(-x, -y)
    def cw = new IVec2D(y, -x)
    def ccw = new IVec2D(-y, x)
    def norm = { val k0 = 1/this.len; new IVec2D(x*k0, y*k0) }
    def +(x0: Double) = new IVec2D(x + x0, y + x0)
    def +(sg2: GVec2S) = new IVec2D(x + (sg2.x).toDouble, y + (sg2.y).toDouble)
    def +(ig2: GVec2I) = new IVec2D(x + (ig2.x).toDouble, y + (ig2.y).toDouble)
    def +(lg2: GVec2L) = new IVec2D(x + (lg2.x).toDouble, y + (lg2.y).toDouble)
    def +(fg2: GVec2F) = new IVec2D(x + (fg2.x).toDouble, y + (fg2.y).toDouble)
    def +(dg2: GVec2D) = new IVec2D(x + dg2.x, y + dg2.y)
    def +(x0: Double, y0: Double) = new IVec2D(x + x0, y + y0)
    def -(x0: Double) = new IVec2D(x - x0, y - x0)
    def -(sg2: GVec2S) = new IVec2D(x - (sg2.x).toDouble, y - (sg2.y).toDouble)
    def -(ig2: GVec2I) = new IVec2D(x - (ig2.x).toDouble, y - (ig2.y).toDouble)
    def -(lg2: GVec2L) = new IVec2D(x - (lg2.x).toDouble, y - (lg2.y).toDouble)
    def -(fg2: GVec2F) = new IVec2D(x - (fg2.x).toDouble, y - (fg2.y).toDouble)
    def -(dg2: GVec2D) = new IVec2D(x - dg2.x, y - dg2.y)
    def -(x0: Double, y0: Double) = new IVec2D(x - x0, y - y0)
    def *(x0: Double) = new IVec2D(x * x0, y * x0)
    def *(sg2: GVec2S) = new IVec2D(x * (sg2.x).toDouble, y * (sg2.y).toDouble)
    def *(ig2: GVec2I) = new IVec2D(x * (ig2.x).toDouble, y * (ig2.y).toDouble)
    def *(lg2: GVec2L) = new IVec2D(x * (lg2.x).toDouble, y * (lg2.y).toDouble)
    def *(fg2: GVec2F) = new IVec2D(x * (fg2.x).toDouble, y * (fg2.y).toDouble)
    def *(dg2: GVec2D) = new IVec2D(x * dg2.x, y * dg2.y)
    def *(x0: Double, y0: Double) = new IVec2D(x * x0, y * y0)
    def /(x0: Double) = new IVec2D(x / x0, y / x0)
    def /(sg2: GVec2S) = new IVec2D(x / (sg2.x).toDouble, y / (sg2.y).toDouble)
    def /(ig2: GVec2I) = new IVec2D(x / (ig2.x).toDouble, y / (ig2.y).toDouble)
    def /(lg2: GVec2L) = new IVec2D(x / (lg2.x).toDouble, y / (lg2.y).toDouble)
    def /(fg2: GVec2F) = new IVec2D(x / (fg2.x).toDouble, y / (fg2.y).toDouble)
    def /(dg2: GVec2D) = new IVec2D(x / dg2.x, y / dg2.y)
    def /(x0: Double, y0: Double) = new IVec2D(x / x0, y / y0)
    def max(x0: Double) = new IVec2D(math.max(x,x0), math.max(y,x0))
    def max(sg2: GVec2S) = new IVec2D(math.max(x,(sg2.x).toDouble), math.max(y,(sg2.y).toDouble))
    def max(ig2: GVec2I) = new IVec2D(math.max(x,(ig2.x).toDouble), math.max(y,(ig2.y).toDouble))
    def max(lg2: GVec2L) = new IVec2D(math.max(x,(lg2.x).toDouble), math.max(y,(lg2.y).toDouble))
    def max(fg2: GVec2F) = new IVec2D(math.max(x,(fg2.x).toDouble), math.max(y,(fg2.y).toDouble))
    def max(dg2: GVec2D) = new IVec2D(math.max(x,dg2.x), math.max(y,dg2.y))
    def max(x0: Double, y0: Double) = new IVec2D(math.max(x,x0), math.max(y,y0))
    def min(x0: Double) = new IVec2D(math.min(x,x0), math.min(y,x0))
    def min(sg2: GVec2S) = new IVec2D(math.min(x,(sg2.x).toDouble), math.min(y,(sg2.y).toDouble))
    def min(ig2: GVec2I) = new IVec2D(math.min(x,(ig2.x).toDouble), math.min(y,(ig2.y).toDouble))
    def min(lg2: GVec2L) = new IVec2D(math.min(x,(lg2.x).toDouble), math.min(y,(lg2.y).toDouble))
    def min(fg2: GVec2F) = new IVec2D(math.min(x,(fg2.x).toDouble), math.min(y,(fg2.y).toDouble))
    def min(dg2: GVec2D) = new IVec2D(math.min(x,dg2.x), math.min(y,dg2.y))
    def min(x0: Double, y0: Double) = new IVec2D(math.min(x,x0), math.min(y,y0))
    def operate(sg2: GVec2S)(fun: (Double,Double)=>Double) = new IVec2D(fun(x,(sg2.x).toDouble), fun(y,(sg2.y).toDouble))
    def operate(ig2: GVec2I)(fun: (Double,Double)=>Double) = new IVec2D(fun(x,(ig2.x).toDouble), fun(y,(ig2.y).toDouble))
    def operate(lg2: GVec2L)(fun: (Double,Double)=>Double) = new IVec2D(fun(x,(lg2.x).toDouble), fun(y,(lg2.y).toDouble))
    def operate(fg2: GVec2F)(fun: (Double,Double)=>Double) = new IVec2D(fun(x,(fg2.x).toDouble), fun(y,(fg2.y).toDouble))
    def operate(dg2: GVec2D)(fun: (Double,Double)=>Double) = new IVec2D(fun(x,dg2.x), fun(y,dg2.y))
    def dot(sg2: GVec2S) = x*(sg2.x).toDouble + y*(sg2.y).toDouble
    def dot(ig2: GVec2I) = x*(ig2.x).toDouble + y*(ig2.y).toDouble
    def dot(lg2: GVec2L) = x*(lg2.x).toDouble + y*(lg2.y).toDouble
    def dot(fg2: GVec2F) = x*(fg2.x).toDouble + y*(fg2.y).toDouble
    def dot(dg2: GVec2D) = x*dg2.x + y*dg2.y
    final def **(sg2: GVec2S): Double = this.dot(sg2)
    final def **(ig2: GVec2I): Double = this.dot(ig2)
    final def **(lg2: GVec2L): Double = this.dot(lg2)
    final def **(fg2: GVec2F): Double = this.dot(fg2)
    final def **(dg2: GVec2D): Double = this.dot(dg2)
    def dot(x0: Double, y0: Double) = x*x0 + y*y0
    final def **(x0: Double, y0: Double): Double = this.dot(x0, y0)
    final def unitDot(sg2: GVec2S): Double = this.dot(sg2) / math.sqrt(lenSq * sg2.lenSq)
    final def unitDot(ig2: GVec2I): Double = this.dot(ig2) / math.sqrt(lenSq * ig2.lenSq)
    final def unitDot(lg2: GVec2L): Double = this.dot(lg2) / math.sqrt(lenSq * lg2.lenSq)
    final def unitDot(fg2: GVec2F): Double = this.dot(fg2) / math.sqrt(lenSq * fg2.lenSq)
    final def unitDot(dg2: GVec2D): Double = this.dot(dg2) / math.sqrt(lenSq * dg2.lenSq)
    final def *^*(sg2: GVec2S): Double = this.unitDot(sg2)
    final def *^*(ig2: GVec2I): Double = this.unitDot(ig2)
    final def *^*(lg2: GVec2L): Double = this.unitDot(lg2)
    final def *^*(fg2: GVec2F): Double = this.unitDot(fg2)
    final def *^*(dg2: GVec2D): Double = this.unitDot(dg2)
    def fold(zero: Int)(fun: (Int,Double)=>Int) = fun(fun(zero,x),y)
    def fold(zero: Long)(fun: (Long,Double)=>Long) = fun(fun(zero,x),y)
    def fold(zero: Float)(fun: (Float,Double)=>Float) = fun(fun(zero,x),y)
    def fold(zero: Double)(fun: (Double,Double)=>Double) = fun(fun(zero,x),y)
    def reduce(fun: (Double,Double)=>Double) = fun(x,y)
    def outer(sg2: GVec2S) = new IMat2D(x*sg2.x, x*sg2.y, y*sg2.x, y*sg2.y)
    def outer(ig2: GVec2I) = new IMat2D(x*ig2.x, x*ig2.y, y*ig2.x, y*ig2.y)
    def outer(lg2: GVec2L) = new IMat2D(x*lg2.x, x*lg2.y, y*lg2.x, y*lg2.y)
    def outer(fg2: GVec2F) = new IMat2D(x*fg2.x, x*fg2.y, y*fg2.x, y*fg2.y)
    def outer(dg2: GVec2D) = new IMat2D(x*dg2.x, x*dg2.y, y*dg2.x, y*dg2.y)
    def rotdot(sg2: GVec2S) = x*(sg2.y).toDouble - y*(sg2.x).toDouble
    def rotdot(ig2: GVec2I) = x*(ig2.y).toDouble - y*(ig2.x).toDouble
    def rotdot(lg2: GVec2L) = x*(lg2.y).toDouble - y*(lg2.x).toDouble
    def rotdot(fg2: GVec2F) = x*(fg2.y).toDouble - y*(fg2.x).toDouble
    def rotdot(dg2: GVec2D) = x*dg2.y - y*dg2.x
    final def X(sg2: GVec2S): Double = this.rotdot(sg2)
    final def X(ig2: GVec2I): Double = this.rotdot(ig2)
    final def X(lg2: GVec2L): Double = this.rotdot(lg2)
    final def X(fg2: GVec2F): Double = this.rotdot(fg2)
    final def X(dg2: GVec2D): Double = this.rotdot(dg2)
    def rotdot(x0: Double, y0: Double) = x*y0 - y*x0
    final def X(x0: Double, y0: Double): Double = this.rotdot(x0, y0)
    def distSq(sg2: GVec2S) = (x-(sg2.x).toDouble)*(x-(sg2.x).toDouble) + (y-(sg2.y).toDouble)*(y-(sg2.y).toDouble)
    def distSq(ig2: GVec2I) = (x-(ig2.x).toDouble)*(x-(ig2.x).toDouble) + (y-(ig2.y).toDouble)*(y-(ig2.y).toDouble)
    def distSq(lg2: GVec2L) = (x-(lg2.x).toDouble)*(x-(lg2.x).toDouble) + (y-(lg2.y).toDouble)*(y-(lg2.y).toDouble)
    def distSq(fg2: GVec2F) = (x-(fg2.x).toDouble)*(x-(fg2.x).toDouble) + (y-(fg2.y).toDouble)*(y-(fg2.y).toDouble)
    def distSq(dg2: GVec2D) = (x-dg2.x)*(x-dg2.x) + (y-dg2.y)*(y-dg2.y)
    final def dist(sg2: GVec2S): Double = math.sqrt(this.distSq(sg2))
    final def dist(ig2: GVec2I): Double = math.sqrt(this.distSq(ig2))
    final def dist(lg2: GVec2L): Double = math.sqrt(this.distSq(lg2))
    final def dist(fg2: GVec2F): Double = math.sqrt(this.distSq(fg2))
    final def dist(dg2: GVec2D): Double = math.sqrt(this.distSq(dg2))
    def distSq(x0: Double, y0: Double) = (x-x0)*(x-x0) + (y-y0)*(y-y0)
    final def dist(x0: Double, y0: Double): Double = math.sqrt(this.distSq(x0, y0))
    def ===(dg2: GVec2D) = x==dg2.x && y==dg2.y
    def ===(x0: Double, y0: Double) = x==x0 && y==y0
    def approx(fg2: GVec2F, eps: Double) = ScalarD.close(x,(fg2.x).toDouble,eps) && ScalarD.close(y,(fg2.y).toDouble,eps)
    def approx(dg2: GVec2D, eps: Double) = ScalarD.close(x,dg2.x,eps) && ScalarD.close(y,dg2.y,eps)
    final def =~=(fg2: GVec2F) = approx(fg2, 1e-10)
    final def =~=(dg2: GVec2D) = approx(dg2, 1e-20)
    def approx(x0: Double, y0: Double, eps: Double) = ScalarD.close(x,x0,eps) && ScalarD.close(y,y0,eps)
    def **(sg22: GMat2S) = new IVec2D(x*(sg22.xx).toDouble+y*(sg22.yx).toDouble, x*(sg22.xy).toDouble+y*(sg22.yy).toDouble)
    def **(ig22: GMat2I) = new IVec2D(x*(ig22.xx).toDouble+y*(ig22.yx).toDouble, x*(ig22.xy).toDouble+y*(ig22.yy).toDouble)
    def **(lg22: GMat2L) = new IVec2D(x*(lg22.xx).toDouble+y*(lg22.yx).toDouble, x*(lg22.xy).toDouble+y*(lg22.yy).toDouble)
    def **(fg22: GMat2F) = new IVec2D(x*(fg22.xx).toDouble+y*(fg22.yx).toDouble, x*(fg22.xy).toDouble+y*(fg22.yy).toDouble)
    def **(dg22: GMat2D) = new IVec2D(x*dg22.xx+y*dg22.yx, x*dg22.xy+y*dg22.yy)
  } // class GVec2D

  object GVec2D {
    def apply(x0: Double, y0: Double): GVec2D = new IVec2D(x0, y0)
    def parse(str: String): GVec2D = IVec2D.parse(str)
    def polar(r0: Double, theta: Double): GVec2D = new IVec2D(r0 * math.cos(theta), r0 * math.sin(theta))
    val zero: GVec2D = IVec2D.zero
    val xUnit: GVec2D = IVec2D.xUnit
    val yUnit: GVec2D = IVec2D.yUnit
  } // object GVec2D


  final case class IVec2S(val x: Short, val y: Short) extends GVec2S {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec2S = new IVec2S(x, y)
    override def copy(x0: Short = x, y0: Short = y): IVec2S = new IVec2S(x0, y0)
    override def pad(padding: Short = 1): IVec3S = new IVec3S(x, y, padding)
    def vec = this
    override def imm = this
    override def toI: IVec2I = new IVec2I((x).toInt, (y).toInt)
    override def toL: IVec2L = new IVec2L((x).toLong, (y).toLong)
    override def toF: IVec2F = new IVec2F((x).toFloat, (y).toFloat)
    override def toD: IVec2D = new IVec2D((x).toDouble, (y).toDouble)
  } // class IVec2S

  object IVec2S {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec2S = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toShort); new IVec2S(p(0), p(1)) }
    val zero = new IVec2S(0, 0)
    val xUnit = new IVec2S(1, 0)
    val yUnit = new IVec2S(0, 1)
  } // object IVec2S


  final case class IVec2I(val x: Int, val y: Int) extends GVec2I {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec2I = new IVec2I(x, y)
    override def toS: IVec2S = new IVec2S((x).toShort, (y).toShort)
    override def copy(x0: Int = x, y0: Int = y): IVec2I = new IVec2I(x0, y0)
    override def pad(padding: Int = 1): IVec3I = new IVec3I(x, y, padding)
    def vec = this
    override def imm = this
    override def toL: IVec2L = new IVec2L((x).toLong, (y).toLong)
    override def toF: IVec2F = new IVec2F((x).toFloat, (y).toFloat)
    override def toD: IVec2D = new IVec2D((x).toDouble, (y).toDouble)
  } // class IVec2I

  object IVec2I {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec2I = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toInt); new IVec2I(p(0), p(1)) }
    val zero = new IVec2I(0, 0)
    val xUnit = new IVec2I(1, 0)
    val yUnit = new IVec2I(0, 1)
  } // object IVec2I


  final case class IVec2L(val x: Long, val y: Long) extends GVec2L {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec2L = new IVec2L(x, y)
    override def toS: IVec2S = new IVec2S((x).toShort, (y).toShort)
    override def toI: IVec2I = new IVec2I((x).toInt, (y).toInt)
    override def copy(x0: Long = x, y0: Long = y): IVec2L = new IVec2L(x0, y0)
    override def pad(padding: Long = 1): IVec3L = new IVec3L(x, y, padding)
    def vec = this
    override def imm = this
    override def toF: IVec2F = new IVec2F((x).toFloat, (y).toFloat)
    override def toD: IVec2D = new IVec2D((x).toDouble, (y).toDouble)
  } // class IVec2L

  object IVec2L {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec2L = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toLong); new IVec2L(p(0), p(1)) }
    val zero = new IVec2L(0, 0)
    val xUnit = new IVec2L(1, 0)
    val yUnit = new IVec2L(0, 1)
  } // object IVec2L


  final case class IVec2F(val x: Float, val y: Float) extends GVec2F {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec2F = new IVec2F(x, y)
    override def toS: IVec2S = new IVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: IVec2I = new IVec2I(math.round(x), math.round(y))
    override def toL: IVec2L = new IVec2L(math.round((x).toDouble), math.round((y).toDouble))
    override def copy(x0: Float = x, y0: Float = y): IVec2F = new IVec2F(x0, y0)
    override def pad(padding: Float = 1): IVec3F = new IVec3F(x, y, padding)
    def vec = this
    override def imm = this
    override def toD: IVec2D = new IVec2D((x).toDouble, (y).toDouble)
  } // class IVec2F

  object IVec2F {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec2F = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toFloat); new IVec2F(p(0), p(1)) }
    def polar(r0: Float, theta: Float): IVec2F = new IVec2F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat)
    val zero = new IVec2F(0, 0)
    val xUnit = new IVec2F(1, 0)
    val yUnit = new IVec2F(0, 1)
  } // object IVec2F


  final case class IVec2D(val x: Double, val y: Double) extends GVec2D {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec2D = new IVec2D(x, y)
    override def toS: IVec2S = new IVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: IVec2I = new IVec2I((math.round(x)).toInt, (math.round(y)).toInt)
    override def toL: IVec2L = new IVec2L(math.round(x), math.round(y))
    override def toF: IVec2F = new IVec2F((x).toFloat, (y).toFloat)
    override def copy(x0: Double = x, y0: Double = y): IVec2D = new IVec2D(x0, y0)
    override def pad(padding: Double = 1): IVec3D = new IVec3D(x, y, padding)
    def vec = this
    override def imm = this
  } // class IVec2D

  object IVec2D {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec2D = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toDouble); new IVec2D(p(0), p(1)) }
    def polar(r0: Double, theta: Double): IVec2D = new IVec2D(r0 * math.cos(theta), r0 * math.sin(theta))
    val zero = new IVec2D(0, 0)
    val xUnit = new IVec2D(1, 0)
    val yUnit = new IVec2D(0, 1)
  } // object IVec2D


  abstract class AVec2S extends GVec2S {
    def x_=(x0: Short): Unit
    def y_=(y0: Short): Unit
    override def clone(): AVec2S = new MVec2S(x, y)
    override def copy(x0: Short = x, y0: Short = y): AVec2S = new MVec2S(x0, y0)
    override def pad(padding: Short = 1): AVec3S = new MVec3S(x, y, padding)
    override def toI: AVec2I = new MVec2I((x).toInt, (y).toInt)
    override def toL: AVec2L = new MVec2L((x).toLong, (y).toLong)
    override def toF: AVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: AVec2D = new MVec2D((x).toDouble, (y).toDouble)
    def negEq: this.type = { x = (-x).toShort; y = (-y).toShort; this }
    def cwEq: this.type = { val x0 = y; y = (-x).toShort; x = x0; this }
    def ccwEq: this.type = { val x0 = (-y).toShort; y = x; x = x0; this }
    def :~(x0: Short): this.type = { x = x0; y = x0; this }
    def :~~(x0: Int): this.type = { x = (x0).toShort; y = (x0).toShort; this }
    def :~~(x0: Long): this.type = { x = (x0).toShort; y = (x0).toShort; this }
    def :~~(x0: Float): this.type = { x = (math.round(x0)).toShort; y = (math.round(x0)).toShort; this }
    def :~~(x0: Double): this.type = { x = (math.round(x0)).toShort; y = (math.round(x0)).toShort; this }
    def :~(sg2: GVec2S): this.type = { x = sg2.x; y = sg2.y; this }
    def :~(x0: Short, y0: Short): this.type = { x = x0; y = y0; this }
    def :~~(ig2: GVec2I): this.type = { x = (ig2.x).toShort; y = (ig2.y).toShort; this }
    def :~~(lg2: GVec2L): this.type = { x = (lg2.x).toShort; y = (lg2.y).toShort; this }
    def :~~(fg2: GVec2F): this.type = { x = (math.round(fg2.x)).toShort; y = (math.round(fg2.y)).toShort; this }
    def :~~(dg2: GVec2D): this.type = { x = (math.round(dg2.x)).toShort; y = (math.round(dg2.y)).toShort; this }
    def +~(x0: Short): this.type = { x = (x + x0).toShort; y = (y + x0).toShort; this }
    def +~~(x0: Int): this.type = { x = ((x).toInt + x0).toShort; y = ((y).toInt + x0).toShort; this }
    def +~~(x0: Long): this.type = { x = ((x).toLong + x0).toShort; y = ((y).toLong + x0).toShort; this }
    def +~~(x0: Float): this.type = { x = (math.round((x).toFloat + x0)).toShort; y = (math.round((y).toFloat + x0)).toShort; this }
    def +~~(x0: Double): this.type = { x = (math.round((x).toDouble + x0)).toShort; y = (math.round((y).toDouble + x0)).toShort; this }
    def +~(sg2: GVec2S): this.type = { x = (x + sg2.x).toShort; y = (y + sg2.y).toShort; this }
    def +~(x0: Short, y0: Short): this.type = { x = (x + x0).toShort; y = (y + y0).toShort; this }
    def +~~(ig2: GVec2I): this.type = { x = ((x).toInt + ig2.x).toShort; y = ((y).toInt + ig2.y).toShort; this }
    def +~~(lg2: GVec2L): this.type = { x = ((x).toLong + lg2.x).toShort; y = ((y).toLong + lg2.y).toShort; this }
    def +~~(fg2: GVec2F): this.type = { x = (math.round((x).toFloat + fg2.x)).toShort; y = (math.round((y).toFloat + fg2.y)).toShort; this }
    def +~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble + dg2.x)).toShort; y = (math.round((y).toDouble + dg2.y)).toShort; this }
    def -~(x0: Short): this.type = { x = (x - x0).toShort; y = (y - x0).toShort; this }
    def -~~(x0: Int): this.type = { x = ((x).toInt - x0).toShort; y = ((y).toInt - x0).toShort; this }
    def -~~(x0: Long): this.type = { x = ((x).toLong - x0).toShort; y = ((y).toLong - x0).toShort; this }
    def -~~(x0: Float): this.type = { x = (math.round((x).toFloat - x0)).toShort; y = (math.round((y).toFloat - x0)).toShort; this }
    def -~~(x0: Double): this.type = { x = (math.round((x).toDouble - x0)).toShort; y = (math.round((y).toDouble - x0)).toShort; this }
    def -~(sg2: GVec2S): this.type = { x = (x - sg2.x).toShort; y = (y - sg2.y).toShort; this }
    def -~(x0: Short, y0: Short): this.type = { x = (x - x0).toShort; y = (y - y0).toShort; this }
    def -~~(ig2: GVec2I): this.type = { x = ((x).toInt - ig2.x).toShort; y = ((y).toInt - ig2.y).toShort; this }
    def -~~(lg2: GVec2L): this.type = { x = ((x).toLong - lg2.x).toShort; y = ((y).toLong - lg2.y).toShort; this }
    def -~~(fg2: GVec2F): this.type = { x = (math.round((x).toFloat - fg2.x)).toShort; y = (math.round((y).toFloat - fg2.y)).toShort; this }
    def -~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble - dg2.x)).toShort; y = (math.round((y).toDouble - dg2.y)).toShort; this }
    def *~(x0: Short): this.type = { x = (x * x0).toShort; y = (y * x0).toShort; this }
    def *~~(x0: Int): this.type = { x = ((x).toInt * x0).toShort; y = ((y).toInt * x0).toShort; this }
    def *~~(x0: Long): this.type = { x = ((x).toLong * x0).toShort; y = ((y).toLong * x0).toShort; this }
    def *~~(x0: Float): this.type = { x = (math.round((x).toFloat * x0)).toShort; y = (math.round((y).toFloat * x0)).toShort; this }
    def *~~(x0: Double): this.type = { x = (math.round((x).toDouble * x0)).toShort; y = (math.round((y).toDouble * x0)).toShort; this }
    def *~(sg2: GVec2S): this.type = { x = (x * sg2.x).toShort; y = (y * sg2.y).toShort; this }
    def *~(x0: Short, y0: Short): this.type = { x = (x * x0).toShort; y = (y * y0).toShort; this }
    def *~~(ig2: GVec2I): this.type = { x = ((x).toInt * ig2.x).toShort; y = ((y).toInt * ig2.y).toShort; this }
    def *~~(lg2: GVec2L): this.type = { x = ((x).toLong * lg2.x).toShort; y = ((y).toLong * lg2.y).toShort; this }
    def *~~(fg2: GVec2F): this.type = { x = (math.round((x).toFloat * fg2.x)).toShort; y = (math.round((y).toFloat * fg2.y)).toShort; this }
    def *~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble * dg2.x)).toShort; y = (math.round((y).toDouble * dg2.y)).toShort; this }
    def /~(x0: Short): this.type = { x = (x / x0).toShort; y = (y / x0).toShort; this }
    def /~~(x0: Int): this.type = { x = ((x).toInt / x0).toShort; y = ((y).toInt / x0).toShort; this }
    def /~~(x0: Long): this.type = { x = ((x).toLong / x0).toShort; y = ((y).toLong / x0).toShort; this }
    def /~~(x0: Float): this.type = { x = (math.round((x).toFloat / x0)).toShort; y = (math.round((y).toFloat / x0)).toShort; this }
    def /~~(x0: Double): this.type = { x = (math.round((x).toDouble / x0)).toShort; y = (math.round((y).toDouble / x0)).toShort; this }
    def /~(sg2: GVec2S): this.type = { x = (x / sg2.x).toShort; y = (y / sg2.y).toShort; this }
    def /~(x0: Short, y0: Short): this.type = { x = (x / x0).toShort; y = (y / y0).toShort; this }
    def /~~(ig2: GVec2I): this.type = { x = ((x).toInt / ig2.x).toShort; y = ((y).toInt / ig2.y).toShort; this }
    def /~~(lg2: GVec2L): this.type = { x = ((x).toLong / lg2.x).toShort; y = ((y).toLong / lg2.y).toShort; this }
    def /~~(fg2: GVec2F): this.type = { x = (math.round((x).toFloat / fg2.x)).toShort; y = (math.round((y).toFloat / fg2.y)).toShort; this }
    def /~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble / dg2.x)).toShort; y = (math.round((y).toDouble / dg2.y)).toShort; this }
    def maxEq(x0: Short): this.type = { x = (math.max(x,x0)).toShort; y = (math.max(y,x0)).toShort; this }
    def maxEqCast(x0: Int): this.type = { x = (math.max((x).toInt,x0)).toShort; y = (math.max((y).toInt,x0)).toShort; this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toLong,x0)).toShort; y = (math.max((y).toLong,x0)).toShort; this }
    def maxEqCast(x0: Float): this.type = { x = (math.round(math.max((x).toFloat,x0))).toShort; y = (math.round(math.max((y).toFloat,x0))).toShort; this }
    def maxEqCast(x0: Double): this.type = { x = (math.round(math.max((x).toDouble,x0))).toShort; y = (math.round(math.max((y).toDouble,x0))).toShort; this }
    def maxEq(sg2: GVec2S): this.type = { x = (math.max(x,sg2.x)).toShort; y = (math.max(y,sg2.y)).toShort; this }
    def maxEq(x0: Short, y0: Short): this.type = { x = (math.max(x,x0)).toShort; y = (math.max(y,y0)).toShort; this }
    def maxEqCast(ig2: GVec2I): this.type = { x = (math.max((x).toInt,ig2.x)).toShort; y = (math.max((y).toInt,ig2.y)).toShort; this }
    def maxEqCast(lg2: GVec2L): this.type = { x = (math.max((x).toLong,lg2.x)).toShort; y = (math.max((y).toLong,lg2.y)).toShort; this }
    def maxEqCast(fg2: GVec2F): this.type = { x = (math.round(math.max((x).toFloat,fg2.x))).toShort; y = (math.round(math.max((y).toFloat,fg2.y))).toShort; this }
    def maxEqCast(dg2: GVec2D): this.type = { x = (math.round(math.max((x).toDouble,dg2.x))).toShort; y = (math.round(math.max((y).toDouble,dg2.y))).toShort; this }
    def minEq(x0: Short): this.type = { x = (math.min(x,x0)).toShort; y = (math.min(y,x0)).toShort; this }
    def minEqCast(x0: Int): this.type = { x = (math.min((x).toInt,x0)).toShort; y = (math.min((y).toInt,x0)).toShort; this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toLong,x0)).toShort; y = (math.min((y).toLong,x0)).toShort; this }
    def minEqCast(x0: Float): this.type = { x = (math.round(math.min((x).toFloat,x0))).toShort; y = (math.round(math.min((y).toFloat,x0))).toShort; this }
    def minEqCast(x0: Double): this.type = { x = (math.round(math.min((x).toDouble,x0))).toShort; y = (math.round(math.min((y).toDouble,x0))).toShort; this }
    def minEq(sg2: GVec2S): this.type = { x = (math.min(x,sg2.x)).toShort; y = (math.min(y,sg2.y)).toShort; this }
    def minEq(x0: Short, y0: Short): this.type = { x = (math.min(x,x0)).toShort; y = (math.min(y,y0)).toShort; this }
    def minEqCast(ig2: GVec2I): this.type = { x = (math.min((x).toInt,ig2.x)).toShort; y = (math.min((y).toInt,ig2.y)).toShort; this }
    def minEqCast(lg2: GVec2L): this.type = { x = (math.min((x).toLong,lg2.x)).toShort; y = (math.min((y).toLong,lg2.y)).toShort; this }
    def minEqCast(fg2: GVec2F): this.type = { x = (math.round(math.min((x).toFloat,fg2.x))).toShort; y = (math.round(math.min((y).toFloat,fg2.y))).toShort; this }
    def minEqCast(dg2: GVec2D): this.type = { x = (math.round(math.min((x).toDouble,dg2.x))).toShort; y = (math.round(math.min((y).toDouble,dg2.y))).toShort; this }
    def operateEq(sg2: GVec2S)(fun: (Short,Short)=>Short) = { x = (fun(x,sg2.x)).toShort; y = (fun(y,sg2.y)).toShort; this }
    def operateEqCast(ig2: GVec2I)(fun: (Int,Int)=>Int) = { x = (fun((x).toInt,ig2.x)).toShort; y = (fun((y).toInt,ig2.y)).toShort; this }
    def operateEqCast(lg2: GVec2L)(fun: (Long,Long)=>Long) = { x = (fun((x).toLong,lg2.x)).toShort; y = (fun((y).toLong,lg2.y)).toShort; this }
    def operateEqCast(fg2: GVec2F)(fun: (Float,Float)=>Float) = { x = (math.round(fun((x).toFloat,fg2.x))).toShort; y = (math.round(fun((y).toFloat,fg2.y))).toShort; this }
    def operateEqCast(dg2: GVec2D)(fun: (Double,Double)=>Double) = { x = (math.round(fun((x).toDouble,dg2.x))).toShort; y = (math.round(fun((y).toDouble,dg2.y))).toShort; this }
    def **~(sg22: GMat2S) = {val x0 = x*sg22.xx+y*sg22.yx; val y0 = x*sg22.xy+y*sg22.yy; x = (x0).toShort; y = (y0).toShort; this }
    def **~:(sg22: GMat2S) = {val x0 = x*sg22.xx+y*sg22.xy; val y0 = x*sg22.yx+y*sg22.yy; x = (x0).toShort; y = (y0).toShort; this }
    def **~~(ig22: GMat2I) = {val x0 = (x).toInt*ig22.xx+(y).toInt*ig22.yx; val y0 = (x).toInt*ig22.xy+(y).toInt*ig22.yy; x = (x0).toShort; y = (y0).toShort; this }
    def **~~:(ig22: GMat2I) = {val x0 = (x).toInt*ig22.xx+(y).toInt*ig22.xy; val y0 = (x).toInt*ig22.yx+(y).toInt*ig22.yy; x = (x0).toShort; y = (y0).toShort; this }
    def **~~(lg22: GMat2L) = {val x0 = (x).toLong*lg22.xx+(y).toLong*lg22.yx; val y0 = (x).toLong*lg22.xy+(y).toLong*lg22.yy; x = (x0).toShort; y = (y0).toShort; this }
    def **~~:(lg22: GMat2L) = {val x0 = (x).toLong*lg22.xx+(y).toLong*lg22.xy; val y0 = (x).toLong*lg22.yx+(y).toLong*lg22.yy; x = (x0).toShort; y = (y0).toShort; this }
    def **~~(fg22: GMat2F) = {val x0 = (x).toFloat*fg22.xx+(y).toFloat*fg22.yx; val y0 = (x).toFloat*fg22.xy+(y).toFloat*fg22.yy; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; this }
    def **~~:(fg22: GMat2F) = {val x0 = (x).toFloat*fg22.xx+(y).toFloat*fg22.xy; val y0 = (x).toFloat*fg22.yx+(y).toFloat*fg22.yy; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; this }
    def **~~(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.yx; val y0 = (x).toDouble*dg22.xy+(y).toDouble*dg22.yy; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; this }
    def **~~:(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.xy; val y0 = (x).toDouble*dg22.yx+(y).toDouble*dg22.yy; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; this }
  } // class AVec2S

  object AVec2S {
    def apply(x0: Short, y0: Short): AVec2S = new MVec2S(x0, y0)
    def parse(str: String): AVec2S = IVec2S.parse(str).mut
    def zero: AVec2S = MVec2S.zero
    def xUnit: AVec2S = MVec2S.xUnit
    def yUnit: AVec2S = MVec2S.yUnit
  } // object AVec2S


  abstract class AVec2I extends GVec2I {
    def x_=(x0: Int): Unit
    def y_=(y0: Int): Unit
    override def clone(): AVec2I = new MVec2I(x, y)
    override def toS: AVec2S = new MVec2S((x).toShort, (y).toShort)
    override def copy(x0: Int = x, y0: Int = y): AVec2I = new MVec2I(x0, y0)
    override def pad(padding: Int = 1): AVec3I = new MVec3I(x, y, padding)
    def mapEq(fun: Int => Int): this.type = {x = fun(x); y = fun(y); this }
    override def toL: AVec2L = new MVec2L((x).toLong, (y).toLong)
    override def toF: AVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: AVec2D = new MVec2D((x).toDouble, (y).toDouble)
    def negEq: this.type = { x = -x; y = -y; this }
    def cwEq: this.type = { val x0 = y; y = -x; x = x0; this }
    def ccwEq: this.type = { val x0 = -y; y = x; x = x0; this }
    def :~(x0: Int): this.type = { x = x0; y = x0; this }
    def :~~(x0: Long): this.type = { x = (x0).toInt; y = (x0).toInt; this }
    def :~~(x0: Float): this.type = { x = math.round(x0); y = math.round(x0); this }
    def :~~(x0: Double): this.type = { x = (math.round(x0)).toInt; y = (math.round(x0)).toInt; this }
    def :~(sg2: GVec2S): this.type = { x = (sg2.x).toInt; y = (sg2.y).toInt; this }
    def :~(ig2: GVec2I): this.type = { x = ig2.x; y = ig2.y; this }
    def :~(x0: Int, y0: Int): this.type = { x = x0; y = y0; this }
    def :~~(lg2: GVec2L): this.type = { x = (lg2.x).toInt; y = (lg2.y).toInt; this }
    def :~~(fg2: GVec2F): this.type = { x = math.round(fg2.x); y = math.round(fg2.y); this }
    def :~~(dg2: GVec2D): this.type = { x = (math.round(dg2.x)).toInt; y = (math.round(dg2.y)).toInt; this }
    def +~(x0: Int): this.type = { x = x + x0; y = y + x0; this }
    def +~~(x0: Long): this.type = { x = ((x).toLong + x0).toInt; y = ((y).toLong + x0).toInt; this }
    def +~~(x0: Float): this.type = { x = math.round((x).toFloat + x0); y = math.round((y).toFloat + x0); this }
    def +~~(x0: Double): this.type = { x = (math.round((x).toDouble + x0)).toInt; y = (math.round((y).toDouble + x0)).toInt; this }
    def +~(sg2: GVec2S): this.type = { x = x + (sg2.x).toInt; y = y + (sg2.y).toInt; this }
    def +~(ig2: GVec2I): this.type = { x = x + ig2.x; y = y + ig2.y; this }
    def +~(x0: Int, y0: Int): this.type = { x = x + x0; y = y + y0; this }
    def +~~(lg2: GVec2L): this.type = { x = ((x).toLong + lg2.x).toInt; y = ((y).toLong + lg2.y).toInt; this }
    def +~~(fg2: GVec2F): this.type = { x = math.round((x).toFloat + fg2.x); y = math.round((y).toFloat + fg2.y); this }
    def +~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble + dg2.x)).toInt; y = (math.round((y).toDouble + dg2.y)).toInt; this }
    def -~(x0: Int): this.type = { x = x - x0; y = y - x0; this }
    def -~~(x0: Long): this.type = { x = ((x).toLong - x0).toInt; y = ((y).toLong - x0).toInt; this }
    def -~~(x0: Float): this.type = { x = math.round((x).toFloat - x0); y = math.round((y).toFloat - x0); this }
    def -~~(x0: Double): this.type = { x = (math.round((x).toDouble - x0)).toInt; y = (math.round((y).toDouble - x0)).toInt; this }
    def -~(sg2: GVec2S): this.type = { x = x - (sg2.x).toInt; y = y - (sg2.y).toInt; this }
    def -~(ig2: GVec2I): this.type = { x = x - ig2.x; y = y - ig2.y; this }
    def -~(x0: Int, y0: Int): this.type = { x = x - x0; y = y - y0; this }
    def -~~(lg2: GVec2L): this.type = { x = ((x).toLong - lg2.x).toInt; y = ((y).toLong - lg2.y).toInt; this }
    def -~~(fg2: GVec2F): this.type = { x = math.round((x).toFloat - fg2.x); y = math.round((y).toFloat - fg2.y); this }
    def -~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble - dg2.x)).toInt; y = (math.round((y).toDouble - dg2.y)).toInt; this }
    def *~(x0: Int): this.type = { x = x * x0; y = y * x0; this }
    def *~~(x0: Long): this.type = { x = ((x).toLong * x0).toInt; y = ((y).toLong * x0).toInt; this }
    def *~~(x0: Float): this.type = { x = math.round((x).toFloat * x0); y = math.round((y).toFloat * x0); this }
    def *~~(x0: Double): this.type = { x = (math.round((x).toDouble * x0)).toInt; y = (math.round((y).toDouble * x0)).toInt; this }
    def *~(sg2: GVec2S): this.type = { x = x * (sg2.x).toInt; y = y * (sg2.y).toInt; this }
    def *~(ig2: GVec2I): this.type = { x = x * ig2.x; y = y * ig2.y; this }
    def *~(x0: Int, y0: Int): this.type = { x = x * x0; y = y * y0; this }
    def *~~(lg2: GVec2L): this.type = { x = ((x).toLong * lg2.x).toInt; y = ((y).toLong * lg2.y).toInt; this }
    def *~~(fg2: GVec2F): this.type = { x = math.round((x).toFloat * fg2.x); y = math.round((y).toFloat * fg2.y); this }
    def *~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble * dg2.x)).toInt; y = (math.round((y).toDouble * dg2.y)).toInt; this }
    def /~(x0: Int): this.type = { x = x / x0; y = y / x0; this }
    def /~~(x0: Long): this.type = { x = ((x).toLong / x0).toInt; y = ((y).toLong / x0).toInt; this }
    def /~~(x0: Float): this.type = { x = math.round((x).toFloat / x0); y = math.round((y).toFloat / x0); this }
    def /~~(x0: Double): this.type = { x = (math.round((x).toDouble / x0)).toInt; y = (math.round((y).toDouble / x0)).toInt; this }
    def /~(sg2: GVec2S): this.type = { x = x / (sg2.x).toInt; y = y / (sg2.y).toInt; this }
    def /~(ig2: GVec2I): this.type = { x = x / ig2.x; y = y / ig2.y; this }
    def /~(x0: Int, y0: Int): this.type = { x = x / x0; y = y / y0; this }
    def /~~(lg2: GVec2L): this.type = { x = ((x).toLong / lg2.x).toInt; y = ((y).toLong / lg2.y).toInt; this }
    def /~~(fg2: GVec2F): this.type = { x = math.round((x).toFloat / fg2.x); y = math.round((y).toFloat / fg2.y); this }
    def /~~(dg2: GVec2D): this.type = { x = (math.round((x).toDouble / dg2.x)).toInt; y = (math.round((y).toDouble / dg2.y)).toInt; this }
    def maxEq(x0: Int): this.type = { x = math.max(x,x0); y = math.max(y,x0); this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toLong,x0)).toInt; y = (math.max((y).toLong,x0)).toInt; this }
    def maxEqCast(x0: Float): this.type = { x = math.round(math.max((x).toFloat,x0)); y = math.round(math.max((y).toFloat,x0)); this }
    def maxEqCast(x0: Double): this.type = { x = (math.round(math.max((x).toDouble,x0))).toInt; y = (math.round(math.max((y).toDouble,x0))).toInt; this }
    def maxEq(sg2: GVec2S): this.type = { x = math.max(x,(sg2.x).toInt); y = math.max(y,(sg2.y).toInt); this }
    def maxEq(ig2: GVec2I): this.type = { x = math.max(x,ig2.x); y = math.max(y,ig2.y); this }
    def maxEq(x0: Int, y0: Int): this.type = { x = math.max(x,x0); y = math.max(y,y0); this }
    def maxEqCast(lg2: GVec2L): this.type = { x = (math.max((x).toLong,lg2.x)).toInt; y = (math.max((y).toLong,lg2.y)).toInt; this }
    def maxEqCast(fg2: GVec2F): this.type = { x = math.round(math.max((x).toFloat,fg2.x)); y = math.round(math.max((y).toFloat,fg2.y)); this }
    def maxEqCast(dg2: GVec2D): this.type = { x = (math.round(math.max((x).toDouble,dg2.x))).toInt; y = (math.round(math.max((y).toDouble,dg2.y))).toInt; this }
    def minEq(x0: Int): this.type = { x = math.min(x,x0); y = math.min(y,x0); this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toLong,x0)).toInt; y = (math.min((y).toLong,x0)).toInt; this }
    def minEqCast(x0: Float): this.type = { x = math.round(math.min((x).toFloat,x0)); y = math.round(math.min((y).toFloat,x0)); this }
    def minEqCast(x0: Double): this.type = { x = (math.round(math.min((x).toDouble,x0))).toInt; y = (math.round(math.min((y).toDouble,x0))).toInt; this }
    def minEq(sg2: GVec2S): this.type = { x = math.min(x,(sg2.x).toInt); y = math.min(y,(sg2.y).toInt); this }
    def minEq(ig2: GVec2I): this.type = { x = math.min(x,ig2.x); y = math.min(y,ig2.y); this }
    def minEq(x0: Int, y0: Int): this.type = { x = math.min(x,x0); y = math.min(y,y0); this }
    def minEqCast(lg2: GVec2L): this.type = { x = (math.min((x).toLong,lg2.x)).toInt; y = (math.min((y).toLong,lg2.y)).toInt; this }
    def minEqCast(fg2: GVec2F): this.type = { x = math.round(math.min((x).toFloat,fg2.x)); y = math.round(math.min((y).toFloat,fg2.y)); this }
    def minEqCast(dg2: GVec2D): this.type = { x = (math.round(math.min((x).toDouble,dg2.x))).toInt; y = (math.round(math.min((y).toDouble,dg2.y))).toInt; this }
    def operateEq(sg2: GVec2S)(fun: (Int,Int)=>Int) = { x = fun(x,(sg2.x).toInt); y = fun(y,(sg2.y).toInt); this }
    def operateEq(ig2: GVec2I)(fun: (Int,Int)=>Int) = { x = fun(x,ig2.x); y = fun(y,ig2.y); this }
    def operateEqCast(lg2: GVec2L)(fun: (Long,Long)=>Long) = { x = (fun((x).toLong,lg2.x)).toInt; y = (fun((y).toLong,lg2.y)).toInt; this }
    def operateEqCast(fg2: GVec2F)(fun: (Float,Float)=>Float) = { x = math.round(fun((x).toFloat,fg2.x)); y = math.round(fun((y).toFloat,fg2.y)); this }
    def operateEqCast(dg2: GVec2D)(fun: (Double,Double)=>Double) = { x = (math.round(fun((x).toDouble,dg2.x))).toInt; y = (math.round(fun((y).toDouble,dg2.y))).toInt; this }
    def **~(sg22: GMat2S) = {val x0 = x*(sg22.xx).toInt+y*(sg22.yx).toInt; val y0 = x*(sg22.xy).toInt+y*(sg22.yy).toInt; x = x0; y = y0; this }
    def **~:(sg22: GMat2S) = {val x0 = x*(sg22.xx).toInt+y*(sg22.xy).toInt; val y0 = x*(sg22.yx).toInt+y*(sg22.yy).toInt; x = x0; y = y0; this }
    def **~(ig22: GMat2I) = {val x0 = x*ig22.xx+y*ig22.yx; val y0 = x*ig22.xy+y*ig22.yy; x = x0; y = y0; this }
    def **~:(ig22: GMat2I) = {val x0 = x*ig22.xx+y*ig22.xy; val y0 = x*ig22.yx+y*ig22.yy; x = x0; y = y0; this }
    def **~~(lg22: GMat2L) = {val x0 = (x).toLong*lg22.xx+(y).toLong*lg22.yx; val y0 = (x).toLong*lg22.xy+(y).toLong*lg22.yy; x = (x0).toInt; y = (y0).toInt; this }
    def **~~:(lg22: GMat2L) = {val x0 = (x).toLong*lg22.xx+(y).toLong*lg22.xy; val y0 = (x).toLong*lg22.yx+(y).toLong*lg22.yy; x = (x0).toInt; y = (y0).toInt; this }
    def **~~(fg22: GMat2F) = {val x0 = (x).toFloat*fg22.xx+(y).toFloat*fg22.yx; val y0 = (x).toFloat*fg22.xy+(y).toFloat*fg22.yy; x = math.round(x0); y = math.round(y0); this }
    def **~~:(fg22: GMat2F) = {val x0 = (x).toFloat*fg22.xx+(y).toFloat*fg22.xy; val y0 = (x).toFloat*fg22.yx+(y).toFloat*fg22.yy; x = math.round(x0); y = math.round(y0); this }
    def **~~(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.yx; val y0 = (x).toDouble*dg22.xy+(y).toDouble*dg22.yy; x = (math.round(x0)).toInt; y = (math.round(y0)).toInt; this }
    def **~~:(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.xy; val y0 = (x).toDouble*dg22.yx+(y).toDouble*dg22.yy; x = (math.round(x0)).toInt; y = (math.round(y0)).toInt; this }
  } // class AVec2I

  object AVec2I {
    def apply(x0: Int, y0: Int): AVec2I = new MVec2I(x0, y0)
    def parse(str: String): AVec2I = IVec2I.parse(str).mut
    def zero: AVec2I = MVec2I.zero
    def xUnit: AVec2I = MVec2I.xUnit
    def yUnit: AVec2I = MVec2I.yUnit
  } // object AVec2I


  abstract class AVec2L extends GVec2L {
    def x_=(x0: Long): Unit
    def y_=(y0: Long): Unit
    override def clone(): AVec2L = new MVec2L(x, y)
    override def toS: AVec2S = new MVec2S((x).toShort, (y).toShort)
    override def toI: AVec2I = new MVec2I((x).toInt, (y).toInt)
    override def copy(x0: Long = x, y0: Long = y): AVec2L = new MVec2L(x0, y0)
    override def pad(padding: Long = 1): AVec3L = new MVec3L(x, y, padding)
    def mapEq(fun: Long => Long): this.type = {x = fun(x); y = fun(y); this }
    override def toF: AVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: AVec2D = new MVec2D((x).toDouble, (y).toDouble)
    def negEq: this.type = { x = -x; y = -y; this }
    def cwEq: this.type = { val x0 = y; y = -x; x = x0; this }
    def ccwEq: this.type = { val x0 = -y; y = x; x = x0; this }
    def :~(x0: Long): this.type = { x = x0; y = x0; this }
    def :~~(x0: Double): this.type = { x = math.round(x0); y = math.round(x0); this }
    def :~(sg2: GVec2S): this.type = { x = (sg2.x).toLong; y = (sg2.y).toLong; this }
    def :~(ig2: GVec2I): this.type = { x = (ig2.x).toLong; y = (ig2.y).toLong; this }
    def :~(lg2: GVec2L): this.type = { x = lg2.x; y = lg2.y; this }
    def :~(x0: Long, y0: Long): this.type = { x = x0; y = y0; this }
    def :~~(fg2: GVec2F): this.type = { x = math.round((fg2.x).toDouble); y = math.round((fg2.y).toDouble); this }
    def :~~(dg2: GVec2D): this.type = { x = math.round(dg2.x); y = math.round(dg2.y); this }
    def +~(x0: Long): this.type = { x = x + x0; y = y + x0; this }
    def +~~(x0: Double): this.type = { x = math.round((x).toDouble + x0); y = math.round((y).toDouble + x0); this }
    def +~(sg2: GVec2S): this.type = { x = x + (sg2.x).toLong; y = y + (sg2.y).toLong; this }
    def +~(ig2: GVec2I): this.type = { x = x + (ig2.x).toLong; y = y + (ig2.y).toLong; this }
    def +~(lg2: GVec2L): this.type = { x = x + lg2.x; y = y + lg2.y; this }
    def +~(x0: Long, y0: Long): this.type = { x = x + x0; y = y + y0; this }
    def +~~(fg2: GVec2F): this.type = { x = math.round((x).toDouble + (fg2.x).toDouble); y = math.round((y).toDouble + (fg2.y).toDouble); this }
    def +~~(dg2: GVec2D): this.type = { x = math.round((x).toDouble + dg2.x); y = math.round((y).toDouble + dg2.y); this }
    def -~(x0: Long): this.type = { x = x - x0; y = y - x0; this }
    def -~~(x0: Double): this.type = { x = math.round((x).toDouble - x0); y = math.round((y).toDouble - x0); this }
    def -~(sg2: GVec2S): this.type = { x = x - (sg2.x).toLong; y = y - (sg2.y).toLong; this }
    def -~(ig2: GVec2I): this.type = { x = x - (ig2.x).toLong; y = y - (ig2.y).toLong; this }
    def -~(lg2: GVec2L): this.type = { x = x - lg2.x; y = y - lg2.y; this }
    def -~(x0: Long, y0: Long): this.type = { x = x - x0; y = y - y0; this }
    def -~~(fg2: GVec2F): this.type = { x = math.round((x).toDouble - (fg2.x).toDouble); y = math.round((y).toDouble - (fg2.y).toDouble); this }
    def -~~(dg2: GVec2D): this.type = { x = math.round((x).toDouble - dg2.x); y = math.round((y).toDouble - dg2.y); this }
    def *~(x0: Long): this.type = { x = x * x0; y = y * x0; this }
    def *~~(x0: Double): this.type = { x = math.round((x).toDouble * x0); y = math.round((y).toDouble * x0); this }
    def *~(sg2: GVec2S): this.type = { x = x * (sg2.x).toLong; y = y * (sg2.y).toLong; this }
    def *~(ig2: GVec2I): this.type = { x = x * (ig2.x).toLong; y = y * (ig2.y).toLong; this }
    def *~(lg2: GVec2L): this.type = { x = x * lg2.x; y = y * lg2.y; this }
    def *~(x0: Long, y0: Long): this.type = { x = x * x0; y = y * y0; this }
    def *~~(fg2: GVec2F): this.type = { x = math.round((x).toDouble * (fg2.x).toDouble); y = math.round((y).toDouble * (fg2.y).toDouble); this }
    def *~~(dg2: GVec2D): this.type = { x = math.round((x).toDouble * dg2.x); y = math.round((y).toDouble * dg2.y); this }
    def /~(x0: Long): this.type = { x = x / x0; y = y / x0; this }
    def /~~(x0: Double): this.type = { x = math.round((x).toDouble / x0); y = math.round((y).toDouble / x0); this }
    def /~(sg2: GVec2S): this.type = { x = x / (sg2.x).toLong; y = y / (sg2.y).toLong; this }
    def /~(ig2: GVec2I): this.type = { x = x / (ig2.x).toLong; y = y / (ig2.y).toLong; this }
    def /~(lg2: GVec2L): this.type = { x = x / lg2.x; y = y / lg2.y; this }
    def /~(x0: Long, y0: Long): this.type = { x = x / x0; y = y / y0; this }
    def /~~(fg2: GVec2F): this.type = { x = math.round((x).toDouble / (fg2.x).toDouble); y = math.round((y).toDouble / (fg2.y).toDouble); this }
    def /~~(dg2: GVec2D): this.type = { x = math.round((x).toDouble / dg2.x); y = math.round((y).toDouble / dg2.y); this }
    def maxEq(x0: Long): this.type = { x = math.max(x,x0); y = math.max(y,x0); this }
    def maxEqCast(x0: Double): this.type = { x = math.round(math.max((x).toDouble,x0)); y = math.round(math.max((y).toDouble,x0)); this }
    def maxEq(sg2: GVec2S): this.type = { x = math.max(x,(sg2.x).toLong); y = math.max(y,(sg2.y).toLong); this }
    def maxEq(ig2: GVec2I): this.type = { x = math.max(x,(ig2.x).toLong); y = math.max(y,(ig2.y).toLong); this }
    def maxEq(lg2: GVec2L): this.type = { x = math.max(x,lg2.x); y = math.max(y,lg2.y); this }
    def maxEq(x0: Long, y0: Long): this.type = { x = math.max(x,x0); y = math.max(y,y0); this }
    def maxEqCast(fg2: GVec2F): this.type = { x = math.round(math.max((x).toDouble,(fg2.x).toDouble)); y = math.round(math.max((y).toDouble,(fg2.y).toDouble)); this }
    def maxEqCast(dg2: GVec2D): this.type = { x = math.round(math.max((x).toDouble,dg2.x)); y = math.round(math.max((y).toDouble,dg2.y)); this }
    def minEq(x0: Long): this.type = { x = math.min(x,x0); y = math.min(y,x0); this }
    def minEqCast(x0: Double): this.type = { x = math.round(math.min((x).toDouble,x0)); y = math.round(math.min((y).toDouble,x0)); this }
    def minEq(sg2: GVec2S): this.type = { x = math.min(x,(sg2.x).toLong); y = math.min(y,(sg2.y).toLong); this }
    def minEq(ig2: GVec2I): this.type = { x = math.min(x,(ig2.x).toLong); y = math.min(y,(ig2.y).toLong); this }
    def minEq(lg2: GVec2L): this.type = { x = math.min(x,lg2.x); y = math.min(y,lg2.y); this }
    def minEq(x0: Long, y0: Long): this.type = { x = math.min(x,x0); y = math.min(y,y0); this }
    def minEqCast(fg2: GVec2F): this.type = { x = math.round(math.min((x).toDouble,(fg2.x).toDouble)); y = math.round(math.min((y).toDouble,(fg2.y).toDouble)); this }
    def minEqCast(dg2: GVec2D): this.type = { x = math.round(math.min((x).toDouble,dg2.x)); y = math.round(math.min((y).toDouble,dg2.y)); this }
    def operateEq(sg2: GVec2S)(fun: (Long,Long)=>Long) = { x = fun(x,(sg2.x).toLong); y = fun(y,(sg2.y).toLong); this }
    def operateEq(ig2: GVec2I)(fun: (Long,Long)=>Long) = { x = fun(x,(ig2.x).toLong); y = fun(y,(ig2.y).toLong); this }
    def operateEq(lg2: GVec2L)(fun: (Long,Long)=>Long) = { x = fun(x,lg2.x); y = fun(y,lg2.y); this }
    def operateEqCast(fg2: GVec2F)(fun: (Double,Double)=>Double) = { x = math.round(fun((x).toDouble,(fg2.x).toDouble)); y = math.round(fun((y).toDouble,(fg2.y).toDouble)); this }
    def operateEqCast(dg2: GVec2D)(fun: (Double,Double)=>Double) = { x = math.round(fun((x).toDouble,dg2.x)); y = math.round(fun((y).toDouble,dg2.y)); this }
    def **~(sg22: GMat2S) = {val x0 = x*(sg22.xx).toLong+y*(sg22.yx).toLong; val y0 = x*(sg22.xy).toLong+y*(sg22.yy).toLong; x = x0; y = y0; this }
    def **~:(sg22: GMat2S) = {val x0 = x*(sg22.xx).toLong+y*(sg22.xy).toLong; val y0 = x*(sg22.yx).toLong+y*(sg22.yy).toLong; x = x0; y = y0; this }
    def **~(ig22: GMat2I) = {val x0 = x*(ig22.xx).toLong+y*(ig22.yx).toLong; val y0 = x*(ig22.xy).toLong+y*(ig22.yy).toLong; x = x0; y = y0; this }
    def **~:(ig22: GMat2I) = {val x0 = x*(ig22.xx).toLong+y*(ig22.xy).toLong; val y0 = x*(ig22.yx).toLong+y*(ig22.yy).toLong; x = x0; y = y0; this }
    def **~(lg22: GMat2L) = {val x0 = x*lg22.xx+y*lg22.yx; val y0 = x*lg22.xy+y*lg22.yy; x = x0; y = y0; this }
    def **~:(lg22: GMat2L) = {val x0 = x*lg22.xx+y*lg22.xy; val y0 = x*lg22.yx+y*lg22.yy; x = x0; y = y0; this }
    def **~~(fg22: GMat2F) = {val x0 = (x).toDouble*(fg22.xx).toDouble+(y).toDouble*(fg22.yx).toDouble; val y0 = (x).toDouble*(fg22.xy).toDouble+(y).toDouble*(fg22.yy).toDouble; x = math.round(x0); y = math.round(y0); this }
    def **~~:(fg22: GMat2F) = {val x0 = (x).toDouble*(fg22.xx).toDouble+(y).toDouble*(fg22.xy).toDouble; val y0 = (x).toDouble*(fg22.yx).toDouble+(y).toDouble*(fg22.yy).toDouble; x = math.round(x0); y = math.round(y0); this }
    def **~~(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.yx; val y0 = (x).toDouble*dg22.xy+(y).toDouble*dg22.yy; x = math.round(x0); y = math.round(y0); this }
    def **~~:(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.xy; val y0 = (x).toDouble*dg22.yx+(y).toDouble*dg22.yy; x = math.round(x0); y = math.round(y0); this }
  } // class AVec2L

  object AVec2L {
    def apply(x0: Long, y0: Long): AVec2L = new MVec2L(x0, y0)
    def parse(str: String): AVec2L = IVec2L.parse(str).mut
    def zero: AVec2L = MVec2L.zero
    def xUnit: AVec2L = MVec2L.xUnit
    def yUnit: AVec2L = MVec2L.yUnit
  } // object AVec2L


  abstract class AVec2F extends GVec2F {
    def x_=(x0: Float): Unit
    def y_=(y0: Float): Unit
    override def clone(): AVec2F = new MVec2F(x, y)
    override def toS: AVec2S = new MVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: AVec2I = new MVec2I(math.round(x), math.round(y))
    override def toL: AVec2L = new MVec2L(math.round((x).toDouble), math.round((y).toDouble))
    override def copy(x0: Float = x, y0: Float = y): AVec2F = new MVec2F(x0, y0)
    override def pad(padding: Float = 1): AVec3F = new MVec3F(x, y, padding)
    def mapEq(fun: Float => Float): this.type = {x = fun(x); y = fun(y); this }
    override def toD: AVec2D = new MVec2D((x).toDouble, (y).toDouble)
    def negEq: this.type = { x = -x; y = -y; this }
    def cwEq: this.type = { val x0 = y; y = -x; x = x0; this }
    def ccwEq: this.type = { val x0 = -y; y = x; x = x0; this }
    def normEq: this.type = { val k0 = 1/this.len; x = x*k0; y = y*k0; this }
    def :~~(x0: Long): this.type = { x = (x0).toFloat; y = (x0).toFloat; this }
    def :~(x0: Float): this.type = { x = x0; y = x0; this }
    def :~~(x0: Double): this.type = { x = (x0).toFloat; y = (x0).toFloat; this }
    def :~(sg2: GVec2S): this.type = { x = (sg2.x).toFloat; y = (sg2.y).toFloat; this }
    def :~(ig2: GVec2I): this.type = { x = (ig2.x).toFloat; y = (ig2.y).toFloat; this }
    def :~~(lg2: GVec2L): this.type = { x = ((lg2.x).toDouble).toFloat; y = ((lg2.y).toDouble).toFloat; this }
    def :~(fg2: GVec2F): this.type = { x = fg2.x; y = fg2.y; this }
    def :~(x0: Float, y0: Float): this.type = { x = x0; y = y0; this }
    def :~~(dg2: GVec2D): this.type = { x = (dg2.x).toFloat; y = (dg2.y).toFloat; this }
    def +~~(x0: Long): this.type = { x = ((x).toDouble + (x0).toDouble).toFloat; y = ((y).toDouble + (x0).toDouble).toFloat; this }
    def +~(x0: Float): this.type = { x = x + x0; y = y + x0; this }
    def +~~(x0: Double): this.type = { x = ((x).toDouble + x0).toFloat; y = ((y).toDouble + x0).toFloat; this }
    def +~(sg2: GVec2S): this.type = { x = x + (sg2.x).toFloat; y = y + (sg2.y).toFloat; this }
    def +~(ig2: GVec2I): this.type = { x = x + (ig2.x).toFloat; y = y + (ig2.y).toFloat; this }
    def +~~(lg2: GVec2L): this.type = { x = ((x).toDouble + (lg2.x).toDouble).toFloat; y = ((y).toDouble + (lg2.y).toDouble).toFloat; this }
    def +~(fg2: GVec2F): this.type = { x = x + fg2.x; y = y + fg2.y; this }
    def +~(x0: Float, y0: Float): this.type = { x = x + x0; y = y + y0; this }
    def +~~(dg2: GVec2D): this.type = { x = ((x).toDouble + dg2.x).toFloat; y = ((y).toDouble + dg2.y).toFloat; this }
    def -~~(x0: Long): this.type = { x = ((x).toDouble - (x0).toDouble).toFloat; y = ((y).toDouble - (x0).toDouble).toFloat; this }
    def -~(x0: Float): this.type = { x = x - x0; y = y - x0; this }
    def -~~(x0: Double): this.type = { x = ((x).toDouble - x0).toFloat; y = ((y).toDouble - x0).toFloat; this }
    def -~(sg2: GVec2S): this.type = { x = x - (sg2.x).toFloat; y = y - (sg2.y).toFloat; this }
    def -~(ig2: GVec2I): this.type = { x = x - (ig2.x).toFloat; y = y - (ig2.y).toFloat; this }
    def -~~(lg2: GVec2L): this.type = { x = ((x).toDouble - (lg2.x).toDouble).toFloat; y = ((y).toDouble - (lg2.y).toDouble).toFloat; this }
    def -~(fg2: GVec2F): this.type = { x = x - fg2.x; y = y - fg2.y; this }
    def -~(x0: Float, y0: Float): this.type = { x = x - x0; y = y - y0; this }
    def -~~(dg2: GVec2D): this.type = { x = ((x).toDouble - dg2.x).toFloat; y = ((y).toDouble - dg2.y).toFloat; this }
    def *~~(x0: Long): this.type = { x = ((x).toDouble * (x0).toDouble).toFloat; y = ((y).toDouble * (x0).toDouble).toFloat; this }
    def *~(x0: Float): this.type = { x = x * x0; y = y * x0; this }
    def *~~(x0: Double): this.type = { x = ((x).toDouble * x0).toFloat; y = ((y).toDouble * x0).toFloat; this }
    def *~(sg2: GVec2S): this.type = { x = x * (sg2.x).toFloat; y = y * (sg2.y).toFloat; this }
    def *~(ig2: GVec2I): this.type = { x = x * (ig2.x).toFloat; y = y * (ig2.y).toFloat; this }
    def *~~(lg2: GVec2L): this.type = { x = ((x).toDouble * (lg2.x).toDouble).toFloat; y = ((y).toDouble * (lg2.y).toDouble).toFloat; this }
    def *~(fg2: GVec2F): this.type = { x = x * fg2.x; y = y * fg2.y; this }
    def *~(x0: Float, y0: Float): this.type = { x = x * x0; y = y * y0; this }
    def *~~(dg2: GVec2D): this.type = { x = ((x).toDouble * dg2.x).toFloat; y = ((y).toDouble * dg2.y).toFloat; this }
    def /~~(x0: Long): this.type = { x = ((x).toDouble / (x0).toDouble).toFloat; y = ((y).toDouble / (x0).toDouble).toFloat; this }
    def /~(x0: Float): this.type = { x = x / x0; y = y / x0; this }
    def /~~(x0: Double): this.type = { x = ((x).toDouble / x0).toFloat; y = ((y).toDouble / x0).toFloat; this }
    def /~(sg2: GVec2S): this.type = { x = x / (sg2.x).toFloat; y = y / (sg2.y).toFloat; this }
    def /~(ig2: GVec2I): this.type = { x = x / (ig2.x).toFloat; y = y / (ig2.y).toFloat; this }
    def /~~(lg2: GVec2L): this.type = { x = ((x).toDouble / (lg2.x).toDouble).toFloat; y = ((y).toDouble / (lg2.y).toDouble).toFloat; this }
    def /~(fg2: GVec2F): this.type = { x = x / fg2.x; y = y / fg2.y; this }
    def /~(x0: Float, y0: Float): this.type = { x = x / x0; y = y / y0; this }
    def /~~(dg2: GVec2D): this.type = { x = ((x).toDouble / dg2.x).toFloat; y = ((y).toDouble / dg2.y).toFloat; this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toDouble,(x0).toDouble)).toFloat; y = (math.max((y).toDouble,(x0).toDouble)).toFloat; this }
    def maxEq(x0: Float): this.type = { x = math.max(x,x0); y = math.max(y,x0); this }
    def maxEqCast(x0: Double): this.type = { x = (math.max((x).toDouble,x0)).toFloat; y = (math.max((y).toDouble,x0)).toFloat; this }
    def maxEq(sg2: GVec2S): this.type = { x = math.max(x,(sg2.x).toFloat); y = math.max(y,(sg2.y).toFloat); this }
    def maxEq(ig2: GVec2I): this.type = { x = math.max(x,(ig2.x).toFloat); y = math.max(y,(ig2.y).toFloat); this }
    def maxEqCast(lg2: GVec2L): this.type = { x = (math.max((x).toDouble,(lg2.x).toDouble)).toFloat; y = (math.max((y).toDouble,(lg2.y).toDouble)).toFloat; this }
    def maxEq(fg2: GVec2F): this.type = { x = math.max(x,fg2.x); y = math.max(y,fg2.y); this }
    def maxEq(x0: Float, y0: Float): this.type = { x = math.max(x,x0); y = math.max(y,y0); this }
    def maxEqCast(dg2: GVec2D): this.type = { x = (math.max((x).toDouble,dg2.x)).toFloat; y = (math.max((y).toDouble,dg2.y)).toFloat; this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toDouble,(x0).toDouble)).toFloat; y = (math.min((y).toDouble,(x0).toDouble)).toFloat; this }
    def minEq(x0: Float): this.type = { x = math.min(x,x0); y = math.min(y,x0); this }
    def minEqCast(x0: Double): this.type = { x = (math.min((x).toDouble,x0)).toFloat; y = (math.min((y).toDouble,x0)).toFloat; this }
    def minEq(sg2: GVec2S): this.type = { x = math.min(x,(sg2.x).toFloat); y = math.min(y,(sg2.y).toFloat); this }
    def minEq(ig2: GVec2I): this.type = { x = math.min(x,(ig2.x).toFloat); y = math.min(y,(ig2.y).toFloat); this }
    def minEqCast(lg2: GVec2L): this.type = { x = (math.min((x).toDouble,(lg2.x).toDouble)).toFloat; y = (math.min((y).toDouble,(lg2.y).toDouble)).toFloat; this }
    def minEq(fg2: GVec2F): this.type = { x = math.min(x,fg2.x); y = math.min(y,fg2.y); this }
    def minEq(x0: Float, y0: Float): this.type = { x = math.min(x,x0); y = math.min(y,y0); this }
    def minEqCast(dg2: GVec2D): this.type = { x = (math.min((x).toDouble,dg2.x)).toFloat; y = (math.min((y).toDouble,dg2.y)).toFloat; this }
    def operateEq(sg2: GVec2S)(fun: (Float,Float)=>Float) = { x = fun(x,(sg2.x).toFloat); y = fun(y,(sg2.y).toFloat); this }
    def operateEq(ig2: GVec2I)(fun: (Float,Float)=>Float) = { x = fun(x,(ig2.x).toFloat); y = fun(y,(ig2.y).toFloat); this }
    def operateEqCast(lg2: GVec2L)(fun: (Double,Double)=>Double) = { x = (fun((x).toDouble,(lg2.x).toDouble)).toFloat; y = (fun((y).toDouble,(lg2.y).toDouble)).toFloat; this }
    def operateEq(fg2: GVec2F)(fun: (Float,Float)=>Float) = { x = fun(x,fg2.x); y = fun(y,fg2.y); this }
    def operateEqCast(dg2: GVec2D)(fun: (Double,Double)=>Double) = { x = (fun((x).toDouble,dg2.x)).toFloat; y = (fun((y).toDouble,dg2.y)).toFloat; this }
    def **~(sg22: GMat2S) = {val x0 = x*(sg22.xx).toFloat+y*(sg22.yx).toFloat; val y0 = x*(sg22.xy).toFloat+y*(sg22.yy).toFloat; x = x0; y = y0; this }
    def **~:(sg22: GMat2S) = {val x0 = x*(sg22.xx).toFloat+y*(sg22.xy).toFloat; val y0 = x*(sg22.yx).toFloat+y*(sg22.yy).toFloat; x = x0; y = y0; this }
    def **~(ig22: GMat2I) = {val x0 = x*(ig22.xx).toFloat+y*(ig22.yx).toFloat; val y0 = x*(ig22.xy).toFloat+y*(ig22.yy).toFloat; x = x0; y = y0; this }
    def **~:(ig22: GMat2I) = {val x0 = x*(ig22.xx).toFloat+y*(ig22.xy).toFloat; val y0 = x*(ig22.yx).toFloat+y*(ig22.yy).toFloat; x = x0; y = y0; this }
    def **~~(lg22: GMat2L) = {val x0 = (x).toDouble*(lg22.xx).toDouble+(y).toDouble*(lg22.yx).toDouble; val y0 = (x).toDouble*(lg22.xy).toDouble+(y).toDouble*(lg22.yy).toDouble; x = (x0).toFloat; y = (y0).toFloat; this }
    def **~~:(lg22: GMat2L) = {val x0 = (x).toDouble*(lg22.xx).toDouble+(y).toDouble*(lg22.xy).toDouble; val y0 = (x).toDouble*(lg22.yx).toDouble+(y).toDouble*(lg22.yy).toDouble; x = (x0).toFloat; y = (y0).toFloat; this }
    def **~(fg22: GMat2F) = {val x0 = x*fg22.xx+y*fg22.yx; val y0 = x*fg22.xy+y*fg22.yy; x = x0; y = y0; this }
    def **~:(fg22: GMat2F) = {val x0 = x*fg22.xx+y*fg22.xy; val y0 = x*fg22.yx+y*fg22.yy; x = x0; y = y0; this }
    def **~~(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.yx; val y0 = (x).toDouble*dg22.xy+(y).toDouble*dg22.yy; x = (x0).toFloat; y = (y0).toFloat; this }
    def **~~:(dg22: GMat2D) = {val x0 = (x).toDouble*dg22.xx+(y).toDouble*dg22.xy; val y0 = (x).toDouble*dg22.yx+(y).toDouble*dg22.yy; x = (x0).toFloat; y = (y0).toFloat; this }
  } // class AVec2F

  object AVec2F {
    def apply(x0: Float, y0: Float): AVec2F = new MVec2F(x0, y0)
    def parse(str: String): AVec2F = IVec2F.parse(str).mut
    def polar(r0: Float, theta: Float): AVec2F = new MVec2F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat)
    def zero: AVec2F = MVec2F.zero
    def xUnit: AVec2F = MVec2F.xUnit
    def yUnit: AVec2F = MVec2F.yUnit
  } // object AVec2F


  abstract class AVec2D extends GVec2D {
    def x_=(x0: Double): Unit
    def y_=(y0: Double): Unit
    override def clone(): AVec2D = new MVec2D(x, y)
    override def toS: AVec2S = new MVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: AVec2I = new MVec2I((math.round(x)).toInt, (math.round(y)).toInt)
    override def toL: AVec2L = new MVec2L(math.round(x), math.round(y))
    override def toF: AVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def copy(x0: Double = x, y0: Double = y): AVec2D = new MVec2D(x0, y0)
    override def pad(padding: Double = 1): AVec3D = new MVec3D(x, y, padding)
    def mapEq(fun: Double => Double): this.type = {x = fun(x); y = fun(y); this }
    def negEq: this.type = { x = -x; y = -y; this }
    def cwEq: this.type = { val x0 = y; y = -x; x = x0; this }
    def ccwEq: this.type = { val x0 = -y; y = x; x = x0; this }
    def normEq: this.type = { val k0 = 1/this.len; x = x*k0; y = y*k0; this }
    def :~(x0: Double): this.type = { x = x0; y = x0; this }
    def :~(sg2: GVec2S): this.type = { x = (sg2.x).toDouble; y = (sg2.y).toDouble; this }
    def :~(ig2: GVec2I): this.type = { x = (ig2.x).toDouble; y = (ig2.y).toDouble; this }
    def :~(lg2: GVec2L): this.type = { x = (lg2.x).toDouble; y = (lg2.y).toDouble; this }
    def :~(fg2: GVec2F): this.type = { x = (fg2.x).toDouble; y = (fg2.y).toDouble; this }
    def :~(dg2: GVec2D): this.type = { x = dg2.x; y = dg2.y; this }
    def :~(x0: Double, y0: Double): this.type = { x = x0; y = y0; this }
    def +~(x0: Double): this.type = { x = x + x0; y = y + x0; this }
    def +~(sg2: GVec2S): this.type = { x = x + (sg2.x).toDouble; y = y + (sg2.y).toDouble; this }
    def +~(ig2: GVec2I): this.type = { x = x + (ig2.x).toDouble; y = y + (ig2.y).toDouble; this }
    def +~(lg2: GVec2L): this.type = { x = x + (lg2.x).toDouble; y = y + (lg2.y).toDouble; this }
    def +~(fg2: GVec2F): this.type = { x = x + (fg2.x).toDouble; y = y + (fg2.y).toDouble; this }
    def +~(dg2: GVec2D): this.type = { x = x + dg2.x; y = y + dg2.y; this }
    def +~(x0: Double, y0: Double): this.type = { x = x + x0; y = y + y0; this }
    def -~(x0: Double): this.type = { x = x - x0; y = y - x0; this }
    def -~(sg2: GVec2S): this.type = { x = x - (sg2.x).toDouble; y = y - (sg2.y).toDouble; this }
    def -~(ig2: GVec2I): this.type = { x = x - (ig2.x).toDouble; y = y - (ig2.y).toDouble; this }
    def -~(lg2: GVec2L): this.type = { x = x - (lg2.x).toDouble; y = y - (lg2.y).toDouble; this }
    def -~(fg2: GVec2F): this.type = { x = x - (fg2.x).toDouble; y = y - (fg2.y).toDouble; this }
    def -~(dg2: GVec2D): this.type = { x = x - dg2.x; y = y - dg2.y; this }
    def -~(x0: Double, y0: Double): this.type = { x = x - x0; y = y - y0; this }
    def *~(x0: Double): this.type = { x = x * x0; y = y * x0; this }
    def *~(sg2: GVec2S): this.type = { x = x * (sg2.x).toDouble; y = y * (sg2.y).toDouble; this }
    def *~(ig2: GVec2I): this.type = { x = x * (ig2.x).toDouble; y = y * (ig2.y).toDouble; this }
    def *~(lg2: GVec2L): this.type = { x = x * (lg2.x).toDouble; y = y * (lg2.y).toDouble; this }
    def *~(fg2: GVec2F): this.type = { x = x * (fg2.x).toDouble; y = y * (fg2.y).toDouble; this }
    def *~(dg2: GVec2D): this.type = { x = x * dg2.x; y = y * dg2.y; this }
    def *~(x0: Double, y0: Double): this.type = { x = x * x0; y = y * y0; this }
    def /~(x0: Double): this.type = { x = x / x0; y = y / x0; this }
    def /~(sg2: GVec2S): this.type = { x = x / (sg2.x).toDouble; y = y / (sg2.y).toDouble; this }
    def /~(ig2: GVec2I): this.type = { x = x / (ig2.x).toDouble; y = y / (ig2.y).toDouble; this }
    def /~(lg2: GVec2L): this.type = { x = x / (lg2.x).toDouble; y = y / (lg2.y).toDouble; this }
    def /~(fg2: GVec2F): this.type = { x = x / (fg2.x).toDouble; y = y / (fg2.y).toDouble; this }
    def /~(dg2: GVec2D): this.type = { x = x / dg2.x; y = y / dg2.y; this }
    def /~(x0: Double, y0: Double): this.type = { x = x / x0; y = y / y0; this }
    def maxEq(x0: Double): this.type = { x = math.max(x,x0); y = math.max(y,x0); this }
    def maxEq(sg2: GVec2S): this.type = { x = math.max(x,(sg2.x).toDouble); y = math.max(y,(sg2.y).toDouble); this }
    def maxEq(ig2: GVec2I): this.type = { x = math.max(x,(ig2.x).toDouble); y = math.max(y,(ig2.y).toDouble); this }
    def maxEq(lg2: GVec2L): this.type = { x = math.max(x,(lg2.x).toDouble); y = math.max(y,(lg2.y).toDouble); this }
    def maxEq(fg2: GVec2F): this.type = { x = math.max(x,(fg2.x).toDouble); y = math.max(y,(fg2.y).toDouble); this }
    def maxEq(dg2: GVec2D): this.type = { x = math.max(x,dg2.x); y = math.max(y,dg2.y); this }
    def maxEq(x0: Double, y0: Double): this.type = { x = math.max(x,x0); y = math.max(y,y0); this }
    def minEq(x0: Double): this.type = { x = math.min(x,x0); y = math.min(y,x0); this }
    def minEq(sg2: GVec2S): this.type = { x = math.min(x,(sg2.x).toDouble); y = math.min(y,(sg2.y).toDouble); this }
    def minEq(ig2: GVec2I): this.type = { x = math.min(x,(ig2.x).toDouble); y = math.min(y,(ig2.y).toDouble); this }
    def minEq(lg2: GVec2L): this.type = { x = math.min(x,(lg2.x).toDouble); y = math.min(y,(lg2.y).toDouble); this }
    def minEq(fg2: GVec2F): this.type = { x = math.min(x,(fg2.x).toDouble); y = math.min(y,(fg2.y).toDouble); this }
    def minEq(dg2: GVec2D): this.type = { x = math.min(x,dg2.x); y = math.min(y,dg2.y); this }
    def minEq(x0: Double, y0: Double): this.type = { x = math.min(x,x0); y = math.min(y,y0); this }
    def operateEq(sg2: GVec2S)(fun: (Double,Double)=>Double) = { x = fun(x,(sg2.x).toDouble); y = fun(y,(sg2.y).toDouble); this }
    def operateEq(ig2: GVec2I)(fun: (Double,Double)=>Double) = { x = fun(x,(ig2.x).toDouble); y = fun(y,(ig2.y).toDouble); this }
    def operateEq(lg2: GVec2L)(fun: (Double,Double)=>Double) = { x = fun(x,(lg2.x).toDouble); y = fun(y,(lg2.y).toDouble); this }
    def operateEq(fg2: GVec2F)(fun: (Double,Double)=>Double) = { x = fun(x,(fg2.x).toDouble); y = fun(y,(fg2.y).toDouble); this }
    def operateEq(dg2: GVec2D)(fun: (Double,Double)=>Double) = { x = fun(x,dg2.x); y = fun(y,dg2.y); this }
    def **~(sg22: GMat2S) = {val x0 = x*(sg22.xx).toDouble+y*(sg22.yx).toDouble; val y0 = x*(sg22.xy).toDouble+y*(sg22.yy).toDouble; x = x0; y = y0; this }
    def **~:(sg22: GMat2S) = {val x0 = x*(sg22.xx).toDouble+y*(sg22.xy).toDouble; val y0 = x*(sg22.yx).toDouble+y*(sg22.yy).toDouble; x = x0; y = y0; this }
    def **~(ig22: GMat2I) = {val x0 = x*(ig22.xx).toDouble+y*(ig22.yx).toDouble; val y0 = x*(ig22.xy).toDouble+y*(ig22.yy).toDouble; x = x0; y = y0; this }
    def **~:(ig22: GMat2I) = {val x0 = x*(ig22.xx).toDouble+y*(ig22.xy).toDouble; val y0 = x*(ig22.yx).toDouble+y*(ig22.yy).toDouble; x = x0; y = y0; this }
    def **~(lg22: GMat2L) = {val x0 = x*(lg22.xx).toDouble+y*(lg22.yx).toDouble; val y0 = x*(lg22.xy).toDouble+y*(lg22.yy).toDouble; x = x0; y = y0; this }
    def **~:(lg22: GMat2L) = {val x0 = x*(lg22.xx).toDouble+y*(lg22.xy).toDouble; val y0 = x*(lg22.yx).toDouble+y*(lg22.yy).toDouble; x = x0; y = y0; this }
    def **~(fg22: GMat2F) = {val x0 = x*(fg22.xx).toDouble+y*(fg22.yx).toDouble; val y0 = x*(fg22.xy).toDouble+y*(fg22.yy).toDouble; x = x0; y = y0; this }
    def **~:(fg22: GMat2F) = {val x0 = x*(fg22.xx).toDouble+y*(fg22.xy).toDouble; val y0 = x*(fg22.yx).toDouble+y*(fg22.yy).toDouble; x = x0; y = y0; this }
    def **~(dg22: GMat2D) = {val x0 = x*dg22.xx+y*dg22.yx; val y0 = x*dg22.xy+y*dg22.yy; x = x0; y = y0; this }
    def **~:(dg22: GMat2D) = {val x0 = x*dg22.xx+y*dg22.xy; val y0 = x*dg22.yx+y*dg22.yy; x = x0; y = y0; this }
  } // class AVec2D

  object AVec2D {
    def apply(x0: Double, y0: Double): AVec2D = new MVec2D(x0, y0)
    def parse(str: String): AVec2D = IVec2D.parse(str).mut
    def polar(r0: Double, theta: Double): AVec2D = new MVec2D(r0 * math.cos(theta), r0 * math.sin(theta))
    def zero: AVec2D = MVec2D.zero
    def xUnit: AVec2D = MVec2D.xUnit
    def yUnit: AVec2D = MVec2D.yUnit
  } // object AVec2D


  final class MVec2S(var x: Short, var y: Short) extends AVec2S {
    override def clone(): MVec2S = new MVec2S(x, y)
    override def copy(x0: Short = x, y0: Short = y): MVec2S = new MVec2S(x0, y0)
    override def pad(padding: Short = 1): MVec3S = new MVec3S(x, y, padding)
    override def toI: MVec2I = new MVec2I((x).toInt, (y).toInt)
    override def toL: MVec2L = new MVec2L((x).toLong, (y).toLong)
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class MVec2S

  object MVec2S {
    def apply(x0: Short, y0: Short): MVec2S = new MVec2S(x0, y0)
    def parse(str: String): MVec2S = IVec2S.parse(str).mut
    def zero = new MVec2S(0, 0)
    def xUnit = new MVec2S(1, 0)
    def yUnit = new MVec2S(0, 1)
  } // object MVec2S


  final class MVec2I(var x: Int, var y: Int) extends AVec2I {
    override def clone(): MVec2I = new MVec2I(x, y)
    override def toS: MVec2S = new MVec2S((x).toShort, (y).toShort)
    override def copy(x0: Int = x, y0: Int = y): MVec2I = new MVec2I(x0, y0)
    override def pad(padding: Int = 1): MVec3I = new MVec3I(x, y, padding)
    override def toL: MVec2L = new MVec2L((x).toLong, (y).toLong)
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class MVec2I

  object MVec2I {
    def apply(x0: Int, y0: Int): MVec2I = new MVec2I(x0, y0)
    def parse(str: String): MVec2I = IVec2I.parse(str).mut
    def zero = new MVec2I(0, 0)
    def xUnit = new MVec2I(1, 0)
    def yUnit = new MVec2I(0, 1)
  } // object MVec2I


  final class MVec2L(var x: Long, var y: Long) extends AVec2L {
    override def clone(): MVec2L = new MVec2L(x, y)
    override def toS: MVec2S = new MVec2S((x).toShort, (y).toShort)
    override def toI: MVec2I = new MVec2I((x).toInt, (y).toInt)
    override def copy(x0: Long = x, y0: Long = y): MVec2L = new MVec2L(x0, y0)
    override def pad(padding: Long = 1): MVec3L = new MVec3L(x, y, padding)
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class MVec2L

  object MVec2L {
    def apply(x0: Long, y0: Long): MVec2L = new MVec2L(x0, y0)
    def parse(str: String): MVec2L = IVec2L.parse(str).mut
    def zero = new MVec2L(0, 0)
    def xUnit = new MVec2L(1, 0)
    def yUnit = new MVec2L(0, 1)
  } // object MVec2L


  final class MVec2F(var x: Float, var y: Float) extends AVec2F {
    override def clone(): MVec2F = new MVec2F(x, y)
    override def toS: MVec2S = new MVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: MVec2I = new MVec2I(math.round(x), math.round(y))
    override def toL: MVec2L = new MVec2L(math.round((x).toDouble), math.round((y).toDouble))
    override def copy(x0: Float = x, y0: Float = y): MVec2F = new MVec2F(x0, y0)
    override def pad(padding: Float = 1): MVec3F = new MVec3F(x, y, padding)
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class MVec2F

  object MVec2F {
    def apply(x0: Float, y0: Float): MVec2F = new MVec2F(x0, y0)
    def parse(str: String): MVec2F = IVec2F.parse(str).mut
    def polar(r0: Float, theta: Float): MVec2F = new MVec2F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat)
    def zero = new MVec2F(0, 0)
    def xUnit = new MVec2F(1, 0)
    def yUnit = new MVec2F(0, 1)
  } // object MVec2F


  final class MVec2D(var x: Double, var y: Double) extends AVec2D {
    override def clone(): MVec2D = new MVec2D(x, y)
    override def toS: MVec2S = new MVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: MVec2I = new MVec2I((math.round(x)).toInt, (math.round(y)).toInt)
    override def toL: MVec2L = new MVec2L(math.round(x), math.round(y))
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def copy(x0: Double = x, y0: Double = y): MVec2D = new MVec2D(x0, y0)
    override def pad(padding: Double = 1): MVec3D = new MVec3D(x, y, padding)
  } // class MVec2D

  object MVec2D {
    def apply(x0: Double, y0: Double): MVec2D = new MVec2D(x0, y0)
    def parse(str: String): MVec2D = IVec2D.parse(str).mut
    def polar(r0: Double, theta: Double): MVec2D = new MVec2D(r0 * math.cos(theta), r0 * math.sin(theta))
    def zero = new MVec2D(0, 0)
    def xUnit = new MVec2D(1, 0)
    def yUnit = new MVec2D(0, 1)
  } // object MVec2D


  class BVec2S(data: Array[Short]) extends AVec2S with Iterator[BVec2S] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Short) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Short) { data(index+1) = y0 }
    override def toString = if (index < 0 || index+2 > data.length) ("(out of range)") else ("["+x+" ; "+y+"]")
    def hasNext = (fresh && 2 <= data.length) || (index + 4 <= data.length)
    def next = { if (fresh) fresh = false else index += 2; this }
    def reset(idx: Int = 0) = { index = idx*2; fresh = true; this }
    def spawn = { val v = new BVec2S(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toI: MVec2I = new MVec2I((x).toInt, (y).toInt)
    override def toL: MVec2L = new MVec2L((x).toLong, (y).toLong)
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class BVec2S

  object BVec2S {
    def apply(a0: Array[Short]) = new BVec2S(a0)
    def apply(i0: Int) = new BVec2S(new Array[Short](i0*2))
  } // object BVec2S


  class BVec2I(data: Array[Int]) extends AVec2I with Iterator[BVec2I] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Int) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Int) { data(index+1) = y0 }
    override def toString = if (index < 0 || index+2 > data.length) ("(out of range)") else ("["+x+" ; "+y+"]")
    def hasNext = (fresh && 2 <= data.length) || (index + 4 <= data.length)
    def next = { if (fresh) fresh = false else index += 2; this }
    def reset(idx: Int = 0) = { index = idx*2; fresh = true; this }
    def spawn = { val v = new BVec2I(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec2S = new MVec2S((x).toShort, (y).toShort)
    override def toL: MVec2L = new MVec2L((x).toLong, (y).toLong)
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class BVec2I

  object BVec2I {
    def apply(a0: Array[Int]) = new BVec2I(a0)
    def apply(i0: Int) = new BVec2I(new Array[Int](i0*2))
  } // object BVec2I


  class BVec2L(data: Array[Long]) extends AVec2L with Iterator[BVec2L] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Long) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Long) { data(index+1) = y0 }
    override def toString = if (index < 0 || index+2 > data.length) ("(out of range)") else ("["+x+" ; "+y+"]")
    def hasNext = (fresh && 2 <= data.length) || (index + 4 <= data.length)
    def next = { if (fresh) fresh = false else index += 2; this }
    def reset(idx: Int = 0) = { index = idx*2; fresh = true; this }
    def spawn = { val v = new BVec2L(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec2S = new MVec2S((x).toShort, (y).toShort)
    override def toI: MVec2I = new MVec2I((x).toInt, (y).toInt)
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class BVec2L

  object BVec2L {
    def apply(a0: Array[Long]) = new BVec2L(a0)
    def apply(i0: Int) = new BVec2L(new Array[Long](i0*2))
  } // object BVec2L


  class BVec2F(data: Array[Float]) extends AVec2F with Iterator[BVec2F] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Float) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Float) { data(index+1) = y0 }
    override def toString = if (index < 0 || index+2 > data.length) ("(out of range)") else ("["+x+" ; "+y+"]")
    def hasNext = (fresh && 2 <= data.length) || (index + 4 <= data.length)
    def next = { if (fresh) fresh = false else index += 2; this }
    def reset(idx: Int = 0) = { index = idx*2; fresh = true; this }
    def spawn = { val v = new BVec2F(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec2S = new MVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: MVec2I = new MVec2I(math.round(x), math.round(y))
    override def toL: MVec2L = new MVec2L(math.round((x).toDouble), math.round((y).toDouble))
    override def toD: MVec2D = new MVec2D((x).toDouble, (y).toDouble)
  } // class BVec2F

  object BVec2F {
    def apply(a0: Array[Float]) = new BVec2F(a0)
    def apply(i0: Int) = new BVec2F(new Array[Float](i0*2))
  } // object BVec2F


  class BVec2D(data: Array[Double]) extends AVec2D with Iterator[BVec2D] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Double) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Double) { data(index+1) = y0 }
    override def toString = if (index < 0 || index+2 > data.length) ("(out of range)") else ("["+x+" ; "+y+"]")
    def hasNext = (fresh && 2 <= data.length) || (index + 4 <= data.length)
    def next = { if (fresh) fresh = false else index += 2; this }
    def reset(idx: Int = 0) = { index = idx*2; fresh = true; this }
    def spawn = { val v = new BVec2D(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec2S = new MVec2S((math.round(x)).toShort, (math.round(y)).toShort)
    override def toI: MVec2I = new MVec2I((math.round(x)).toInt, (math.round(y)).toInt)
    override def toL: MVec2L = new MVec2L(math.round(x), math.round(y))
    override def toF: MVec2F = new MVec2F((x).toFloat, (y).toFloat)
  } // class BVec2D

  object BVec2D {
    def apply(a0: Array[Double]) = new BVec2D(a0)
    def apply(i0: Int) = new BVec2D(new Array[Double](i0*2))
  } // object BVec2D


  abstract class GVec3S extends Cloneable {
    def x: Short
    def y: Short
    def z: Short
    override def toString = "["+x+", "+y+", "+z+"]"
    override def hashCode = ((z)*16777619 ^ y)*16777619 ^ x
    override def equals(any: Any) = any match { case sg3: GVec3S => {x==sg3.x && y==sg3.y && z==sg3.z }; case ig3: GVec3I => {x==ig3.x && y==ig3.y && z==ig3.z }; case lg3: GVec3L => {x==lg3.x && y==lg3.y && z==lg3.z }; case fg3: GVec3F => {x==fg3.x && y==fg3.y && z==fg3.z }; case dg3: GVec3D => {x==dg3.x && y==dg3.y && z==dg3.z }; case _ => false }
    override def clone(): GVec3S = new IVec3S(x, y, z)
    def copy(x0: Short = x, y0: Short = y, z0: Short = z): GVec3S = new IVec3S(x0, y0, z0)
    def trim: GVec2S = new IVec2S(x, y)
    def pad(padding: Short = 1): GVec4S = new IVec4S(x, y, z, padding)
    def toI: GVec3I = new IVec3I((x).toInt, (y).toInt, (z).toInt)
    def toL: GVec3L = new IVec3L((x).toLong, (y).toLong, (z).toLong)
    def toF: GVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    def toD: GVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def imm = new IVec3S(x, y, z)
    def mut = new MVec3S(x, y, z)
    def lenSq = x*x + y*y + z*z
    def unary_-() = new IVec3S((-x).toShort, (-y).toShort, (-z).toShort)
    def +(x0: Short) = new IVec3S((x + x0).toShort, (y + x0).toShort, (z + x0).toShort)
    def +(x0: Int) = new IVec3I((x).toInt + x0, (y).toInt + x0, (z).toInt + x0)
    def +(x0: Long) = new IVec3L((x).toLong + x0, (y).toLong + x0, (z).toLong + x0)
    def +(x0: Float) = new IVec3F((x).toFloat + x0, (y).toFloat + x0, (z).toFloat + x0)
    def +(x0: Double) = new IVec3D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0)
    def +(sg3: GVec3S) = new IVec3S((x + sg3.x).toShort, (y + sg3.y).toShort, (z + sg3.z).toShort)
    def +(x0: Short, y0: Short, z0: Short) = new IVec3S((x + x0).toShort, (y + y0).toShort, (z + z0).toShort)
    def +(ig3: GVec3I) = new IVec3I((x).toInt + ig3.x, (y).toInt + ig3.y, (z).toInt + ig3.z)
    def +(lg3: GVec3L) = new IVec3L((x).toLong + lg3.x, (y).toLong + lg3.y, (z).toLong + lg3.z)
    def +(fg3: GVec3F) = new IVec3F((x).toFloat + fg3.x, (y).toFloat + fg3.y, (z).toFloat + fg3.z)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (y).toDouble + dg3.y, (z).toDouble + dg3.z)
    def -(x0: Short) = new IVec3S((x - x0).toShort, (y - x0).toShort, (z - x0).toShort)
    def -(x0: Int) = new IVec3I((x).toInt - x0, (y).toInt - x0, (z).toInt - x0)
    def -(x0: Long) = new IVec3L((x).toLong - x0, (y).toLong - x0, (z).toLong - x0)
    def -(x0: Float) = new IVec3F((x).toFloat - x0, (y).toFloat - x0, (z).toFloat - x0)
    def -(x0: Double) = new IVec3D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0)
    def -(sg3: GVec3S) = new IVec3S((x - sg3.x).toShort, (y - sg3.y).toShort, (z - sg3.z).toShort)
    def -(x0: Short, y0: Short, z0: Short) = new IVec3S((x - x0).toShort, (y - y0).toShort, (z - z0).toShort)
    def -(ig3: GVec3I) = new IVec3I((x).toInt - ig3.x, (y).toInt - ig3.y, (z).toInt - ig3.z)
    def -(lg3: GVec3L) = new IVec3L((x).toLong - lg3.x, (y).toLong - lg3.y, (z).toLong - lg3.z)
    def -(fg3: GVec3F) = new IVec3F((x).toFloat - fg3.x, (y).toFloat - fg3.y, (z).toFloat - fg3.z)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (y).toDouble - dg3.y, (z).toDouble - dg3.z)
    def *(x0: Short) = new IVec3S((x * x0).toShort, (y * x0).toShort, (z * x0).toShort)
    def *(x0: Int) = new IVec3I((x).toInt * x0, (y).toInt * x0, (z).toInt * x0)
    def *(x0: Long) = new IVec3L((x).toLong * x0, (y).toLong * x0, (z).toLong * x0)
    def *(x0: Float) = new IVec3F((x).toFloat * x0, (y).toFloat * x0, (z).toFloat * x0)
    def *(x0: Double) = new IVec3D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0)
    def *(sg3: GVec3S) = new IVec3S((x * sg3.x).toShort, (y * sg3.y).toShort, (z * sg3.z).toShort)
    def *(x0: Short, y0: Short, z0: Short) = new IVec3S((x * x0).toShort, (y * y0).toShort, (z * z0).toShort)
    def *(ig3: GVec3I) = new IVec3I((x).toInt * ig3.x, (y).toInt * ig3.y, (z).toInt * ig3.z)
    def *(lg3: GVec3L) = new IVec3L((x).toLong * lg3.x, (y).toLong * lg3.y, (z).toLong * lg3.z)
    def *(fg3: GVec3F) = new IVec3F((x).toFloat * fg3.x, (y).toFloat * fg3.y, (z).toFloat * fg3.z)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (y).toDouble * dg3.y, (z).toDouble * dg3.z)
    def /(x0: Short) = new IVec3S((x / x0).toShort, (y / x0).toShort, (z / x0).toShort)
    def /(x0: Int) = new IVec3I((x).toInt / x0, (y).toInt / x0, (z).toInt / x0)
    def /(x0: Long) = new IVec3L((x).toLong / x0, (y).toLong / x0, (z).toLong / x0)
    def /(x0: Float) = new IVec3F((x).toFloat / x0, (y).toFloat / x0, (z).toFloat / x0)
    def /(x0: Double) = new IVec3D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0)
    def /(sg3: GVec3S) = new IVec3S((x / sg3.x).toShort, (y / sg3.y).toShort, (z / sg3.z).toShort)
    def /(x0: Short, y0: Short, z0: Short) = new IVec3S((x / x0).toShort, (y / y0).toShort, (z / z0).toShort)
    def /(ig3: GVec3I) = new IVec3I((x).toInt / ig3.x, (y).toInt / ig3.y, (z).toInt / ig3.z)
    def /(lg3: GVec3L) = new IVec3L((x).toLong / lg3.x, (y).toLong / lg3.y, (z).toLong / lg3.z)
    def /(fg3: GVec3F) = new IVec3F((x).toFloat / fg3.x, (y).toFloat / fg3.y, (z).toFloat / fg3.z)
    def /(dg3: GVec3D) = new IVec3D((x).toDouble / dg3.x, (y).toDouble / dg3.y, (z).toDouble / dg3.z)
    def cross(sg3: GVec3S) = new IVec3S((y*sg3.z - z*sg3.y).toShort, (z*sg3.x - x*sg3.z).toShort, (x*sg3.y - y*sg3.x).toShort)
    def cross(ig3: GVec3I) = new IVec3I((y).toInt*ig3.z - (z).toInt*ig3.y, (z).toInt*ig3.x - (x).toInt*ig3.z, (x).toInt*ig3.y - (y).toInt*ig3.x)
    def cross(lg3: GVec3L) = new IVec3L((y).toLong*lg3.z - (z).toLong*lg3.y, (z).toLong*lg3.x - (x).toLong*lg3.z, (x).toLong*lg3.y - (y).toLong*lg3.x)
    def cross(fg3: GVec3F) = new IVec3F((y).toFloat*fg3.z - (z).toFloat*fg3.y, (z).toFloat*fg3.x - (x).toFloat*fg3.z, (x).toFloat*fg3.y - (y).toFloat*fg3.x)
    def cross(dg3: GVec3D) = new IVec3D((y).toDouble*dg3.z - (z).toDouble*dg3.y, (z).toDouble*dg3.x - (x).toDouble*dg3.z, (x).toDouble*dg3.y - (y).toDouble*dg3.x)
    def max(x0: Short) = new IVec3S((math.max(x,x0)).toShort, (math.max(y,x0)).toShort, (math.max(z,x0)).toShort)
    def max(x0: Int) = new IVec3I(math.max((x).toInt,x0), math.max((y).toInt,x0), math.max((z).toInt,x0))
    def max(x0: Long) = new IVec3L(math.max((x).toLong,x0), math.max((y).toLong,x0), math.max((z).toLong,x0))
    def max(x0: Float) = new IVec3F(math.max((x).toFloat,x0), math.max((y).toFloat,x0), math.max((z).toFloat,x0))
    def max(x0: Double) = new IVec3D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0))
    def max(sg3: GVec3S) = new IVec3S((math.max(x,sg3.x)).toShort, (math.max(y,sg3.y)).toShort, (math.max(z,sg3.z)).toShort)
    def max(x0: Short, y0: Short, z0: Short) = new IVec3S((math.max(x,x0)).toShort, (math.max(y,y0)).toShort, (math.max(z,z0)).toShort)
    def max(ig3: GVec3I) = new IVec3I(math.max((x).toInt,ig3.x), math.max((y).toInt,ig3.y), math.max((z).toInt,ig3.z))
    def max(lg3: GVec3L) = new IVec3L(math.max((x).toLong,lg3.x), math.max((y).toLong,lg3.y), math.max((z).toLong,lg3.z))
    def max(fg3: GVec3F) = new IVec3F(math.max((x).toFloat,fg3.x), math.max((y).toFloat,fg3.y), math.max((z).toFloat,fg3.z))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((y).toDouble,dg3.y), math.max((z).toDouble,dg3.z))
    def min(x0: Short) = new IVec3S((math.min(x,x0)).toShort, (math.min(y,x0)).toShort, (math.min(z,x0)).toShort)
    def min(x0: Int) = new IVec3I(math.min((x).toInt,x0), math.min((y).toInt,x0), math.min((z).toInt,x0))
    def min(x0: Long) = new IVec3L(math.min((x).toLong,x0), math.min((y).toLong,x0), math.min((z).toLong,x0))
    def min(x0: Float) = new IVec3F(math.min((x).toFloat,x0), math.min((y).toFloat,x0), math.min((z).toFloat,x0))
    def min(x0: Double) = new IVec3D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0))
    def min(sg3: GVec3S) = new IVec3S((math.min(x,sg3.x)).toShort, (math.min(y,sg3.y)).toShort, (math.min(z,sg3.z)).toShort)
    def min(x0: Short, y0: Short, z0: Short) = new IVec3S((math.min(x,x0)).toShort, (math.min(y,y0)).toShort, (math.min(z,z0)).toShort)
    def min(ig3: GVec3I) = new IVec3I(math.min((x).toInt,ig3.x), math.min((y).toInt,ig3.y), math.min((z).toInt,ig3.z))
    def min(lg3: GVec3L) = new IVec3L(math.min((x).toLong,lg3.x), math.min((y).toLong,lg3.y), math.min((z).toLong,lg3.z))
    def min(fg3: GVec3F) = new IVec3F(math.min((x).toFloat,fg3.x), math.min((y).toFloat,fg3.y), math.min((z).toFloat,fg3.z))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((y).toDouble,dg3.y), math.min((z).toDouble,dg3.z))
    def operate(sg3: GVec3S)(fun: (Short,Short)=>Short) = new IVec3S((fun(x,sg3.x)).toShort, (fun(y,sg3.y)).toShort, (fun(z,sg3.z)).toShort)
    def operate(ig3: GVec3I)(fun: (Int,Int)=>Int) = new IVec3I(fun((x).toInt,ig3.x), fun((y).toInt,ig3.y), fun((z).toInt,ig3.z))
    def operate(lg3: GVec3L)(fun: (Long,Long)=>Long) = new IVec3L(fun((x).toLong,lg3.x), fun((y).toLong,lg3.y), fun((z).toLong,lg3.z))
    def operate(fg3: GVec3F)(fun: (Float,Float)=>Float) = new IVec3F(fun((x).toFloat,fg3.x), fun((y).toFloat,fg3.y), fun((z).toFloat,fg3.z))
    def operate(dg3: GVec3D)(fun: (Double,Double)=>Double) = new IVec3D(fun((x).toDouble,dg3.x), fun((y).toDouble,dg3.y), fun((z).toDouble,dg3.z))
    def dot(sg3: GVec3S) = (((x*sg3.x).toShort + (y*sg3.y).toShort).toShort + (z*sg3.z).toShort).toShort
    def dot(ig3: GVec3I) = (x).toInt*ig3.x + (y).toInt*ig3.y + (z).toInt*ig3.z
    def dot(lg3: GVec3L) = (x).toLong*lg3.x + (y).toLong*lg3.y + (z).toLong*lg3.z
    def dot(fg3: GVec3F) = (x).toFloat*fg3.x + (y).toFloat*fg3.y + (z).toFloat*fg3.z
    def dot(dg3: GVec3D) = (x).toDouble*dg3.x + (y).toDouble*dg3.y + (z).toDouble*dg3.z
    final def **(sg3: GVec3S): Short = this.dot(sg3)
    final def **(ig3: GVec3I): Int = this.dot(ig3)
    final def **(lg3: GVec3L): Long = this.dot(lg3)
    final def **(fg3: GVec3F): Float = this.dot(fg3)
    final def **(dg3: GVec3D): Double = this.dot(dg3)
    def dot(x0: Short, y0: Short, z0: Short) = (((x*x0).toShort + (y*y0).toShort).toShort + (z*z0).toShort).toShort
    final def **(x0: Short, y0: Short, z0: Short): Short = this.dot(x0, y0, z0)
    final def unitDot(fg3: GVec3F): Float = (this.dot(fg3) / math.sqrt(lenSq * fg3.lenSq)).toFloat
    final def unitDot(dg3: GVec3D): Double = this.dot(dg3) / math.sqrt(lenSq * dg3.lenSq)
    final def *^*(fg3: GVec3F): Float = this.unitDot(fg3)
    final def *^*(dg3: GVec3D): Double = this.unitDot(dg3)
    def outer(sg3: GVec3S) = new IMat3S((x*sg3.x).toShort, (x*sg3.y).toShort, (x*sg3.z).toShort, (y*sg3.x).toShort, (y*sg3.y).toShort, (y*sg3.z).toShort, (z*sg3.x).toShort, (z*sg3.y).toShort, (z*sg3.z).toShort)
    def outer(ig3: GVec3I) = new IMat3I(x*ig3.x, x*ig3.y, x*ig3.z, y*ig3.x, y*ig3.y, y*ig3.z, z*ig3.x, z*ig3.y, z*ig3.z)
    def outer(lg3: GVec3L) = new IMat3L(x*lg3.x, x*lg3.y, x*lg3.z, y*lg3.x, y*lg3.y, y*lg3.z, z*lg3.x, z*lg3.y, z*lg3.z)
    def outer(fg3: GVec3F) = new IMat3F(x*fg3.x, x*fg3.y, x*fg3.z, y*fg3.x, y*fg3.y, y*fg3.z, z*fg3.x, z*fg3.y, z*fg3.z)
    def outer(dg3: GVec3D) = new IMat3D(x*dg3.x, x*dg3.y, x*dg3.z, y*dg3.x, y*dg3.y, y*dg3.z, z*dg3.x, z*dg3.y, z*dg3.z)
    def distSq(sg3: GVec3S) = ((((x-sg3.x)*(x-sg3.x)).toShort + ((y-sg3.y)*(y-sg3.y)).toShort).toShort + ((z-sg3.z)*(z-sg3.z)).toShort).toShort
    def distSq(ig3: GVec3I) = ((x).toInt-ig3.x)*((x).toInt-ig3.x) + ((y).toInt-ig3.y)*((y).toInt-ig3.y) + ((z).toInt-ig3.z)*((z).toInt-ig3.z)
    def distSq(lg3: GVec3L) = ((x).toLong-lg3.x)*((x).toLong-lg3.x) + ((y).toLong-lg3.y)*((y).toLong-lg3.y) + ((z).toLong-lg3.z)*((z).toLong-lg3.z)
    def distSq(fg3: GVec3F) = ((x).toFloat-fg3.x)*((x).toFloat-fg3.x) + ((y).toFloat-fg3.y)*((y).toFloat-fg3.y) + ((z).toFloat-fg3.z)*((z).toFloat-fg3.z)
    def distSq(dg3: GVec3D) = ((x).toDouble-dg3.x)*((x).toDouble-dg3.x) + ((y).toDouble-dg3.y)*((y).toDouble-dg3.y) + ((z).toDouble-dg3.z)*((z).toDouble-dg3.z)
    final def dist(sg3: GVec3S): Short = (math.round(math.sqrt(this.distSq(sg3)))).toShort
    final def dist(ig3: GVec3I): Int = (math.round(math.sqrt(this.distSq(ig3)))).toInt
    final def dist(lg3: GVec3L): Long = math.round(math.sqrt(this.distSq(lg3)))
    final def dist(fg3: GVec3F): Float = (math.sqrt(this.distSq(fg3))).toFloat
    final def dist(dg3: GVec3D): Double = math.sqrt(this.distSq(dg3))
    def distSq(x0: Short, y0: Short, z0: Short) = ((((x-x0)*(x-x0)).toShort + ((y-y0)*(y-y0)).toShort).toShort + ((z-z0)*(z-z0)).toShort).toShort
    final def dist(x0: Short, y0: Short, z0: Short): Short = (math.round(math.sqrt(this.distSq(x0, y0, z0)))).toShort
    def ===(sg3: GVec3S) = x==sg3.x && y==sg3.y && z==sg3.z
    def ===(x0: Short, y0: Short, z0: Short) = x==x0 && y==y0 && z==z0
    def **(sg33: GMat3S) = new IVec3S((x*sg33.xx+y*sg33.yx+z*sg33.zx).toShort, (x*sg33.xy+y*sg33.yy+z*sg33.zy).toShort, (x*sg33.xz+y*sg33.yz+z*sg33.zz).toShort)
    def **(ig33: GMat3I) = new IVec3I((x).toInt*ig33.xx+(y).toInt*ig33.yx+(z).toInt*ig33.zx, (x).toInt*ig33.xy+(y).toInt*ig33.yy+(z).toInt*ig33.zy, (x).toInt*ig33.xz+(y).toInt*ig33.yz+(z).toInt*ig33.zz)
    def **(lg33: GMat3L) = new IVec3L((x).toLong*lg33.xx+(y).toLong*lg33.yx+(z).toLong*lg33.zx, (x).toLong*lg33.xy+(y).toLong*lg33.yy+(z).toLong*lg33.zy, (x).toLong*lg33.xz+(y).toLong*lg33.yz+(z).toLong*lg33.zz)
    def **(fg33: GMat3F) = new IVec3F((x).toFloat*fg33.xx+(y).toFloat*fg33.yx+(z).toFloat*fg33.zx, (x).toFloat*fg33.xy+(y).toFloat*fg33.yy+(z).toFloat*fg33.zy, (x).toFloat*fg33.xz+(y).toFloat*fg33.yz+(z).toFloat*fg33.zz)
    def **(dg33: GMat3D) = new IVec3D((x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx, (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy, (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz)
  } // class GVec3S

  object GVec3S {
    def apply(x0: Short, y0: Short, z0: Short): GVec3S = new IVec3S(x0, y0, z0)
    def parse(str: String): GVec3S = IVec3S.parse(str)
    val zero: GVec3S = IVec3S.zero
    val xUnit: GVec3S = IVec3S.xUnit
    val yUnit: GVec3S = IVec3S.yUnit
    val zUnit: GVec3S = IVec3S.zUnit
  } // object GVec3S


  abstract class GVec3I extends Cloneable {
    def x: Int
    def y: Int
    def z: Int
    override def toString = "["+x+", "+y+", "+z+"]"
    override def hashCode = ((z)*16777619 ^ y)*16777619 ^ x
    override def equals(any: Any) = any match { case sg3: GVec3S => {x==sg3.x && y==sg3.y && z==sg3.z }; case ig3: GVec3I => {x==ig3.x && y==ig3.y && z==ig3.z }; case lg3: GVec3L => {x==lg3.x && y==lg3.y && z==lg3.z }; case fg3: GVec3F => {x==fg3.x && y==fg3.y && z==fg3.z }; case dg3: GVec3D => {x==dg3.x && y==dg3.y && z==dg3.z }; case _ => false }
    override def clone(): GVec3I = new IVec3I(x, y, z)
    def toS: GVec3S = new IVec3S((x).toShort, (y).toShort, (z).toShort)
    def copy(x0: Int = x, y0: Int = y, z0: Int = z): GVec3I = new IVec3I(x0, y0, z0)
    def trim: GVec2I = new IVec2I(x, y)
    def pad(padding: Int = 1): GVec4I = new IVec4I(x, y, z, padding)
    def mapI(fun: Int => Int) = new IVec3I(fun(x), fun(y), fun(z))
    def toL: GVec3L = new IVec3L((x).toLong, (y).toLong, (z).toLong)
    def mapL(fun: Int => Long) = new IVec3L((fun(x)).toLong, (fun(y)).toLong, (fun(z)).toLong)
    def toF: GVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    def mapF(fun: Int => Float) = new IVec3F((fun(x)).toFloat, (fun(y)).toFloat, (fun(z)).toFloat)
    def toD: GVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def mapD(fun: Int => Double) = new IVec3D((fun(x)).toDouble, (fun(y)).toDouble, (fun(z)).toDouble)
    def imm = new IVec3I(x, y, z)
    def mut = new MVec3I(x, y, z)
    def lenSq = x*x + y*y + z*z
    def unary_-() = new IVec3I(-x, -y, -z)
    def +(x0: Int) = new IVec3I(x + x0, y + x0, z + x0)
    def +(x0: Long) = new IVec3L((x).toLong + x0, (y).toLong + x0, (z).toLong + x0)
    def +(x0: Float) = new IVec3F((x).toFloat + x0, (y).toFloat + x0, (z).toFloat + x0)
    def +(x0: Double) = new IVec3D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0)
    def +(sg3: GVec3S) = new IVec3I(x + (sg3.x).toInt, y + (sg3.y).toInt, z + (sg3.z).toInt)
    def +(ig3: GVec3I) = new IVec3I(x + ig3.x, y + ig3.y, z + ig3.z)
    def +(x0: Int, y0: Int, z0: Int) = new IVec3I(x + x0, y + y0, z + z0)
    def +(lg3: GVec3L) = new IVec3L((x).toLong + lg3.x, (y).toLong + lg3.y, (z).toLong + lg3.z)
    def +(fg3: GVec3F) = new IVec3F((x).toFloat + fg3.x, (y).toFloat + fg3.y, (z).toFloat + fg3.z)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (y).toDouble + dg3.y, (z).toDouble + dg3.z)
    def -(x0: Int) = new IVec3I(x - x0, y - x0, z - x0)
    def -(x0: Long) = new IVec3L((x).toLong - x0, (y).toLong - x0, (z).toLong - x0)
    def -(x0: Float) = new IVec3F((x).toFloat - x0, (y).toFloat - x0, (z).toFloat - x0)
    def -(x0: Double) = new IVec3D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0)
    def -(sg3: GVec3S) = new IVec3I(x - (sg3.x).toInt, y - (sg3.y).toInt, z - (sg3.z).toInt)
    def -(ig3: GVec3I) = new IVec3I(x - ig3.x, y - ig3.y, z - ig3.z)
    def -(x0: Int, y0: Int, z0: Int) = new IVec3I(x - x0, y - y0, z - z0)
    def -(lg3: GVec3L) = new IVec3L((x).toLong - lg3.x, (y).toLong - lg3.y, (z).toLong - lg3.z)
    def -(fg3: GVec3F) = new IVec3F((x).toFloat - fg3.x, (y).toFloat - fg3.y, (z).toFloat - fg3.z)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (y).toDouble - dg3.y, (z).toDouble - dg3.z)
    def *(x0: Int) = new IVec3I(x * x0, y * x0, z * x0)
    def *(x0: Long) = new IVec3L((x).toLong * x0, (y).toLong * x0, (z).toLong * x0)
    def *(x0: Float) = new IVec3F((x).toFloat * x0, (y).toFloat * x0, (z).toFloat * x0)
    def *(x0: Double) = new IVec3D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0)
    def *(sg3: GVec3S) = new IVec3I(x * (sg3.x).toInt, y * (sg3.y).toInt, z * (sg3.z).toInt)
    def *(ig3: GVec3I) = new IVec3I(x * ig3.x, y * ig3.y, z * ig3.z)
    def *(x0: Int, y0: Int, z0: Int) = new IVec3I(x * x0, y * y0, z * z0)
    def *(lg3: GVec3L) = new IVec3L((x).toLong * lg3.x, (y).toLong * lg3.y, (z).toLong * lg3.z)
    def *(fg3: GVec3F) = new IVec3F((x).toFloat * fg3.x, (y).toFloat * fg3.y, (z).toFloat * fg3.z)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (y).toDouble * dg3.y, (z).toDouble * dg3.z)
    def /(x0: Int) = new IVec3I(x / x0, y / x0, z / x0)
    def /(x0: Long) = new IVec3L((x).toLong / x0, (y).toLong / x0, (z).toLong / x0)
    def /(x0: Float) = new IVec3F((x).toFloat / x0, (y).toFloat / x0, (z).toFloat / x0)
    def /(x0: Double) = new IVec3D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0)
    def /(sg3: GVec3S) = new IVec3I(x / (sg3.x).toInt, y / (sg3.y).toInt, z / (sg3.z).toInt)
    def /(ig3: GVec3I) = new IVec3I(x / ig3.x, y / ig3.y, z / ig3.z)
    def /(x0: Int, y0: Int, z0: Int) = new IVec3I(x / x0, y / y0, z / z0)
    def /(lg3: GVec3L) = new IVec3L((x).toLong / lg3.x, (y).toLong / lg3.y, (z).toLong / lg3.z)
    def /(fg3: GVec3F) = new IVec3F((x).toFloat / fg3.x, (y).toFloat / fg3.y, (z).toFloat / fg3.z)
    def /(dg3: GVec3D) = new IVec3D((x).toDouble / dg3.x, (y).toDouble / dg3.y, (z).toDouble / dg3.z)
    def cross(sg3: GVec3S) = new IVec3I(y*(sg3.z).toInt - z*(sg3.y).toInt, z*(sg3.x).toInt - x*(sg3.z).toInt, x*(sg3.y).toInt - y*(sg3.x).toInt)
    def cross(ig3: GVec3I) = new IVec3I(y*ig3.z - z*ig3.y, z*ig3.x - x*ig3.z, x*ig3.y - y*ig3.x)
    def cross(lg3: GVec3L) = new IVec3L((y).toLong*lg3.z - (z).toLong*lg3.y, (z).toLong*lg3.x - (x).toLong*lg3.z, (x).toLong*lg3.y - (y).toLong*lg3.x)
    def cross(fg3: GVec3F) = new IVec3F((y).toFloat*fg3.z - (z).toFloat*fg3.y, (z).toFloat*fg3.x - (x).toFloat*fg3.z, (x).toFloat*fg3.y - (y).toFloat*fg3.x)
    def cross(dg3: GVec3D) = new IVec3D((y).toDouble*dg3.z - (z).toDouble*dg3.y, (z).toDouble*dg3.x - (x).toDouble*dg3.z, (x).toDouble*dg3.y - (y).toDouble*dg3.x)
    def max(x0: Int) = new IVec3I(math.max(x,x0), math.max(y,x0), math.max(z,x0))
    def max(x0: Long) = new IVec3L(math.max((x).toLong,x0), math.max((y).toLong,x0), math.max((z).toLong,x0))
    def max(x0: Float) = new IVec3F(math.max((x).toFloat,x0), math.max((y).toFloat,x0), math.max((z).toFloat,x0))
    def max(x0: Double) = new IVec3D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0))
    def max(sg3: GVec3S) = new IVec3I(math.max(x,(sg3.x).toInt), math.max(y,(sg3.y).toInt), math.max(z,(sg3.z).toInt))
    def max(ig3: GVec3I) = new IVec3I(math.max(x,ig3.x), math.max(y,ig3.y), math.max(z,ig3.z))
    def max(x0: Int, y0: Int, z0: Int) = new IVec3I(math.max(x,x0), math.max(y,y0), math.max(z,z0))
    def max(lg3: GVec3L) = new IVec3L(math.max((x).toLong,lg3.x), math.max((y).toLong,lg3.y), math.max((z).toLong,lg3.z))
    def max(fg3: GVec3F) = new IVec3F(math.max((x).toFloat,fg3.x), math.max((y).toFloat,fg3.y), math.max((z).toFloat,fg3.z))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((y).toDouble,dg3.y), math.max((z).toDouble,dg3.z))
    def min(x0: Int) = new IVec3I(math.min(x,x0), math.min(y,x0), math.min(z,x0))
    def min(x0: Long) = new IVec3L(math.min((x).toLong,x0), math.min((y).toLong,x0), math.min((z).toLong,x0))
    def min(x0: Float) = new IVec3F(math.min((x).toFloat,x0), math.min((y).toFloat,x0), math.min((z).toFloat,x0))
    def min(x0: Double) = new IVec3D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0))
    def min(sg3: GVec3S) = new IVec3I(math.min(x,(sg3.x).toInt), math.min(y,(sg3.y).toInt), math.min(z,(sg3.z).toInt))
    def min(ig3: GVec3I) = new IVec3I(math.min(x,ig3.x), math.min(y,ig3.y), math.min(z,ig3.z))
    def min(x0: Int, y0: Int, z0: Int) = new IVec3I(math.min(x,x0), math.min(y,y0), math.min(z,z0))
    def min(lg3: GVec3L) = new IVec3L(math.min((x).toLong,lg3.x), math.min((y).toLong,lg3.y), math.min((z).toLong,lg3.z))
    def min(fg3: GVec3F) = new IVec3F(math.min((x).toFloat,fg3.x), math.min((y).toFloat,fg3.y), math.min((z).toFloat,fg3.z))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((y).toDouble,dg3.y), math.min((z).toDouble,dg3.z))
    def operate(sg3: GVec3S)(fun: (Int,Int)=>Int) = new IVec3I(fun(x,(sg3.x).toInt), fun(y,(sg3.y).toInt), fun(z,(sg3.z).toInt))
    def operate(ig3: GVec3I)(fun: (Int,Int)=>Int) = new IVec3I(fun(x,ig3.x), fun(y,ig3.y), fun(z,ig3.z))
    def operate(lg3: GVec3L)(fun: (Long,Long)=>Long) = new IVec3L(fun((x).toLong,lg3.x), fun((y).toLong,lg3.y), fun((z).toLong,lg3.z))
    def operate(fg3: GVec3F)(fun: (Float,Float)=>Float) = new IVec3F(fun((x).toFloat,fg3.x), fun((y).toFloat,fg3.y), fun((z).toFloat,fg3.z))
    def operate(dg3: GVec3D)(fun: (Double,Double)=>Double) = new IVec3D(fun((x).toDouble,dg3.x), fun((y).toDouble,dg3.y), fun((z).toDouble,dg3.z))
    def dot(sg3: GVec3S) = x*(sg3.x).toInt + y*(sg3.y).toInt + z*(sg3.z).toInt
    def dot(ig3: GVec3I) = x*ig3.x + y*ig3.y + z*ig3.z
    def dot(lg3: GVec3L) = (x).toLong*lg3.x + (y).toLong*lg3.y + (z).toLong*lg3.z
    def dot(fg3: GVec3F) = (x).toFloat*fg3.x + (y).toFloat*fg3.y + (z).toFloat*fg3.z
    def dot(dg3: GVec3D) = (x).toDouble*dg3.x + (y).toDouble*dg3.y + (z).toDouble*dg3.z
    final def **(sg3: GVec3S): Int = this.dot(sg3)
    final def **(ig3: GVec3I): Int = this.dot(ig3)
    final def **(lg3: GVec3L): Long = this.dot(lg3)
    final def **(fg3: GVec3F): Float = this.dot(fg3)
    final def **(dg3: GVec3D): Double = this.dot(dg3)
    def dot(x0: Int, y0: Int, z0: Int) = x*x0 + y*y0 + z*z0
    final def **(x0: Int, y0: Int, z0: Int): Int = this.dot(x0, y0, z0)
    final def unitDot(fg3: GVec3F): Float = (this.dot(fg3) / math.sqrt(lenSq * fg3.lenSq)).toFloat
    final def unitDot(dg3: GVec3D): Double = this.dot(dg3) / math.sqrt(lenSq * dg3.lenSq)
    final def *^*(fg3: GVec3F): Float = this.unitDot(fg3)
    final def *^*(dg3: GVec3D): Double = this.unitDot(dg3)
    def fold(zero: Int)(fun: (Int,Int)=>Int) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Long)(fun: (Long,Int)=>Long) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Float)(fun: (Float,Int)=>Float) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Double)(fun: (Double,Int)=>Double) = fun(fun(fun(zero,x),y),z)
    def reduce(fun: (Int,Int)=>Int) = fun(fun(x,y),z)
    def outer(sg3: GVec3S) = new IMat3I(x*sg3.x, x*sg3.y, x*sg3.z, y*sg3.x, y*sg3.y, y*sg3.z, z*sg3.x, z*sg3.y, z*sg3.z)
    def outer(ig3: GVec3I) = new IMat3I(x*ig3.x, x*ig3.y, x*ig3.z, y*ig3.x, y*ig3.y, y*ig3.z, z*ig3.x, z*ig3.y, z*ig3.z)
    def outer(lg3: GVec3L) = new IMat3L(x*lg3.x, x*lg3.y, x*lg3.z, y*lg3.x, y*lg3.y, y*lg3.z, z*lg3.x, z*lg3.y, z*lg3.z)
    def outer(fg3: GVec3F) = new IMat3F(x*fg3.x, x*fg3.y, x*fg3.z, y*fg3.x, y*fg3.y, y*fg3.z, z*fg3.x, z*fg3.y, z*fg3.z)
    def outer(dg3: GVec3D) = new IMat3D(x*dg3.x, x*dg3.y, x*dg3.z, y*dg3.x, y*dg3.y, y*dg3.z, z*dg3.x, z*dg3.y, z*dg3.z)
    def distSq(sg3: GVec3S) = (x-(sg3.x).toInt)*(x-(sg3.x).toInt) + (y-(sg3.y).toInt)*(y-(sg3.y).toInt) + (z-(sg3.z).toInt)*(z-(sg3.z).toInt)
    def distSq(ig3: GVec3I) = (x-ig3.x)*(x-ig3.x) + (y-ig3.y)*(y-ig3.y) + (z-ig3.z)*(z-ig3.z)
    def distSq(lg3: GVec3L) = ((x).toLong-lg3.x)*((x).toLong-lg3.x) + ((y).toLong-lg3.y)*((y).toLong-lg3.y) + ((z).toLong-lg3.z)*((z).toLong-lg3.z)
    def distSq(fg3: GVec3F) = ((x).toFloat-fg3.x)*((x).toFloat-fg3.x) + ((y).toFloat-fg3.y)*((y).toFloat-fg3.y) + ((z).toFloat-fg3.z)*((z).toFloat-fg3.z)
    def distSq(dg3: GVec3D) = ((x).toDouble-dg3.x)*((x).toDouble-dg3.x) + ((y).toDouble-dg3.y)*((y).toDouble-dg3.y) + ((z).toDouble-dg3.z)*((z).toDouble-dg3.z)
    final def dist(sg3: GVec3S): Int = (math.round(math.sqrt(this.distSq(sg3)))).toInt
    final def dist(ig3: GVec3I): Int = (math.round(math.sqrt(this.distSq(ig3)))).toInt
    final def dist(lg3: GVec3L): Long = math.round(math.sqrt(this.distSq(lg3)))
    final def dist(fg3: GVec3F): Float = (math.sqrt(this.distSq(fg3))).toFloat
    final def dist(dg3: GVec3D): Double = math.sqrt(this.distSq(dg3))
    def distSq(x0: Int, y0: Int, z0: Int) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0)
    final def dist(x0: Int, y0: Int, z0: Int): Int = (math.round(math.sqrt(this.distSq(x0, y0, z0)))).toInt
    def ===(ig3: GVec3I) = x==ig3.x && y==ig3.y && z==ig3.z
    def ===(x0: Int, y0: Int, z0: Int) = x==x0 && y==y0 && z==z0
    def **(sg33: GMat3S) = new IVec3I(x*(sg33.xx).toInt+y*(sg33.yx).toInt+z*(sg33.zx).toInt, x*(sg33.xy).toInt+y*(sg33.yy).toInt+z*(sg33.zy).toInt, x*(sg33.xz).toInt+y*(sg33.yz).toInt+z*(sg33.zz).toInt)
    def **(ig33: GMat3I) = new IVec3I(x*ig33.xx+y*ig33.yx+z*ig33.zx, x*ig33.xy+y*ig33.yy+z*ig33.zy, x*ig33.xz+y*ig33.yz+z*ig33.zz)
    def **(lg33: GMat3L) = new IVec3L((x).toLong*lg33.xx+(y).toLong*lg33.yx+(z).toLong*lg33.zx, (x).toLong*lg33.xy+(y).toLong*lg33.yy+(z).toLong*lg33.zy, (x).toLong*lg33.xz+(y).toLong*lg33.yz+(z).toLong*lg33.zz)
    def **(fg33: GMat3F) = new IVec3F((x).toFloat*fg33.xx+(y).toFloat*fg33.yx+(z).toFloat*fg33.zx, (x).toFloat*fg33.xy+(y).toFloat*fg33.yy+(z).toFloat*fg33.zy, (x).toFloat*fg33.xz+(y).toFloat*fg33.yz+(z).toFloat*fg33.zz)
    def **(dg33: GMat3D) = new IVec3D((x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx, (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy, (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz)
  } // class GVec3I

  object GVec3I {
    def apply(x0: Int, y0: Int, z0: Int): GVec3I = new IVec3I(x0, y0, z0)
    def parse(str: String): GVec3I = IVec3I.parse(str)
    val zero: GVec3I = IVec3I.zero
    val xUnit: GVec3I = IVec3I.xUnit
    val yUnit: GVec3I = IVec3I.yUnit
    val zUnit: GVec3I = IVec3I.zUnit
  } // object GVec3I


  abstract class GVec3L extends Cloneable {
    def x: Long
    def y: Long
    def z: Long
    override def toString = "["+x+", "+y+", "+z+"]"
    override def hashCode = ((z.##)*16777619 ^ y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg3: GVec3S => {x==sg3.x && y==sg3.y && z==sg3.z }; case ig3: GVec3I => {x==ig3.x && y==ig3.y && z==ig3.z }; case lg3: GVec3L => {x==lg3.x && y==lg3.y && z==lg3.z }; case fg3: GVec3F => {x==fg3.x && y==fg3.y && z==fg3.z }; case dg3: GVec3D => {x==dg3.x && y==dg3.y && z==dg3.z }; case _ => false }
    override def clone(): GVec3L = new IVec3L(x, y, z)
    def toS: GVec3S = new IVec3S((x).toShort, (y).toShort, (z).toShort)
    def toI: GVec3I = new IVec3I((x).toInt, (y).toInt, (z).toInt)
    def mapI(fun: Long => Int) = new IVec3I((fun(x)).toInt, (fun(y)).toInt, (fun(z)).toInt)
    def copy(x0: Long = x, y0: Long = y, z0: Long = z): GVec3L = new IVec3L(x0, y0, z0)
    def trim: GVec2L = new IVec2L(x, y)
    def pad(padding: Long = 1): GVec4L = new IVec4L(x, y, z, padding)
    def mapL(fun: Long => Long) = new IVec3L(fun(x), fun(y), fun(z))
    def toF: GVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    def mapF(fun: Long => Float) = new IVec3F((fun(x)).toFloat, (fun(y)).toFloat, (fun(z)).toFloat)
    def toD: GVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def mapD(fun: Long => Double) = new IVec3D((fun(x)).toDouble, (fun(y)).toDouble, (fun(z)).toDouble)
    def imm = new IVec3L(x, y, z)
    def mut = new MVec3L(x, y, z)
    def lenSq = x*x + y*y + z*z
    def unary_-() = new IVec3L(-x, -y, -z)
    def +(x0: Long) = new IVec3L(x + x0, y + x0, z + x0)
    def +(x0: Double) = new IVec3D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0)
    def +(sg3: GVec3S) = new IVec3L(x + (sg3.x).toLong, y + (sg3.y).toLong, z + (sg3.z).toLong)
    def +(ig3: GVec3I) = new IVec3L(x + (ig3.x).toLong, y + (ig3.y).toLong, z + (ig3.z).toLong)
    def +(lg3: GVec3L) = new IVec3L(x + lg3.x, y + lg3.y, z + lg3.z)
    def +(x0: Long, y0: Long, z0: Long) = new IVec3L(x + x0, y + y0, z + z0)
    def +(fg3: GVec3F) = new IVec3D((x).toDouble + (fg3.x).toDouble, (y).toDouble + (fg3.y).toDouble, (z).toDouble + (fg3.z).toDouble)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (y).toDouble + dg3.y, (z).toDouble + dg3.z)
    def -(x0: Long) = new IVec3L(x - x0, y - x0, z - x0)
    def -(x0: Double) = new IVec3D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0)
    def -(sg3: GVec3S) = new IVec3L(x - (sg3.x).toLong, y - (sg3.y).toLong, z - (sg3.z).toLong)
    def -(ig3: GVec3I) = new IVec3L(x - (ig3.x).toLong, y - (ig3.y).toLong, z - (ig3.z).toLong)
    def -(lg3: GVec3L) = new IVec3L(x - lg3.x, y - lg3.y, z - lg3.z)
    def -(x0: Long, y0: Long, z0: Long) = new IVec3L(x - x0, y - y0, z - z0)
    def -(fg3: GVec3F) = new IVec3D((x).toDouble - (fg3.x).toDouble, (y).toDouble - (fg3.y).toDouble, (z).toDouble - (fg3.z).toDouble)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (y).toDouble - dg3.y, (z).toDouble - dg3.z)
    def *(x0: Long) = new IVec3L(x * x0, y * x0, z * x0)
    def *(x0: Double) = new IVec3D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0)
    def *(sg3: GVec3S) = new IVec3L(x * (sg3.x).toLong, y * (sg3.y).toLong, z * (sg3.z).toLong)
    def *(ig3: GVec3I) = new IVec3L(x * (ig3.x).toLong, y * (ig3.y).toLong, z * (ig3.z).toLong)
    def *(lg3: GVec3L) = new IVec3L(x * lg3.x, y * lg3.y, z * lg3.z)
    def *(x0: Long, y0: Long, z0: Long) = new IVec3L(x * x0, y * y0, z * z0)
    def *(fg3: GVec3F) = new IVec3D((x).toDouble * (fg3.x).toDouble, (y).toDouble * (fg3.y).toDouble, (z).toDouble * (fg3.z).toDouble)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (y).toDouble * dg3.y, (z).toDouble * dg3.z)
    def /(x0: Long) = new IVec3L(x / x0, y / x0, z / x0)
    def /(x0: Double) = new IVec3D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0)
    def /(sg3: GVec3S) = new IVec3L(x / (sg3.x).toLong, y / (sg3.y).toLong, z / (sg3.z).toLong)
    def /(ig3: GVec3I) = new IVec3L(x / (ig3.x).toLong, y / (ig3.y).toLong, z / (ig3.z).toLong)
    def /(lg3: GVec3L) = new IVec3L(x / lg3.x, y / lg3.y, z / lg3.z)
    def /(x0: Long, y0: Long, z0: Long) = new IVec3L(x / x0, y / y0, z / z0)
    def /(fg3: GVec3F) = new IVec3D((x).toDouble / (fg3.x).toDouble, (y).toDouble / (fg3.y).toDouble, (z).toDouble / (fg3.z).toDouble)
    def /(dg3: GVec3D) = new IVec3D((x).toDouble / dg3.x, (y).toDouble / dg3.y, (z).toDouble / dg3.z)
    def cross(sg3: GVec3S) = new IVec3L(y*(sg3.z).toLong - z*(sg3.y).toLong, z*(sg3.x).toLong - x*(sg3.z).toLong, x*(sg3.y).toLong - y*(sg3.x).toLong)
    def cross(ig3: GVec3I) = new IVec3L(y*(ig3.z).toLong - z*(ig3.y).toLong, z*(ig3.x).toLong - x*(ig3.z).toLong, x*(ig3.y).toLong - y*(ig3.x).toLong)
    def cross(lg3: GVec3L) = new IVec3L(y*lg3.z - z*lg3.y, z*lg3.x - x*lg3.z, x*lg3.y - y*lg3.x)
    def cross(fg3: GVec3F) = new IVec3D((y).toDouble*(fg3.z).toDouble - (z).toDouble*(fg3.y).toDouble, (z).toDouble*(fg3.x).toDouble - (x).toDouble*(fg3.z).toDouble, (x).toDouble*(fg3.y).toDouble - (y).toDouble*(fg3.x).toDouble)
    def cross(dg3: GVec3D) = new IVec3D((y).toDouble*dg3.z - (z).toDouble*dg3.y, (z).toDouble*dg3.x - (x).toDouble*dg3.z, (x).toDouble*dg3.y - (y).toDouble*dg3.x)
    def max(x0: Long) = new IVec3L(math.max(x,x0), math.max(y,x0), math.max(z,x0))
    def max(x0: Double) = new IVec3D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0))
    def max(sg3: GVec3S) = new IVec3L(math.max(x,(sg3.x).toLong), math.max(y,(sg3.y).toLong), math.max(z,(sg3.z).toLong))
    def max(ig3: GVec3I) = new IVec3L(math.max(x,(ig3.x).toLong), math.max(y,(ig3.y).toLong), math.max(z,(ig3.z).toLong))
    def max(lg3: GVec3L) = new IVec3L(math.max(x,lg3.x), math.max(y,lg3.y), math.max(z,lg3.z))
    def max(x0: Long, y0: Long, z0: Long) = new IVec3L(math.max(x,x0), math.max(y,y0), math.max(z,z0))
    def max(fg3: GVec3F) = new IVec3D(math.max((x).toDouble,(fg3.x).toDouble), math.max((y).toDouble,(fg3.y).toDouble), math.max((z).toDouble,(fg3.z).toDouble))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((y).toDouble,dg3.y), math.max((z).toDouble,dg3.z))
    def min(x0: Long) = new IVec3L(math.min(x,x0), math.min(y,x0), math.min(z,x0))
    def min(x0: Double) = new IVec3D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0))
    def min(sg3: GVec3S) = new IVec3L(math.min(x,(sg3.x).toLong), math.min(y,(sg3.y).toLong), math.min(z,(sg3.z).toLong))
    def min(ig3: GVec3I) = new IVec3L(math.min(x,(ig3.x).toLong), math.min(y,(ig3.y).toLong), math.min(z,(ig3.z).toLong))
    def min(lg3: GVec3L) = new IVec3L(math.min(x,lg3.x), math.min(y,lg3.y), math.min(z,lg3.z))
    def min(x0: Long, y0: Long, z0: Long) = new IVec3L(math.min(x,x0), math.min(y,y0), math.min(z,z0))
    def min(fg3: GVec3F) = new IVec3D(math.min((x).toDouble,(fg3.x).toDouble), math.min((y).toDouble,(fg3.y).toDouble), math.min((z).toDouble,(fg3.z).toDouble))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((y).toDouble,dg3.y), math.min((z).toDouble,dg3.z))
    def operate(sg3: GVec3S)(fun: (Long,Long)=>Long) = new IVec3L(fun(x,(sg3.x).toLong), fun(y,(sg3.y).toLong), fun(z,(sg3.z).toLong))
    def operate(ig3: GVec3I)(fun: (Long,Long)=>Long) = new IVec3L(fun(x,(ig3.x).toLong), fun(y,(ig3.y).toLong), fun(z,(ig3.z).toLong))
    def operate(lg3: GVec3L)(fun: (Long,Long)=>Long) = new IVec3L(fun(x,lg3.x), fun(y,lg3.y), fun(z,lg3.z))
    def operate(fg3: GVec3F)(fun: (Double,Double)=>Double) = new IVec3D(fun((x).toDouble,(fg3.x).toDouble), fun((y).toDouble,(fg3.y).toDouble), fun((z).toDouble,(fg3.z).toDouble))
    def operate(dg3: GVec3D)(fun: (Double,Double)=>Double) = new IVec3D(fun((x).toDouble,dg3.x), fun((y).toDouble,dg3.y), fun((z).toDouble,dg3.z))
    def dot(sg3: GVec3S) = x*(sg3.x).toLong + y*(sg3.y).toLong + z*(sg3.z).toLong
    def dot(ig3: GVec3I) = x*(ig3.x).toLong + y*(ig3.y).toLong + z*(ig3.z).toLong
    def dot(lg3: GVec3L) = x*lg3.x + y*lg3.y + z*lg3.z
    def dot(fg3: GVec3F) = (x).toDouble*(fg3.x).toDouble + (y).toDouble*(fg3.y).toDouble + (z).toDouble*(fg3.z).toDouble
    def dot(dg3: GVec3D) = (x).toDouble*dg3.x + (y).toDouble*dg3.y + (z).toDouble*dg3.z
    final def **(sg3: GVec3S): Long = this.dot(sg3)
    final def **(ig3: GVec3I): Long = this.dot(ig3)
    final def **(lg3: GVec3L): Long = this.dot(lg3)
    final def **(fg3: GVec3F): Double = this.dot(fg3)
    final def **(dg3: GVec3D): Double = this.dot(dg3)
    def dot(x0: Long, y0: Long, z0: Long) = x*x0 + y*y0 + z*z0
    final def **(x0: Long, y0: Long, z0: Long): Long = this.dot(x0, y0, z0)
    final def unitDot(fg3: GVec3F): Double = this.dot(fg3) / math.sqrt(lenSq * fg3.lenSq)
    final def unitDot(dg3: GVec3D): Double = this.dot(dg3) / math.sqrt(lenSq * dg3.lenSq)
    final def *^*(fg3: GVec3F): Double = this.unitDot(fg3)
    final def *^*(dg3: GVec3D): Double = this.unitDot(dg3)
    def fold(zero: Int)(fun: (Int,Long)=>Int) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Long)(fun: (Long,Long)=>Long) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Float)(fun: (Float,Long)=>Float) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Double)(fun: (Double,Long)=>Double) = fun(fun(fun(zero,x),y),z)
    def reduce(fun: (Long,Long)=>Long) = fun(fun(x,y),z)
    def outer(sg3: GVec3S) = new IMat3L(x*sg3.x, x*sg3.y, x*sg3.z, y*sg3.x, y*sg3.y, y*sg3.z, z*sg3.x, z*sg3.y, z*sg3.z)
    def outer(ig3: GVec3I) = new IMat3L(x*ig3.x, x*ig3.y, x*ig3.z, y*ig3.x, y*ig3.y, y*ig3.z, z*ig3.x, z*ig3.y, z*ig3.z)
    def outer(lg3: GVec3L) = new IMat3L(x*lg3.x, x*lg3.y, x*lg3.z, y*lg3.x, y*lg3.y, y*lg3.z, z*lg3.x, z*lg3.y, z*lg3.z)
    def outer(fg3: GVec3F) = new IMat3D(x*fg3.x, x*fg3.y, x*fg3.z, y*fg3.x, y*fg3.y, y*fg3.z, z*fg3.x, z*fg3.y, z*fg3.z)
    def outer(dg3: GVec3D) = new IMat3D(x*dg3.x, x*dg3.y, x*dg3.z, y*dg3.x, y*dg3.y, y*dg3.z, z*dg3.x, z*dg3.y, z*dg3.z)
    def distSq(sg3: GVec3S) = (x-(sg3.x).toLong)*(x-(sg3.x).toLong) + (y-(sg3.y).toLong)*(y-(sg3.y).toLong) + (z-(sg3.z).toLong)*(z-(sg3.z).toLong)
    def distSq(ig3: GVec3I) = (x-(ig3.x).toLong)*(x-(ig3.x).toLong) + (y-(ig3.y).toLong)*(y-(ig3.y).toLong) + (z-(ig3.z).toLong)*(z-(ig3.z).toLong)
    def distSq(lg3: GVec3L) = (x-lg3.x)*(x-lg3.x) + (y-lg3.y)*(y-lg3.y) + (z-lg3.z)*(z-lg3.z)
    def distSq(fg3: GVec3F) = ((x).toDouble-(fg3.x).toDouble)*((x).toDouble-(fg3.x).toDouble) + ((y).toDouble-(fg3.y).toDouble)*((y).toDouble-(fg3.y).toDouble) + ((z).toDouble-(fg3.z).toDouble)*((z).toDouble-(fg3.z).toDouble)
    def distSq(dg3: GVec3D) = ((x).toDouble-dg3.x)*((x).toDouble-dg3.x) + ((y).toDouble-dg3.y)*((y).toDouble-dg3.y) + ((z).toDouble-dg3.z)*((z).toDouble-dg3.z)
    final def dist(sg3: GVec3S): Long = math.round(math.sqrt(this.distSq(sg3)))
    final def dist(ig3: GVec3I): Long = math.round(math.sqrt(this.distSq(ig3)))
    final def dist(lg3: GVec3L): Long = math.round(math.sqrt(this.distSq(lg3)))
    final def dist(fg3: GVec3F): Double = math.sqrt(this.distSq(fg3))
    final def dist(dg3: GVec3D): Double = math.sqrt(this.distSq(dg3))
    def distSq(x0: Long, y0: Long, z0: Long) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0)
    final def dist(x0: Long, y0: Long, z0: Long): Long = math.round(math.sqrt(this.distSq(x0, y0, z0)))
    def ===(lg3: GVec3L) = x==lg3.x && y==lg3.y && z==lg3.z
    def ===(x0: Long, y0: Long, z0: Long) = x==x0 && y==y0 && z==z0
    def **(sg33: GMat3S) = new IVec3L(x*(sg33.xx).toLong+y*(sg33.yx).toLong+z*(sg33.zx).toLong, x*(sg33.xy).toLong+y*(sg33.yy).toLong+z*(sg33.zy).toLong, x*(sg33.xz).toLong+y*(sg33.yz).toLong+z*(sg33.zz).toLong)
    def **(ig33: GMat3I) = new IVec3L(x*(ig33.xx).toLong+y*(ig33.yx).toLong+z*(ig33.zx).toLong, x*(ig33.xy).toLong+y*(ig33.yy).toLong+z*(ig33.zy).toLong, x*(ig33.xz).toLong+y*(ig33.yz).toLong+z*(ig33.zz).toLong)
    def **(lg33: GMat3L) = new IVec3L(x*lg33.xx+y*lg33.yx+z*lg33.zx, x*lg33.xy+y*lg33.yy+z*lg33.zy, x*lg33.xz+y*lg33.yz+z*lg33.zz)
    def **(fg33: GMat3F) = new IVec3D((x).toDouble*(fg33.xx).toDouble+(y).toDouble*(fg33.yx).toDouble+(z).toDouble*(fg33.zx).toDouble, (x).toDouble*(fg33.xy).toDouble+(y).toDouble*(fg33.yy).toDouble+(z).toDouble*(fg33.zy).toDouble, (x).toDouble*(fg33.xz).toDouble+(y).toDouble*(fg33.yz).toDouble+(z).toDouble*(fg33.zz).toDouble)
    def **(dg33: GMat3D) = new IVec3D((x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx, (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy, (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz)
  } // class GVec3L

  object GVec3L {
    def apply(x0: Long, y0: Long, z0: Long): GVec3L = new IVec3L(x0, y0, z0)
    def parse(str: String): GVec3L = IVec3L.parse(str)
    val zero: GVec3L = IVec3L.zero
    val xUnit: GVec3L = IVec3L.xUnit
    val yUnit: GVec3L = IVec3L.yUnit
    val zUnit: GVec3L = IVec3L.zUnit
  } // object GVec3L


  abstract class GVec3F extends Cloneable {
    def x: Float
    def y: Float
    def z: Float
    override def toString = "["+x+", "+y+", "+z+"]"
    override def hashCode = ((z.##)*16777619 ^ y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg3: GVec3S => {x==sg3.x && y==sg3.y && z==sg3.z }; case ig3: GVec3I => {x==ig3.x && y==ig3.y && z==ig3.z }; case lg3: GVec3L => {x==lg3.x && y==lg3.y && z==lg3.z }; case fg3: GVec3F => {x==fg3.x && y==fg3.y && z==fg3.z }; case dg3: GVec3D => {x==dg3.x && y==dg3.y && z==dg3.z }; case _ => false }
    override def clone(): GVec3F = new IVec3F(x, y, z)
    def toS: GVec3S = new IVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    def toI: GVec3I = new IVec3I(math.round(x), math.round(y), math.round(z))
    def mapI(fun: Float => Int) = new IVec3I(math.round(fun(x)), math.round(fun(y)), math.round(fun(z)))
    def toL: GVec3L = new IVec3L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble))
    def mapL(fun: Float => Long) = new IVec3L(math.round((fun(x)).toDouble), math.round((fun(y)).toDouble), math.round((fun(z)).toDouble))
    def copy(x0: Float = x, y0: Float = y, z0: Float = z): GVec3F = new IVec3F(x0, y0, z0)
    def trim: GVec2F = new IVec2F(x, y)
    def pad(padding: Float = 1): GVec4F = new IVec4F(x, y, z, padding)
    def mapF(fun: Float => Float) = new IVec3F(fun(x), fun(y), fun(z))
    def toD: GVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def mapD(fun: Float => Double) = new IVec3D((fun(x)).toDouble, (fun(y)).toDouble, (fun(z)).toDouble)
    def imm = new IVec3F(x, y, z)
    def mut = new MVec3F(x, y, z)
    def lenSq = x*x + y*y + z*z
    final def len = (math.sqrt(lenSq)).toFloat
    def inclination = (math.acos(z/math.sqrt(x*x + y*y + z*z))).toFloat
    def azimuth = (math.atan2(y,x)).toFloat
    def unary_-() = new IVec3F(-x, -y, -z)
    def norm = { val k0 = 1/this.len; new IVec3F(x*k0, y*k0, z*k0) }
    def +(x0: Long) = new IVec3D((x).toDouble + (x0).toDouble, (y).toDouble + (x0).toDouble, (z).toDouble + (x0).toDouble)
    def +(x0: Float) = new IVec3F(x + x0, y + x0, z + x0)
    def +(x0: Double) = new IVec3D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0)
    def +(sg3: GVec3S) = new IVec3F(x + (sg3.x).toFloat, y + (sg3.y).toFloat, z + (sg3.z).toFloat)
    def +(ig3: GVec3I) = new IVec3F(x + (ig3.x).toFloat, y + (ig3.y).toFloat, z + (ig3.z).toFloat)
    def +(lg3: GVec3L) = new IVec3D((x).toDouble + (lg3.x).toDouble, (y).toDouble + (lg3.y).toDouble, (z).toDouble + (lg3.z).toDouble)
    def +(fg3: GVec3F) = new IVec3F(x + fg3.x, y + fg3.y, z + fg3.z)
    def +(x0: Float, y0: Float, z0: Float) = new IVec3F(x + x0, y + y0, z + z0)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (y).toDouble + dg3.y, (z).toDouble + dg3.z)
    def -(x0: Long) = new IVec3D((x).toDouble - (x0).toDouble, (y).toDouble - (x0).toDouble, (z).toDouble - (x0).toDouble)
    def -(x0: Float) = new IVec3F(x - x0, y - x0, z - x0)
    def -(x0: Double) = new IVec3D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0)
    def -(sg3: GVec3S) = new IVec3F(x - (sg3.x).toFloat, y - (sg3.y).toFloat, z - (sg3.z).toFloat)
    def -(ig3: GVec3I) = new IVec3F(x - (ig3.x).toFloat, y - (ig3.y).toFloat, z - (ig3.z).toFloat)
    def -(lg3: GVec3L) = new IVec3D((x).toDouble - (lg3.x).toDouble, (y).toDouble - (lg3.y).toDouble, (z).toDouble - (lg3.z).toDouble)
    def -(fg3: GVec3F) = new IVec3F(x - fg3.x, y - fg3.y, z - fg3.z)
    def -(x0: Float, y0: Float, z0: Float) = new IVec3F(x - x0, y - y0, z - z0)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (y).toDouble - dg3.y, (z).toDouble - dg3.z)
    def *(x0: Long) = new IVec3D((x).toDouble * (x0).toDouble, (y).toDouble * (x0).toDouble, (z).toDouble * (x0).toDouble)
    def *(x0: Float) = new IVec3F(x * x0, y * x0, z * x0)
    def *(x0: Double) = new IVec3D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0)
    def *(sg3: GVec3S) = new IVec3F(x * (sg3.x).toFloat, y * (sg3.y).toFloat, z * (sg3.z).toFloat)
    def *(ig3: GVec3I) = new IVec3F(x * (ig3.x).toFloat, y * (ig3.y).toFloat, z * (ig3.z).toFloat)
    def *(lg3: GVec3L) = new IVec3D((x).toDouble * (lg3.x).toDouble, (y).toDouble * (lg3.y).toDouble, (z).toDouble * (lg3.z).toDouble)
    def *(fg3: GVec3F) = new IVec3F(x * fg3.x, y * fg3.y, z * fg3.z)
    def *(x0: Float, y0: Float, z0: Float) = new IVec3F(x * x0, y * y0, z * z0)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (y).toDouble * dg3.y, (z).toDouble * dg3.z)
    def /(x0: Long) = new IVec3D((x).toDouble / (x0).toDouble, (y).toDouble / (x0).toDouble, (z).toDouble / (x0).toDouble)
    def /(x0: Float) = new IVec3F(x / x0, y / x0, z / x0)
    def /(x0: Double) = new IVec3D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0)
    def /(sg3: GVec3S) = new IVec3F(x / (sg3.x).toFloat, y / (sg3.y).toFloat, z / (sg3.z).toFloat)
    def /(ig3: GVec3I) = new IVec3F(x / (ig3.x).toFloat, y / (ig3.y).toFloat, z / (ig3.z).toFloat)
    def /(lg3: GVec3L) = new IVec3D((x).toDouble / (lg3.x).toDouble, (y).toDouble / (lg3.y).toDouble, (z).toDouble / (lg3.z).toDouble)
    def /(fg3: GVec3F) = new IVec3F(x / fg3.x, y / fg3.y, z / fg3.z)
    def /(x0: Float, y0: Float, z0: Float) = new IVec3F(x / x0, y / y0, z / z0)
    def /(dg3: GVec3D) = new IVec3D((x).toDouble / dg3.x, (y).toDouble / dg3.y, (z).toDouble / dg3.z)
    def cross(sg3: GVec3S) = new IVec3F(y*(sg3.z).toFloat - z*(sg3.y).toFloat, z*(sg3.x).toFloat - x*(sg3.z).toFloat, x*(sg3.y).toFloat - y*(sg3.x).toFloat)
    def cross(ig3: GVec3I) = new IVec3F(y*(ig3.z).toFloat - z*(ig3.y).toFloat, z*(ig3.x).toFloat - x*(ig3.z).toFloat, x*(ig3.y).toFloat - y*(ig3.x).toFloat)
    def cross(lg3: GVec3L) = new IVec3D((y).toDouble*(lg3.z).toDouble - (z).toDouble*(lg3.y).toDouble, (z).toDouble*(lg3.x).toDouble - (x).toDouble*(lg3.z).toDouble, (x).toDouble*(lg3.y).toDouble - (y).toDouble*(lg3.x).toDouble)
    def cross(fg3: GVec3F) = new IVec3F(y*fg3.z - z*fg3.y, z*fg3.x - x*fg3.z, x*fg3.y - y*fg3.x)
    def cross(dg3: GVec3D) = new IVec3D((y).toDouble*dg3.z - (z).toDouble*dg3.y, (z).toDouble*dg3.x - (x).toDouble*dg3.z, (x).toDouble*dg3.y - (y).toDouble*dg3.x)
    def max(x0: Long) = new IVec3D(math.max((x).toDouble,(x0).toDouble), math.max((y).toDouble,(x0).toDouble), math.max((z).toDouble,(x0).toDouble))
    def max(x0: Float) = new IVec3F(math.max(x,x0), math.max(y,x0), math.max(z,x0))
    def max(x0: Double) = new IVec3D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0))
    def max(sg3: GVec3S) = new IVec3F(math.max(x,(sg3.x).toFloat), math.max(y,(sg3.y).toFloat), math.max(z,(sg3.z).toFloat))
    def max(ig3: GVec3I) = new IVec3F(math.max(x,(ig3.x).toFloat), math.max(y,(ig3.y).toFloat), math.max(z,(ig3.z).toFloat))
    def max(lg3: GVec3L) = new IVec3D(math.max((x).toDouble,(lg3.x).toDouble), math.max((y).toDouble,(lg3.y).toDouble), math.max((z).toDouble,(lg3.z).toDouble))
    def max(fg3: GVec3F) = new IVec3F(math.max(x,fg3.x), math.max(y,fg3.y), math.max(z,fg3.z))
    def max(x0: Float, y0: Float, z0: Float) = new IVec3F(math.max(x,x0), math.max(y,y0), math.max(z,z0))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((y).toDouble,dg3.y), math.max((z).toDouble,dg3.z))
    def min(x0: Long) = new IVec3D(math.min((x).toDouble,(x0).toDouble), math.min((y).toDouble,(x0).toDouble), math.min((z).toDouble,(x0).toDouble))
    def min(x0: Float) = new IVec3F(math.min(x,x0), math.min(y,x0), math.min(z,x0))
    def min(x0: Double) = new IVec3D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0))
    def min(sg3: GVec3S) = new IVec3F(math.min(x,(sg3.x).toFloat), math.min(y,(sg3.y).toFloat), math.min(z,(sg3.z).toFloat))
    def min(ig3: GVec3I) = new IVec3F(math.min(x,(ig3.x).toFloat), math.min(y,(ig3.y).toFloat), math.min(z,(ig3.z).toFloat))
    def min(lg3: GVec3L) = new IVec3D(math.min((x).toDouble,(lg3.x).toDouble), math.min((y).toDouble,(lg3.y).toDouble), math.min((z).toDouble,(lg3.z).toDouble))
    def min(fg3: GVec3F) = new IVec3F(math.min(x,fg3.x), math.min(y,fg3.y), math.min(z,fg3.z))
    def min(x0: Float, y0: Float, z0: Float) = new IVec3F(math.min(x,x0), math.min(y,y0), math.min(z,z0))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((y).toDouble,dg3.y), math.min((z).toDouble,dg3.z))
    def operate(sg3: GVec3S)(fun: (Float,Float)=>Float) = new IVec3F(fun(x,(sg3.x).toFloat), fun(y,(sg3.y).toFloat), fun(z,(sg3.z).toFloat))
    def operate(ig3: GVec3I)(fun: (Float,Float)=>Float) = new IVec3F(fun(x,(ig3.x).toFloat), fun(y,(ig3.y).toFloat), fun(z,(ig3.z).toFloat))
    def operate(lg3: GVec3L)(fun: (Double,Double)=>Double) = new IVec3D(fun((x).toDouble,(lg3.x).toDouble), fun((y).toDouble,(lg3.y).toDouble), fun((z).toDouble,(lg3.z).toDouble))
    def operate(fg3: GVec3F)(fun: (Float,Float)=>Float) = new IVec3F(fun(x,fg3.x), fun(y,fg3.y), fun(z,fg3.z))
    def operate(dg3: GVec3D)(fun: (Double,Double)=>Double) = new IVec3D(fun((x).toDouble,dg3.x), fun((y).toDouble,dg3.y), fun((z).toDouble,dg3.z))
    def dot(sg3: GVec3S) = x*(sg3.x).toFloat + y*(sg3.y).toFloat + z*(sg3.z).toFloat
    def dot(ig3: GVec3I) = x*(ig3.x).toFloat + y*(ig3.y).toFloat + z*(ig3.z).toFloat
    def dot(lg3: GVec3L) = (x).toDouble*(lg3.x).toDouble + (y).toDouble*(lg3.y).toDouble + (z).toDouble*(lg3.z).toDouble
    def dot(fg3: GVec3F) = x*fg3.x + y*fg3.y + z*fg3.z
    def dot(dg3: GVec3D) = (x).toDouble*dg3.x + (y).toDouble*dg3.y + (z).toDouble*dg3.z
    final def **(sg3: GVec3S): Float = this.dot(sg3)
    final def **(ig3: GVec3I): Float = this.dot(ig3)
    final def **(lg3: GVec3L): Double = this.dot(lg3)
    final def **(fg3: GVec3F): Float = this.dot(fg3)
    final def **(dg3: GVec3D): Double = this.dot(dg3)
    def dot(x0: Float, y0: Float, z0: Float) = x*x0 + y*y0 + z*z0
    final def **(x0: Float, y0: Float, z0: Float): Float = this.dot(x0, y0, z0)
    final def unitDot(sg3: GVec3S): Float = (this.dot(sg3) / math.sqrt(lenSq * sg3.lenSq)).toFloat
    final def unitDot(ig3: GVec3I): Float = (this.dot(ig3) / math.sqrt(lenSq * ig3.lenSq)).toFloat
    final def unitDot(lg3: GVec3L): Double = this.dot(lg3) / math.sqrt(lenSq * lg3.lenSq)
    final def unitDot(fg3: GVec3F): Float = (this.dot(fg3) / math.sqrt(lenSq * fg3.lenSq)).toFloat
    final def unitDot(dg3: GVec3D): Double = this.dot(dg3) / math.sqrt(lenSq * dg3.lenSq)
    final def *^*(sg3: GVec3S): Float = this.unitDot(sg3)
    final def *^*(ig3: GVec3I): Float = this.unitDot(ig3)
    final def *^*(lg3: GVec3L): Double = this.unitDot(lg3)
    final def *^*(fg3: GVec3F): Float = this.unitDot(fg3)
    final def *^*(dg3: GVec3D): Double = this.unitDot(dg3)
    def fold(zero: Int)(fun: (Int,Float)=>Int) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Long)(fun: (Long,Float)=>Long) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Float)(fun: (Float,Float)=>Float) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Double)(fun: (Double,Float)=>Double) = fun(fun(fun(zero,x),y),z)
    def reduce(fun: (Float,Float)=>Float) = fun(fun(x,y),z)
    def outer(sg3: GVec3S) = new IMat3F(x*sg3.x, x*sg3.y, x*sg3.z, y*sg3.x, y*sg3.y, y*sg3.z, z*sg3.x, z*sg3.y, z*sg3.z)
    def outer(ig3: GVec3I) = new IMat3F(x*ig3.x, x*ig3.y, x*ig3.z, y*ig3.x, y*ig3.y, y*ig3.z, z*ig3.x, z*ig3.y, z*ig3.z)
    def outer(lg3: GVec3L) = new IMat3D(x*lg3.x, x*lg3.y, x*lg3.z, y*lg3.x, y*lg3.y, y*lg3.z, z*lg3.x, z*lg3.y, z*lg3.z)
    def outer(fg3: GVec3F) = new IMat3F(x*fg3.x, x*fg3.y, x*fg3.z, y*fg3.x, y*fg3.y, y*fg3.z, z*fg3.x, z*fg3.y, z*fg3.z)
    def outer(dg3: GVec3D) = new IMat3D(x*dg3.x, x*dg3.y, x*dg3.z, y*dg3.x, y*dg3.y, y*dg3.z, z*dg3.x, z*dg3.y, z*dg3.z)
    def distSq(sg3: GVec3S) = (x-(sg3.x).toFloat)*(x-(sg3.x).toFloat) + (y-(sg3.y).toFloat)*(y-(sg3.y).toFloat) + (z-(sg3.z).toFloat)*(z-(sg3.z).toFloat)
    def distSq(ig3: GVec3I) = (x-(ig3.x).toFloat)*(x-(ig3.x).toFloat) + (y-(ig3.y).toFloat)*(y-(ig3.y).toFloat) + (z-(ig3.z).toFloat)*(z-(ig3.z).toFloat)
    def distSq(lg3: GVec3L) = ((x).toDouble-(lg3.x).toDouble)*((x).toDouble-(lg3.x).toDouble) + ((y).toDouble-(lg3.y).toDouble)*((y).toDouble-(lg3.y).toDouble) + ((z).toDouble-(lg3.z).toDouble)*((z).toDouble-(lg3.z).toDouble)
    def distSq(fg3: GVec3F) = (x-fg3.x)*(x-fg3.x) + (y-fg3.y)*(y-fg3.y) + (z-fg3.z)*(z-fg3.z)
    def distSq(dg3: GVec3D) = ((x).toDouble-dg3.x)*((x).toDouble-dg3.x) + ((y).toDouble-dg3.y)*((y).toDouble-dg3.y) + ((z).toDouble-dg3.z)*((z).toDouble-dg3.z)
    final def dist(sg3: GVec3S): Float = (math.sqrt(this.distSq(sg3))).toFloat
    final def dist(ig3: GVec3I): Float = (math.sqrt(this.distSq(ig3))).toFloat
    final def dist(lg3: GVec3L): Double = math.sqrt(this.distSq(lg3))
    final def dist(fg3: GVec3F): Float = (math.sqrt(this.distSq(fg3))).toFloat
    final def dist(dg3: GVec3D): Double = math.sqrt(this.distSq(dg3))
    def distSq(x0: Float, y0: Float, z0: Float) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0)
    final def dist(x0: Float, y0: Float, z0: Float): Float = (math.sqrt(this.distSq(x0, y0, z0))).toFloat
    def ===(fg3: GVec3F) = x==fg3.x && y==fg3.y && z==fg3.z
    def ===(x0: Float, y0: Float, z0: Float) = x==x0 && y==y0 && z==z0
    def approx(fg3: GVec3F, eps: Float) = ScalarF.close(x,fg3.x,eps) && ScalarF.close(y,fg3.y,eps) && ScalarF.close(z,fg3.z,eps)
    def approx(dg3: GVec3D, eps: Double) = ScalarD.close(x,dg3.x,eps) && ScalarD.close(y,dg3.y,eps) && ScalarD.close(z,dg3.z,eps)
    final def =~=(fg3: GVec3F) = approx(fg3, 1e-10f)
    final def =~=(dg3: GVec3D) = approx(dg3, 1e-10)
    def approx(x0: Float, y0: Float, z0: Float, eps: Float) = ScalarF.close(x,x0,eps) && ScalarF.close(y,y0,eps) && ScalarF.close(z,z0,eps)
    def **(sg33: GMat3S) = new IVec3F(x*(sg33.xx).toFloat+y*(sg33.yx).toFloat+z*(sg33.zx).toFloat, x*(sg33.xy).toFloat+y*(sg33.yy).toFloat+z*(sg33.zy).toFloat, x*(sg33.xz).toFloat+y*(sg33.yz).toFloat+z*(sg33.zz).toFloat)
    def **(ig33: GMat3I) = new IVec3F(x*(ig33.xx).toFloat+y*(ig33.yx).toFloat+z*(ig33.zx).toFloat, x*(ig33.xy).toFloat+y*(ig33.yy).toFloat+z*(ig33.zy).toFloat, x*(ig33.xz).toFloat+y*(ig33.yz).toFloat+z*(ig33.zz).toFloat)
    def **(lg33: GMat3L) = new IVec3D((x).toDouble*(lg33.xx).toDouble+(y).toDouble*(lg33.yx).toDouble+(z).toDouble*(lg33.zx).toDouble, (x).toDouble*(lg33.xy).toDouble+(y).toDouble*(lg33.yy).toDouble+(z).toDouble*(lg33.zy).toDouble, (x).toDouble*(lg33.xz).toDouble+(y).toDouble*(lg33.yz).toDouble+(z).toDouble*(lg33.zz).toDouble)
    def **(fg33: GMat3F) = new IVec3F(x*fg33.xx+y*fg33.yx+z*fg33.zx, x*fg33.xy+y*fg33.yy+z*fg33.zy, x*fg33.xz+y*fg33.yz+z*fg33.zz)
    def **(dg33: GMat3D) = new IVec3D((x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx, (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy, (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz)
  } // class GVec3F

  object GVec3F {
    def apply(x0: Float, y0: Float, z0: Float): GVec3F = new IVec3F(x0, y0, z0)
    def parse(str: String): GVec3F = IVec3F.parse(str)
    def spherical(r0: Float, phi: Float, theta: Float): GVec3F = { val rsp = r0*math.sin(phi); new IVec3F((rsp*math.cos(theta)).toFloat, (rsp*math.sin(theta)).toFloat, (r0*math.cos(phi)).toFloat) }
    def cylindrical(r0: Float, theta: Float, z0: Float): GVec3F = new IVec3F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat, z0)
    val zero: GVec3F = IVec3F.zero
    val xUnit: GVec3F = IVec3F.xUnit
    val yUnit: GVec3F = IVec3F.yUnit
    val zUnit: GVec3F = IVec3F.zUnit
  } // object GVec3F


  abstract class GVec3D extends Cloneable {
    def x: Double
    def y: Double
    def z: Double
    override def toString = "["+x+", "+y+", "+z+"]"
    override def hashCode = ((z.##)*16777619 ^ y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg3: GVec3S => {x==sg3.x && y==sg3.y && z==sg3.z }; case ig3: GVec3I => {x==ig3.x && y==ig3.y && z==ig3.z }; case lg3: GVec3L => {x==lg3.x && y==lg3.y && z==lg3.z }; case fg3: GVec3F => {x==fg3.x && y==fg3.y && z==fg3.z }; case dg3: GVec3D => {x==dg3.x && y==dg3.y && z==dg3.z }; case _ => false }
    override def clone(): GVec3D = new IVec3D(x, y, z)
    def toS: GVec3S = new IVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    def toI: GVec3I = new IVec3I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt)
    def mapI(fun: Double => Int) = new IVec3I((math.round(fun(x))).toInt, (math.round(fun(y))).toInt, (math.round(fun(z))).toInt)
    def toL: GVec3L = new IVec3L(math.round(x), math.round(y), math.round(z))
    def mapL(fun: Double => Long) = new IVec3L(math.round(fun(x)), math.round(fun(y)), math.round(fun(z)))
    def toF: GVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    def mapF(fun: Double => Float) = new IVec3F((fun(x)).toFloat, (fun(y)).toFloat, (fun(z)).toFloat)
    def copy(x0: Double = x, y0: Double = y, z0: Double = z): GVec3D = new IVec3D(x0, y0, z0)
    def trim: GVec2D = new IVec2D(x, y)
    def pad(padding: Double = 1): GVec4D = new IVec4D(x, y, z, padding)
    def mapD(fun: Double => Double) = new IVec3D(fun(x), fun(y), fun(z))
    def imm = new IVec3D(x, y, z)
    def mut = new MVec3D(x, y, z)
    def lenSq = x*x + y*y + z*z
    final def len = math.sqrt(lenSq)
    def inclination = math.acos(z/math.sqrt(x*x + y*y + z*z))
    def azimuth = math.atan2(y,x)
    def unary_-() = new IVec3D(-x, -y, -z)
    def norm = { val k0 = 1/this.len; new IVec3D(x*k0, y*k0, z*k0) }
    def +(x0: Double) = new IVec3D(x + x0, y + x0, z + x0)
    def +(sg3: GVec3S) = new IVec3D(x + (sg3.x).toDouble, y + (sg3.y).toDouble, z + (sg3.z).toDouble)
    def +(ig3: GVec3I) = new IVec3D(x + (ig3.x).toDouble, y + (ig3.y).toDouble, z + (ig3.z).toDouble)
    def +(lg3: GVec3L) = new IVec3D(x + (lg3.x).toDouble, y + (lg3.y).toDouble, z + (lg3.z).toDouble)
    def +(fg3: GVec3F) = new IVec3D(x + (fg3.x).toDouble, y + (fg3.y).toDouble, z + (fg3.z).toDouble)
    def +(dg3: GVec3D) = new IVec3D(x + dg3.x, y + dg3.y, z + dg3.z)
    def +(x0: Double, y0: Double, z0: Double) = new IVec3D(x + x0, y + y0, z + z0)
    def -(x0: Double) = new IVec3D(x - x0, y - x0, z - x0)
    def -(sg3: GVec3S) = new IVec3D(x - (sg3.x).toDouble, y - (sg3.y).toDouble, z - (sg3.z).toDouble)
    def -(ig3: GVec3I) = new IVec3D(x - (ig3.x).toDouble, y - (ig3.y).toDouble, z - (ig3.z).toDouble)
    def -(lg3: GVec3L) = new IVec3D(x - (lg3.x).toDouble, y - (lg3.y).toDouble, z - (lg3.z).toDouble)
    def -(fg3: GVec3F) = new IVec3D(x - (fg3.x).toDouble, y - (fg3.y).toDouble, z - (fg3.z).toDouble)
    def -(dg3: GVec3D) = new IVec3D(x - dg3.x, y - dg3.y, z - dg3.z)
    def -(x0: Double, y0: Double, z0: Double) = new IVec3D(x - x0, y - y0, z - z0)
    def *(x0: Double) = new IVec3D(x * x0, y * x0, z * x0)
    def *(sg3: GVec3S) = new IVec3D(x * (sg3.x).toDouble, y * (sg3.y).toDouble, z * (sg3.z).toDouble)
    def *(ig3: GVec3I) = new IVec3D(x * (ig3.x).toDouble, y * (ig3.y).toDouble, z * (ig3.z).toDouble)
    def *(lg3: GVec3L) = new IVec3D(x * (lg3.x).toDouble, y * (lg3.y).toDouble, z * (lg3.z).toDouble)
    def *(fg3: GVec3F) = new IVec3D(x * (fg3.x).toDouble, y * (fg3.y).toDouble, z * (fg3.z).toDouble)
    def *(dg3: GVec3D) = new IVec3D(x * dg3.x, y * dg3.y, z * dg3.z)
    def *(x0: Double, y0: Double, z0: Double) = new IVec3D(x * x0, y * y0, z * z0)
    def /(x0: Double) = new IVec3D(x / x0, y / x0, z / x0)
    def /(sg3: GVec3S) = new IVec3D(x / (sg3.x).toDouble, y / (sg3.y).toDouble, z / (sg3.z).toDouble)
    def /(ig3: GVec3I) = new IVec3D(x / (ig3.x).toDouble, y / (ig3.y).toDouble, z / (ig3.z).toDouble)
    def /(lg3: GVec3L) = new IVec3D(x / (lg3.x).toDouble, y / (lg3.y).toDouble, z / (lg3.z).toDouble)
    def /(fg3: GVec3F) = new IVec3D(x / (fg3.x).toDouble, y / (fg3.y).toDouble, z / (fg3.z).toDouble)
    def /(dg3: GVec3D) = new IVec3D(x / dg3.x, y / dg3.y, z / dg3.z)
    def /(x0: Double, y0: Double, z0: Double) = new IVec3D(x / x0, y / y0, z / z0)
    def cross(sg3: GVec3S) = new IVec3D(y*(sg3.z).toDouble - z*(sg3.y).toDouble, z*(sg3.x).toDouble - x*(sg3.z).toDouble, x*(sg3.y).toDouble - y*(sg3.x).toDouble)
    def cross(ig3: GVec3I) = new IVec3D(y*(ig3.z).toDouble - z*(ig3.y).toDouble, z*(ig3.x).toDouble - x*(ig3.z).toDouble, x*(ig3.y).toDouble - y*(ig3.x).toDouble)
    def cross(lg3: GVec3L) = new IVec3D(y*(lg3.z).toDouble - z*(lg3.y).toDouble, z*(lg3.x).toDouble - x*(lg3.z).toDouble, x*(lg3.y).toDouble - y*(lg3.x).toDouble)
    def cross(fg3: GVec3F) = new IVec3D(y*(fg3.z).toDouble - z*(fg3.y).toDouble, z*(fg3.x).toDouble - x*(fg3.z).toDouble, x*(fg3.y).toDouble - y*(fg3.x).toDouble)
    def cross(dg3: GVec3D) = new IVec3D(y*dg3.z - z*dg3.y, z*dg3.x - x*dg3.z, x*dg3.y - y*dg3.x)
    def max(x0: Double) = new IVec3D(math.max(x,x0), math.max(y,x0), math.max(z,x0))
    def max(sg3: GVec3S) = new IVec3D(math.max(x,(sg3.x).toDouble), math.max(y,(sg3.y).toDouble), math.max(z,(sg3.z).toDouble))
    def max(ig3: GVec3I) = new IVec3D(math.max(x,(ig3.x).toDouble), math.max(y,(ig3.y).toDouble), math.max(z,(ig3.z).toDouble))
    def max(lg3: GVec3L) = new IVec3D(math.max(x,(lg3.x).toDouble), math.max(y,(lg3.y).toDouble), math.max(z,(lg3.z).toDouble))
    def max(fg3: GVec3F) = new IVec3D(math.max(x,(fg3.x).toDouble), math.max(y,(fg3.y).toDouble), math.max(z,(fg3.z).toDouble))
    def max(dg3: GVec3D) = new IVec3D(math.max(x,dg3.x), math.max(y,dg3.y), math.max(z,dg3.z))
    def max(x0: Double, y0: Double, z0: Double) = new IVec3D(math.max(x,x0), math.max(y,y0), math.max(z,z0))
    def min(x0: Double) = new IVec3D(math.min(x,x0), math.min(y,x0), math.min(z,x0))
    def min(sg3: GVec3S) = new IVec3D(math.min(x,(sg3.x).toDouble), math.min(y,(sg3.y).toDouble), math.min(z,(sg3.z).toDouble))
    def min(ig3: GVec3I) = new IVec3D(math.min(x,(ig3.x).toDouble), math.min(y,(ig3.y).toDouble), math.min(z,(ig3.z).toDouble))
    def min(lg3: GVec3L) = new IVec3D(math.min(x,(lg3.x).toDouble), math.min(y,(lg3.y).toDouble), math.min(z,(lg3.z).toDouble))
    def min(fg3: GVec3F) = new IVec3D(math.min(x,(fg3.x).toDouble), math.min(y,(fg3.y).toDouble), math.min(z,(fg3.z).toDouble))
    def min(dg3: GVec3D) = new IVec3D(math.min(x,dg3.x), math.min(y,dg3.y), math.min(z,dg3.z))
    def min(x0: Double, y0: Double, z0: Double) = new IVec3D(math.min(x,x0), math.min(y,y0), math.min(z,z0))
    def operate(sg3: GVec3S)(fun: (Double,Double)=>Double) = new IVec3D(fun(x,(sg3.x).toDouble), fun(y,(sg3.y).toDouble), fun(z,(sg3.z).toDouble))
    def operate(ig3: GVec3I)(fun: (Double,Double)=>Double) = new IVec3D(fun(x,(ig3.x).toDouble), fun(y,(ig3.y).toDouble), fun(z,(ig3.z).toDouble))
    def operate(lg3: GVec3L)(fun: (Double,Double)=>Double) = new IVec3D(fun(x,(lg3.x).toDouble), fun(y,(lg3.y).toDouble), fun(z,(lg3.z).toDouble))
    def operate(fg3: GVec3F)(fun: (Double,Double)=>Double) = new IVec3D(fun(x,(fg3.x).toDouble), fun(y,(fg3.y).toDouble), fun(z,(fg3.z).toDouble))
    def operate(dg3: GVec3D)(fun: (Double,Double)=>Double) = new IVec3D(fun(x,dg3.x), fun(y,dg3.y), fun(z,dg3.z))
    def dot(sg3: GVec3S) = x*(sg3.x).toDouble + y*(sg3.y).toDouble + z*(sg3.z).toDouble
    def dot(ig3: GVec3I) = x*(ig3.x).toDouble + y*(ig3.y).toDouble + z*(ig3.z).toDouble
    def dot(lg3: GVec3L) = x*(lg3.x).toDouble + y*(lg3.y).toDouble + z*(lg3.z).toDouble
    def dot(fg3: GVec3F) = x*(fg3.x).toDouble + y*(fg3.y).toDouble + z*(fg3.z).toDouble
    def dot(dg3: GVec3D) = x*dg3.x + y*dg3.y + z*dg3.z
    final def **(sg3: GVec3S): Double = this.dot(sg3)
    final def **(ig3: GVec3I): Double = this.dot(ig3)
    final def **(lg3: GVec3L): Double = this.dot(lg3)
    final def **(fg3: GVec3F): Double = this.dot(fg3)
    final def **(dg3: GVec3D): Double = this.dot(dg3)
    def dot(x0: Double, y0: Double, z0: Double) = x*x0 + y*y0 + z*z0
    final def **(x0: Double, y0: Double, z0: Double): Double = this.dot(x0, y0, z0)
    final def unitDot(sg3: GVec3S): Double = this.dot(sg3) / math.sqrt(lenSq * sg3.lenSq)
    final def unitDot(ig3: GVec3I): Double = this.dot(ig3) / math.sqrt(lenSq * ig3.lenSq)
    final def unitDot(lg3: GVec3L): Double = this.dot(lg3) / math.sqrt(lenSq * lg3.lenSq)
    final def unitDot(fg3: GVec3F): Double = this.dot(fg3) / math.sqrt(lenSq * fg3.lenSq)
    final def unitDot(dg3: GVec3D): Double = this.dot(dg3) / math.sqrt(lenSq * dg3.lenSq)
    final def *^*(sg3: GVec3S): Double = this.unitDot(sg3)
    final def *^*(ig3: GVec3I): Double = this.unitDot(ig3)
    final def *^*(lg3: GVec3L): Double = this.unitDot(lg3)
    final def *^*(fg3: GVec3F): Double = this.unitDot(fg3)
    final def *^*(dg3: GVec3D): Double = this.unitDot(dg3)
    def fold(zero: Int)(fun: (Int,Double)=>Int) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Long)(fun: (Long,Double)=>Long) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Float)(fun: (Float,Double)=>Float) = fun(fun(fun(zero,x),y),z)
    def fold(zero: Double)(fun: (Double,Double)=>Double) = fun(fun(fun(zero,x),y),z)
    def reduce(fun: (Double,Double)=>Double) = fun(fun(x,y),z)
    def outer(sg3: GVec3S) = new IMat3D(x*sg3.x, x*sg3.y, x*sg3.z, y*sg3.x, y*sg3.y, y*sg3.z, z*sg3.x, z*sg3.y, z*sg3.z)
    def outer(ig3: GVec3I) = new IMat3D(x*ig3.x, x*ig3.y, x*ig3.z, y*ig3.x, y*ig3.y, y*ig3.z, z*ig3.x, z*ig3.y, z*ig3.z)
    def outer(lg3: GVec3L) = new IMat3D(x*lg3.x, x*lg3.y, x*lg3.z, y*lg3.x, y*lg3.y, y*lg3.z, z*lg3.x, z*lg3.y, z*lg3.z)
    def outer(fg3: GVec3F) = new IMat3D(x*fg3.x, x*fg3.y, x*fg3.z, y*fg3.x, y*fg3.y, y*fg3.z, z*fg3.x, z*fg3.y, z*fg3.z)
    def outer(dg3: GVec3D) = new IMat3D(x*dg3.x, x*dg3.y, x*dg3.z, y*dg3.x, y*dg3.y, y*dg3.z, z*dg3.x, z*dg3.y, z*dg3.z)
    def distSq(sg3: GVec3S) = (x-(sg3.x).toDouble)*(x-(sg3.x).toDouble) + (y-(sg3.y).toDouble)*(y-(sg3.y).toDouble) + (z-(sg3.z).toDouble)*(z-(sg3.z).toDouble)
    def distSq(ig3: GVec3I) = (x-(ig3.x).toDouble)*(x-(ig3.x).toDouble) + (y-(ig3.y).toDouble)*(y-(ig3.y).toDouble) + (z-(ig3.z).toDouble)*(z-(ig3.z).toDouble)
    def distSq(lg3: GVec3L) = (x-(lg3.x).toDouble)*(x-(lg3.x).toDouble) + (y-(lg3.y).toDouble)*(y-(lg3.y).toDouble) + (z-(lg3.z).toDouble)*(z-(lg3.z).toDouble)
    def distSq(fg3: GVec3F) = (x-(fg3.x).toDouble)*(x-(fg3.x).toDouble) + (y-(fg3.y).toDouble)*(y-(fg3.y).toDouble) + (z-(fg3.z).toDouble)*(z-(fg3.z).toDouble)
    def distSq(dg3: GVec3D) = (x-dg3.x)*(x-dg3.x) + (y-dg3.y)*(y-dg3.y) + (z-dg3.z)*(z-dg3.z)
    final def dist(sg3: GVec3S): Double = math.sqrt(this.distSq(sg3))
    final def dist(ig3: GVec3I): Double = math.sqrt(this.distSq(ig3))
    final def dist(lg3: GVec3L): Double = math.sqrt(this.distSq(lg3))
    final def dist(fg3: GVec3F): Double = math.sqrt(this.distSq(fg3))
    final def dist(dg3: GVec3D): Double = math.sqrt(this.distSq(dg3))
    def distSq(x0: Double, y0: Double, z0: Double) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0)
    final def dist(x0: Double, y0: Double, z0: Double): Double = math.sqrt(this.distSq(x0, y0, z0))
    def ===(dg3: GVec3D) = x==dg3.x && y==dg3.y && z==dg3.z
    def ===(x0: Double, y0: Double, z0: Double) = x==x0 && y==y0 && z==z0
    def approx(fg3: GVec3F, eps: Double) = ScalarD.close(x,(fg3.x).toDouble,eps) && ScalarD.close(y,(fg3.y).toDouble,eps) && ScalarD.close(z,(fg3.z).toDouble,eps)
    def approx(dg3: GVec3D, eps: Double) = ScalarD.close(x,dg3.x,eps) && ScalarD.close(y,dg3.y,eps) && ScalarD.close(z,dg3.z,eps)
    final def =~=(fg3: GVec3F) = approx(fg3, 1e-10)
    final def =~=(dg3: GVec3D) = approx(dg3, 1e-20)
    def approx(x0: Double, y0: Double, z0: Double, eps: Double) = ScalarD.close(x,x0,eps) && ScalarD.close(y,y0,eps) && ScalarD.close(z,z0,eps)
    def **(sg33: GMat3S) = new IVec3D(x*(sg33.xx).toDouble+y*(sg33.yx).toDouble+z*(sg33.zx).toDouble, x*(sg33.xy).toDouble+y*(sg33.yy).toDouble+z*(sg33.zy).toDouble, x*(sg33.xz).toDouble+y*(sg33.yz).toDouble+z*(sg33.zz).toDouble)
    def **(ig33: GMat3I) = new IVec3D(x*(ig33.xx).toDouble+y*(ig33.yx).toDouble+z*(ig33.zx).toDouble, x*(ig33.xy).toDouble+y*(ig33.yy).toDouble+z*(ig33.zy).toDouble, x*(ig33.xz).toDouble+y*(ig33.yz).toDouble+z*(ig33.zz).toDouble)
    def **(lg33: GMat3L) = new IVec3D(x*(lg33.xx).toDouble+y*(lg33.yx).toDouble+z*(lg33.zx).toDouble, x*(lg33.xy).toDouble+y*(lg33.yy).toDouble+z*(lg33.zy).toDouble, x*(lg33.xz).toDouble+y*(lg33.yz).toDouble+z*(lg33.zz).toDouble)
    def **(fg33: GMat3F) = new IVec3D(x*(fg33.xx).toDouble+y*(fg33.yx).toDouble+z*(fg33.zx).toDouble, x*(fg33.xy).toDouble+y*(fg33.yy).toDouble+z*(fg33.zy).toDouble, x*(fg33.xz).toDouble+y*(fg33.yz).toDouble+z*(fg33.zz).toDouble)
    def **(dg33: GMat3D) = new IVec3D(x*dg33.xx+y*dg33.yx+z*dg33.zx, x*dg33.xy+y*dg33.yy+z*dg33.zy, x*dg33.xz+y*dg33.yz+z*dg33.zz)
  } // class GVec3D

  object GVec3D {
    def apply(x0: Double, y0: Double, z0: Double): GVec3D = new IVec3D(x0, y0, z0)
    def parse(str: String): GVec3D = IVec3D.parse(str)
    def spherical(r0: Double, phi: Double, theta: Double): GVec3D = { val rsp = r0*math.sin(phi); new IVec3D(rsp*math.cos(theta), rsp*math.sin(theta), r0*math.cos(phi)) }
    def cylindrical(r0: Double, theta: Double, z0: Double): GVec3D = new IVec3D(r0 * math.cos(theta), r0 * math.sin(theta), z0)
    val zero: GVec3D = IVec3D.zero
    val xUnit: GVec3D = IVec3D.xUnit
    val yUnit: GVec3D = IVec3D.yUnit
    val zUnit: GVec3D = IVec3D.zUnit
  } // object GVec3D


  final case class IVec3S(val x: Short, val y: Short, val z: Short) extends GVec3S {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec3S = new IVec3S(x, y, z)
    override def copy(x0: Short = x, y0: Short = y, z0: Short = z): IVec3S = new IVec3S(x0, y0, z0)
    override def trim: IVec2S = new IVec2S(x, y)
    override def pad(padding: Short = 1): IVec4S = new IVec4S(x, y, z, padding)
    def vec = this
    override def imm = this
    override def toI: IVec3I = new IVec3I((x).toInt, (y).toInt, (z).toInt)
    override def toL: IVec3L = new IVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: IVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: IVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class IVec3S

  object IVec3S {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec3S = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toShort); new IVec3S(p(0), p(1), p(2)) }
    val zero = new IVec3S(0, 0, 0)
    val xUnit = new IVec3S(1, 0, 0)
    val yUnit = new IVec3S(0, 1, 0)
    val zUnit = new IVec3S(0, 0, 1)
  } // object IVec3S


  final case class IVec3I(val x: Int, val y: Int, val z: Int) extends GVec3I {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec3I = new IVec3I(x, y, z)
    override def toS: IVec3S = new IVec3S((x).toShort, (y).toShort, (z).toShort)
    override def copy(x0: Int = x, y0: Int = y, z0: Int = z): IVec3I = new IVec3I(x0, y0, z0)
    override def trim: IVec2I = new IVec2I(x, y)
    override def pad(padding: Int = 1): IVec4I = new IVec4I(x, y, z, padding)
    def vec = this
    override def imm = this
    override def toL: IVec3L = new IVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: IVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: IVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class IVec3I

  object IVec3I {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec3I = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toInt); new IVec3I(p(0), p(1), p(2)) }
    val zero = new IVec3I(0, 0, 0)
    val xUnit = new IVec3I(1, 0, 0)
    val yUnit = new IVec3I(0, 1, 0)
    val zUnit = new IVec3I(0, 0, 1)
  } // object IVec3I


  final case class IVec3L(val x: Long, val y: Long, val z: Long) extends GVec3L {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec3L = new IVec3L(x, y, z)
    override def toS: IVec3S = new IVec3S((x).toShort, (y).toShort, (z).toShort)
    override def toI: IVec3I = new IVec3I((x).toInt, (y).toInt, (z).toInt)
    override def copy(x0: Long = x, y0: Long = y, z0: Long = z): IVec3L = new IVec3L(x0, y0, z0)
    override def trim: IVec2L = new IVec2L(x, y)
    override def pad(padding: Long = 1): IVec4L = new IVec4L(x, y, z, padding)
    def vec = this
    override def imm = this
    override def toF: IVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: IVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class IVec3L

  object IVec3L {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec3L = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toLong); new IVec3L(p(0), p(1), p(2)) }
    val zero = new IVec3L(0, 0, 0)
    val xUnit = new IVec3L(1, 0, 0)
    val yUnit = new IVec3L(0, 1, 0)
    val zUnit = new IVec3L(0, 0, 1)
  } // object IVec3L


  final case class IVec3F(val x: Float, val y: Float, val z: Float) extends GVec3F {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec3F = new IVec3F(x, y, z)
    override def toS: IVec3S = new IVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: IVec3I = new IVec3I(math.round(x), math.round(y), math.round(z))
    override def toL: IVec3L = new IVec3L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble))
    override def copy(x0: Float = x, y0: Float = y, z0: Float = z): IVec3F = new IVec3F(x0, y0, z0)
    override def trim: IVec2F = new IVec2F(x, y)
    override def pad(padding: Float = 1): IVec4F = new IVec4F(x, y, z, padding)
    def vec = this
    override def imm = this
    override def toD: IVec3D = new IVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class IVec3F

  object IVec3F {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec3F = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toFloat); new IVec3F(p(0), p(1), p(2)) }
    def spherical(r0: Float, phi: Float, theta: Float): IVec3F = { val rsp = r0*math.sin(phi); new IVec3F((rsp*math.cos(theta)).toFloat, (rsp*math.sin(theta)).toFloat, (r0*math.cos(phi)).toFloat) }
    def cylindrical(r0: Float, theta: Float, z0: Float): IVec3F = new IVec3F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat, z0)
    val zero = new IVec3F(0, 0, 0)
    val xUnit = new IVec3F(1, 0, 0)
    val yUnit = new IVec3F(0, 1, 0)
    val zUnit = new IVec3F(0, 0, 1)
  } // object IVec3F


  final case class IVec3D(val x: Double, val y: Double, val z: Double) extends GVec3D {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec3D = new IVec3D(x, y, z)
    override def toS: IVec3S = new IVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: IVec3I = new IVec3I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt)
    override def toL: IVec3L = new IVec3L(math.round(x), math.round(y), math.round(z))
    override def toF: IVec3F = new IVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def copy(x0: Double = x, y0: Double = y, z0: Double = z): IVec3D = new IVec3D(x0, y0, z0)
    override def trim: IVec2D = new IVec2D(x, y)
    override def pad(padding: Double = 1): IVec4D = new IVec4D(x, y, z, padding)
    def vec = this
    override def imm = this
  } // class IVec3D

  object IVec3D {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec3D = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toDouble); new IVec3D(p(0), p(1), p(2)) }
    def spherical(r0: Double, phi: Double, theta: Double): IVec3D = { val rsp = r0*math.sin(phi); new IVec3D(rsp*math.cos(theta), rsp*math.sin(theta), r0*math.cos(phi)) }
    def cylindrical(r0: Double, theta: Double, z0: Double): IVec3D = new IVec3D(r0 * math.cos(theta), r0 * math.sin(theta), z0)
    val zero = new IVec3D(0, 0, 0)
    val xUnit = new IVec3D(1, 0, 0)
    val yUnit = new IVec3D(0, 1, 0)
    val zUnit = new IVec3D(0, 0, 1)
  } // object IVec3D


  abstract class AVec3S extends GVec3S {
    def x_=(x0: Short): Unit
    def y_=(y0: Short): Unit
    def z_=(z0: Short): Unit
    override def clone(): AVec3S = new MVec3S(x, y, z)
    override def copy(x0: Short = x, y0: Short = y, z0: Short = z): AVec3S = new MVec3S(x0, y0, z0)
    override def trim: AVec2S = new MVec2S(x, y)
    override def pad(padding: Short = 1): AVec4S = new MVec4S(x, y, z, padding)
    override def toI: AVec3I = new MVec3I((x).toInt, (y).toInt, (z).toInt)
    override def toL: AVec3L = new MVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: AVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: AVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def negEq: this.type = { x = (-x).toShort; y = (-y).toShort; z = (-z).toShort; this }
    def :~(x0: Short): this.type = { x = x0; y = x0; z = x0; this }
    def :~~(x0: Int): this.type = { x = (x0).toShort; y = (x0).toShort; z = (x0).toShort; this }
    def :~~(x0: Long): this.type = { x = (x0).toShort; y = (x0).toShort; z = (x0).toShort; this }
    def :~~(x0: Float): this.type = { x = (math.round(x0)).toShort; y = (math.round(x0)).toShort; z = (math.round(x0)).toShort; this }
    def :~~(x0: Double): this.type = { x = (math.round(x0)).toShort; y = (math.round(x0)).toShort; z = (math.round(x0)).toShort; this }
    def :~(sg3: GVec3S): this.type = { x = sg3.x; y = sg3.y; z = sg3.z; this }
    def :~(x0: Short, y0: Short, z0: Short): this.type = { x = x0; y = y0; z = z0; this }
    def :~~(ig3: GVec3I): this.type = { x = (ig3.x).toShort; y = (ig3.y).toShort; z = (ig3.z).toShort; this }
    def :~~(lg3: GVec3L): this.type = { x = (lg3.x).toShort; y = (lg3.y).toShort; z = (lg3.z).toShort; this }
    def :~~(fg3: GVec3F): this.type = { x = (math.round(fg3.x)).toShort; y = (math.round(fg3.y)).toShort; z = (math.round(fg3.z)).toShort; this }
    def :~~(dg3: GVec3D): this.type = { x = (math.round(dg3.x)).toShort; y = (math.round(dg3.y)).toShort; z = (math.round(dg3.z)).toShort; this }
    def +~(x0: Short): this.type = { x = (x + x0).toShort; y = (y + x0).toShort; z = (z + x0).toShort; this }
    def +~~(x0: Int): this.type = { x = ((x).toInt + x0).toShort; y = ((y).toInt + x0).toShort; z = ((z).toInt + x0).toShort; this }
    def +~~(x0: Long): this.type = { x = ((x).toLong + x0).toShort; y = ((y).toLong + x0).toShort; z = ((z).toLong + x0).toShort; this }
    def +~~(x0: Float): this.type = { x = (math.round((x).toFloat + x0)).toShort; y = (math.round((y).toFloat + x0)).toShort; z = (math.round((z).toFloat + x0)).toShort; this }
    def +~~(x0: Double): this.type = { x = (math.round((x).toDouble + x0)).toShort; y = (math.round((y).toDouble + x0)).toShort; z = (math.round((z).toDouble + x0)).toShort; this }
    def +~(sg3: GVec3S): this.type = { x = (x + sg3.x).toShort; y = (y + sg3.y).toShort; z = (z + sg3.z).toShort; this }
    def +~(x0: Short, y0: Short, z0: Short): this.type = { x = (x + x0).toShort; y = (y + y0).toShort; z = (z + z0).toShort; this }
    def +~~(ig3: GVec3I): this.type = { x = ((x).toInt + ig3.x).toShort; y = ((y).toInt + ig3.y).toShort; z = ((z).toInt + ig3.z).toShort; this }
    def +~~(lg3: GVec3L): this.type = { x = ((x).toLong + lg3.x).toShort; y = ((y).toLong + lg3.y).toShort; z = ((z).toLong + lg3.z).toShort; this }
    def +~~(fg3: GVec3F): this.type = { x = (math.round((x).toFloat + fg3.x)).toShort; y = (math.round((y).toFloat + fg3.y)).toShort; z = (math.round((z).toFloat + fg3.z)).toShort; this }
    def +~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble + dg3.x)).toShort; y = (math.round((y).toDouble + dg3.y)).toShort; z = (math.round((z).toDouble + dg3.z)).toShort; this }
    def -~(x0: Short): this.type = { x = (x - x0).toShort; y = (y - x0).toShort; z = (z - x0).toShort; this }
    def -~~(x0: Int): this.type = { x = ((x).toInt - x0).toShort; y = ((y).toInt - x0).toShort; z = ((z).toInt - x0).toShort; this }
    def -~~(x0: Long): this.type = { x = ((x).toLong - x0).toShort; y = ((y).toLong - x0).toShort; z = ((z).toLong - x0).toShort; this }
    def -~~(x0: Float): this.type = { x = (math.round((x).toFloat - x0)).toShort; y = (math.round((y).toFloat - x0)).toShort; z = (math.round((z).toFloat - x0)).toShort; this }
    def -~~(x0: Double): this.type = { x = (math.round((x).toDouble - x0)).toShort; y = (math.round((y).toDouble - x0)).toShort; z = (math.round((z).toDouble - x0)).toShort; this }
    def -~(sg3: GVec3S): this.type = { x = (x - sg3.x).toShort; y = (y - sg3.y).toShort; z = (z - sg3.z).toShort; this }
    def -~(x0: Short, y0: Short, z0: Short): this.type = { x = (x - x0).toShort; y = (y - y0).toShort; z = (z - z0).toShort; this }
    def -~~(ig3: GVec3I): this.type = { x = ((x).toInt - ig3.x).toShort; y = ((y).toInt - ig3.y).toShort; z = ((z).toInt - ig3.z).toShort; this }
    def -~~(lg3: GVec3L): this.type = { x = ((x).toLong - lg3.x).toShort; y = ((y).toLong - lg3.y).toShort; z = ((z).toLong - lg3.z).toShort; this }
    def -~~(fg3: GVec3F): this.type = { x = (math.round((x).toFloat - fg3.x)).toShort; y = (math.round((y).toFloat - fg3.y)).toShort; z = (math.round((z).toFloat - fg3.z)).toShort; this }
    def -~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble - dg3.x)).toShort; y = (math.round((y).toDouble - dg3.y)).toShort; z = (math.round((z).toDouble - dg3.z)).toShort; this }
    def *~(x0: Short): this.type = { x = (x * x0).toShort; y = (y * x0).toShort; z = (z * x0).toShort; this }
    def *~~(x0: Int): this.type = { x = ((x).toInt * x0).toShort; y = ((y).toInt * x0).toShort; z = ((z).toInt * x0).toShort; this }
    def *~~(x0: Long): this.type = { x = ((x).toLong * x0).toShort; y = ((y).toLong * x0).toShort; z = ((z).toLong * x0).toShort; this }
    def *~~(x0: Float): this.type = { x = (math.round((x).toFloat * x0)).toShort; y = (math.round((y).toFloat * x0)).toShort; z = (math.round((z).toFloat * x0)).toShort; this }
    def *~~(x0: Double): this.type = { x = (math.round((x).toDouble * x0)).toShort; y = (math.round((y).toDouble * x0)).toShort; z = (math.round((z).toDouble * x0)).toShort; this }
    def *~(sg3: GVec3S): this.type = { x = (x * sg3.x).toShort; y = (y * sg3.y).toShort; z = (z * sg3.z).toShort; this }
    def *~(x0: Short, y0: Short, z0: Short): this.type = { x = (x * x0).toShort; y = (y * y0).toShort; z = (z * z0).toShort; this }
    def *~~(ig3: GVec3I): this.type = { x = ((x).toInt * ig3.x).toShort; y = ((y).toInt * ig3.y).toShort; z = ((z).toInt * ig3.z).toShort; this }
    def *~~(lg3: GVec3L): this.type = { x = ((x).toLong * lg3.x).toShort; y = ((y).toLong * lg3.y).toShort; z = ((z).toLong * lg3.z).toShort; this }
    def *~~(fg3: GVec3F): this.type = { x = (math.round((x).toFloat * fg3.x)).toShort; y = (math.round((y).toFloat * fg3.y)).toShort; z = (math.round((z).toFloat * fg3.z)).toShort; this }
    def *~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble * dg3.x)).toShort; y = (math.round((y).toDouble * dg3.y)).toShort; z = (math.round((z).toDouble * dg3.z)).toShort; this }
    def /~(x0: Short): this.type = { x = (x / x0).toShort; y = (y / x0).toShort; z = (z / x0).toShort; this }
    def /~~(x0: Int): this.type = { x = ((x).toInt / x0).toShort; y = ((y).toInt / x0).toShort; z = ((z).toInt / x0).toShort; this }
    def /~~(x0: Long): this.type = { x = ((x).toLong / x0).toShort; y = ((y).toLong / x0).toShort; z = ((z).toLong / x0).toShort; this }
    def /~~(x0: Float): this.type = { x = (math.round((x).toFloat / x0)).toShort; y = (math.round((y).toFloat / x0)).toShort; z = (math.round((z).toFloat / x0)).toShort; this }
    def /~~(x0: Double): this.type = { x = (math.round((x).toDouble / x0)).toShort; y = (math.round((y).toDouble / x0)).toShort; z = (math.round((z).toDouble / x0)).toShort; this }
    def /~(sg3: GVec3S): this.type = { x = (x / sg3.x).toShort; y = (y / sg3.y).toShort; z = (z / sg3.z).toShort; this }
    def /~(x0: Short, y0: Short, z0: Short): this.type = { x = (x / x0).toShort; y = (y / y0).toShort; z = (z / z0).toShort; this }
    def /~~(ig3: GVec3I): this.type = { x = ((x).toInt / ig3.x).toShort; y = ((y).toInt / ig3.y).toShort; z = ((z).toInt / ig3.z).toShort; this }
    def /~~(lg3: GVec3L): this.type = { x = ((x).toLong / lg3.x).toShort; y = ((y).toLong / lg3.y).toShort; z = ((z).toLong / lg3.z).toShort; this }
    def /~~(fg3: GVec3F): this.type = { x = (math.round((x).toFloat / fg3.x)).toShort; y = (math.round((y).toFloat / fg3.y)).toShort; z = (math.round((z).toFloat / fg3.z)).toShort; this }
    def /~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble / dg3.x)).toShort; y = (math.round((y).toDouble / dg3.y)).toShort; z = (math.round((z).toDouble / dg3.z)).toShort; this }
    def crossEq(sg3: GVec3S): this.type = { val x0 = (y*sg3.z - z*sg3.y).toShort; val y0 = (z*sg3.x - x*sg3.z).toShort; z = (x*sg3.y - y*sg3.x).toShort; x = x0; y = y0; this }
    def crossEqCast(ig3: GVec3I): this.type = { val x0 = ((y).toInt*ig3.z - (z).toInt*ig3.y).toShort; val y0 = ((z).toInt*ig3.x - (x).toInt*ig3.z).toShort; z = ((x).toInt*ig3.y - (y).toInt*ig3.x).toShort; x = x0; y = y0; this }
    def crossEqCast(lg3: GVec3L): this.type = { val x0 = ((y).toLong*lg3.z - (z).toLong*lg3.y).toShort; val y0 = ((z).toLong*lg3.x - (x).toLong*lg3.z).toShort; z = ((x).toLong*lg3.y - (y).toLong*lg3.x).toShort; x = x0; y = y0; this }
    def crossEqCast(fg3: GVec3F): this.type = { val x0 = (math.round((y).toFloat*fg3.z - (z).toFloat*fg3.y)).toShort; val y0 = (math.round((z).toFloat*fg3.x - (x).toFloat*fg3.z)).toShort; z = (math.round((x).toFloat*fg3.y - (y).toFloat*fg3.x)).toShort; x = x0; y = y0; this }
    def crossEqCast(dg3: GVec3D): this.type = { val x0 = (math.round((y).toDouble*dg3.z - (z).toDouble*dg3.y)).toShort; val y0 = (math.round((z).toDouble*dg3.x - (x).toDouble*dg3.z)).toShort; z = (math.round((x).toDouble*dg3.y - (y).toDouble*dg3.x)).toShort; x = x0; y = y0; this }
    def maxEq(x0: Short): this.type = { x = (math.max(x,x0)).toShort; y = (math.max(y,x0)).toShort; z = (math.max(z,x0)).toShort; this }
    def maxEqCast(x0: Int): this.type = { x = (math.max((x).toInt,x0)).toShort; y = (math.max((y).toInt,x0)).toShort; z = (math.max((z).toInt,x0)).toShort; this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toLong,x0)).toShort; y = (math.max((y).toLong,x0)).toShort; z = (math.max((z).toLong,x0)).toShort; this }
    def maxEqCast(x0: Float): this.type = { x = (math.round(math.max((x).toFloat,x0))).toShort; y = (math.round(math.max((y).toFloat,x0))).toShort; z = (math.round(math.max((z).toFloat,x0))).toShort; this }
    def maxEqCast(x0: Double): this.type = { x = (math.round(math.max((x).toDouble,x0))).toShort; y = (math.round(math.max((y).toDouble,x0))).toShort; z = (math.round(math.max((z).toDouble,x0))).toShort; this }
    def maxEq(sg3: GVec3S): this.type = { x = (math.max(x,sg3.x)).toShort; y = (math.max(y,sg3.y)).toShort; z = (math.max(z,sg3.z)).toShort; this }
    def maxEq(x0: Short, y0: Short, z0: Short): this.type = { x = (math.max(x,x0)).toShort; y = (math.max(y,y0)).toShort; z = (math.max(z,z0)).toShort; this }
    def maxEqCast(ig3: GVec3I): this.type = { x = (math.max((x).toInt,ig3.x)).toShort; y = (math.max((y).toInt,ig3.y)).toShort; z = (math.max((z).toInt,ig3.z)).toShort; this }
    def maxEqCast(lg3: GVec3L): this.type = { x = (math.max((x).toLong,lg3.x)).toShort; y = (math.max((y).toLong,lg3.y)).toShort; z = (math.max((z).toLong,lg3.z)).toShort; this }
    def maxEqCast(fg3: GVec3F): this.type = { x = (math.round(math.max((x).toFloat,fg3.x))).toShort; y = (math.round(math.max((y).toFloat,fg3.y))).toShort; z = (math.round(math.max((z).toFloat,fg3.z))).toShort; this }
    def maxEqCast(dg3: GVec3D): this.type = { x = (math.round(math.max((x).toDouble,dg3.x))).toShort; y = (math.round(math.max((y).toDouble,dg3.y))).toShort; z = (math.round(math.max((z).toDouble,dg3.z))).toShort; this }
    def minEq(x0: Short): this.type = { x = (math.min(x,x0)).toShort; y = (math.min(y,x0)).toShort; z = (math.min(z,x0)).toShort; this }
    def minEqCast(x0: Int): this.type = { x = (math.min((x).toInt,x0)).toShort; y = (math.min((y).toInt,x0)).toShort; z = (math.min((z).toInt,x0)).toShort; this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toLong,x0)).toShort; y = (math.min((y).toLong,x0)).toShort; z = (math.min((z).toLong,x0)).toShort; this }
    def minEqCast(x0: Float): this.type = { x = (math.round(math.min((x).toFloat,x0))).toShort; y = (math.round(math.min((y).toFloat,x0))).toShort; z = (math.round(math.min((z).toFloat,x0))).toShort; this }
    def minEqCast(x0: Double): this.type = { x = (math.round(math.min((x).toDouble,x0))).toShort; y = (math.round(math.min((y).toDouble,x0))).toShort; z = (math.round(math.min((z).toDouble,x0))).toShort; this }
    def minEq(sg3: GVec3S): this.type = { x = (math.min(x,sg3.x)).toShort; y = (math.min(y,sg3.y)).toShort; z = (math.min(z,sg3.z)).toShort; this }
    def minEq(x0: Short, y0: Short, z0: Short): this.type = { x = (math.min(x,x0)).toShort; y = (math.min(y,y0)).toShort; z = (math.min(z,z0)).toShort; this }
    def minEqCast(ig3: GVec3I): this.type = { x = (math.min((x).toInt,ig3.x)).toShort; y = (math.min((y).toInt,ig3.y)).toShort; z = (math.min((z).toInt,ig3.z)).toShort; this }
    def minEqCast(lg3: GVec3L): this.type = { x = (math.min((x).toLong,lg3.x)).toShort; y = (math.min((y).toLong,lg3.y)).toShort; z = (math.min((z).toLong,lg3.z)).toShort; this }
    def minEqCast(fg3: GVec3F): this.type = { x = (math.round(math.min((x).toFloat,fg3.x))).toShort; y = (math.round(math.min((y).toFloat,fg3.y))).toShort; z = (math.round(math.min((z).toFloat,fg3.z))).toShort; this }
    def minEqCast(dg3: GVec3D): this.type = { x = (math.round(math.min((x).toDouble,dg3.x))).toShort; y = (math.round(math.min((y).toDouble,dg3.y))).toShort; z = (math.round(math.min((z).toDouble,dg3.z))).toShort; this }
    def operateEq(sg3: GVec3S)(fun: (Short,Short)=>Short) = { x = (fun(x,sg3.x)).toShort; y = (fun(y,sg3.y)).toShort; z = (fun(z,sg3.z)).toShort; this }
    def operateEqCast(ig3: GVec3I)(fun: (Int,Int)=>Int) = { x = (fun((x).toInt,ig3.x)).toShort; y = (fun((y).toInt,ig3.y)).toShort; z = (fun((z).toInt,ig3.z)).toShort; this }
    def operateEqCast(lg3: GVec3L)(fun: (Long,Long)=>Long) = { x = (fun((x).toLong,lg3.x)).toShort; y = (fun((y).toLong,lg3.y)).toShort; z = (fun((z).toLong,lg3.z)).toShort; this }
    def operateEqCast(fg3: GVec3F)(fun: (Float,Float)=>Float) = { x = (math.round(fun((x).toFloat,fg3.x))).toShort; y = (math.round(fun((y).toFloat,fg3.y))).toShort; z = (math.round(fun((z).toFloat,fg3.z))).toShort; this }
    def operateEqCast(dg3: GVec3D)(fun: (Double,Double)=>Double) = { x = (math.round(fun((x).toDouble,dg3.x))).toShort; y = (math.round(fun((y).toDouble,dg3.y))).toShort; z = (math.round(fun((z).toDouble,dg3.z))).toShort; this }
    def **~(sg33: GMat3S) = {val x0 = x*sg33.xx+y*sg33.yx+z*sg33.zx; val y0 = x*sg33.xy+y*sg33.yy+z*sg33.zy; val z0 = x*sg33.xz+y*sg33.yz+z*sg33.zz; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; this }
    def **~:(sg33: GMat3S) = {val x0 = x*sg33.xx+y*sg33.xy+z*sg33.xz; val y0 = x*sg33.yx+y*sg33.yy+z*sg33.yz; val z0 = x*sg33.zx+y*sg33.zy+z*sg33.zz; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; this }
    def **~~(ig33: GMat3I) = {val x0 = (x).toInt*ig33.xx+(y).toInt*ig33.yx+(z).toInt*ig33.zx; val y0 = (x).toInt*ig33.xy+(y).toInt*ig33.yy+(z).toInt*ig33.zy; val z0 = (x).toInt*ig33.xz+(y).toInt*ig33.yz+(z).toInt*ig33.zz; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; this }
    def **~~:(ig33: GMat3I) = {val x0 = (x).toInt*ig33.xx+(y).toInt*ig33.xy+(z).toInt*ig33.xz; val y0 = (x).toInt*ig33.yx+(y).toInt*ig33.yy+(z).toInt*ig33.yz; val z0 = (x).toInt*ig33.zx+(y).toInt*ig33.zy+(z).toInt*ig33.zz; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; this }
    def **~~(lg33: GMat3L) = {val x0 = (x).toLong*lg33.xx+(y).toLong*lg33.yx+(z).toLong*lg33.zx; val y0 = (x).toLong*lg33.xy+(y).toLong*lg33.yy+(z).toLong*lg33.zy; val z0 = (x).toLong*lg33.xz+(y).toLong*lg33.yz+(z).toLong*lg33.zz; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; this }
    def **~~:(lg33: GMat3L) = {val x0 = (x).toLong*lg33.xx+(y).toLong*lg33.xy+(z).toLong*lg33.xz; val y0 = (x).toLong*lg33.yx+(y).toLong*lg33.yy+(z).toLong*lg33.yz; val z0 = (x).toLong*lg33.zx+(y).toLong*lg33.zy+(z).toLong*lg33.zz; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; this }
    def **~~(fg33: GMat3F) = {val x0 = (x).toFloat*fg33.xx+(y).toFloat*fg33.yx+(z).toFloat*fg33.zx; val y0 = (x).toFloat*fg33.xy+(y).toFloat*fg33.yy+(z).toFloat*fg33.zy; val z0 = (x).toFloat*fg33.xz+(y).toFloat*fg33.yz+(z).toFloat*fg33.zz; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; this }
    def **~~:(fg33: GMat3F) = {val x0 = (x).toFloat*fg33.xx+(y).toFloat*fg33.xy+(z).toFloat*fg33.xz; val y0 = (x).toFloat*fg33.yx+(y).toFloat*fg33.yy+(z).toFloat*fg33.yz; val z0 = (x).toFloat*fg33.zx+(y).toFloat*fg33.zy+(z).toFloat*fg33.zz; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; this }
    def **~~(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx; val y0 = (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy; val z0 = (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; this }
    def **~~:(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.xy+(z).toDouble*dg33.xz; val y0 = (x).toDouble*dg33.yx+(y).toDouble*dg33.yy+(z).toDouble*dg33.yz; val z0 = (x).toDouble*dg33.zx+(y).toDouble*dg33.zy+(z).toDouble*dg33.zz; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; this }
  } // class AVec3S

  object AVec3S {
    def apply(x0: Short, y0: Short, z0: Short): AVec3S = new MVec3S(x0, y0, z0)
    def parse(str: String): AVec3S = IVec3S.parse(str).mut
    def zero: AVec3S = MVec3S.zero
    def xUnit: AVec3S = MVec3S.xUnit
    def yUnit: AVec3S = MVec3S.yUnit
    def zUnit: AVec3S = MVec3S.zUnit
  } // object AVec3S


  abstract class AVec3I extends GVec3I {
    def x_=(x0: Int): Unit
    def y_=(y0: Int): Unit
    def z_=(z0: Int): Unit
    override def clone(): AVec3I = new MVec3I(x, y, z)
    override def toS: AVec3S = new MVec3S((x).toShort, (y).toShort, (z).toShort)
    override def copy(x0: Int = x, y0: Int = y, z0: Int = z): AVec3I = new MVec3I(x0, y0, z0)
    override def trim: AVec2I = new MVec2I(x, y)
    override def pad(padding: Int = 1): AVec4I = new MVec4I(x, y, z, padding)
    def mapEq(fun: Int => Int): this.type = {x = fun(x); y = fun(y); z = fun(z); this }
    override def toL: AVec3L = new MVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: AVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: AVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def negEq: this.type = { x = -x; y = -y; z = -z; this }
    def :~(x0: Int): this.type = { x = x0; y = x0; z = x0; this }
    def :~~(x0: Long): this.type = { x = (x0).toInt; y = (x0).toInt; z = (x0).toInt; this }
    def :~~(x0: Float): this.type = { x = math.round(x0); y = math.round(x0); z = math.round(x0); this }
    def :~~(x0: Double): this.type = { x = (math.round(x0)).toInt; y = (math.round(x0)).toInt; z = (math.round(x0)).toInt; this }
    def :~(sg3: GVec3S): this.type = { x = (sg3.x).toInt; y = (sg3.y).toInt; z = (sg3.z).toInt; this }
    def :~(ig3: GVec3I): this.type = { x = ig3.x; y = ig3.y; z = ig3.z; this }
    def :~(x0: Int, y0: Int, z0: Int): this.type = { x = x0; y = y0; z = z0; this }
    def :~~(lg3: GVec3L): this.type = { x = (lg3.x).toInt; y = (lg3.y).toInt; z = (lg3.z).toInt; this }
    def :~~(fg3: GVec3F): this.type = { x = math.round(fg3.x); y = math.round(fg3.y); z = math.round(fg3.z); this }
    def :~~(dg3: GVec3D): this.type = { x = (math.round(dg3.x)).toInt; y = (math.round(dg3.y)).toInt; z = (math.round(dg3.z)).toInt; this }
    def +~(x0: Int): this.type = { x = x + x0; y = y + x0; z = z + x0; this }
    def +~~(x0: Long): this.type = { x = ((x).toLong + x0).toInt; y = ((y).toLong + x0).toInt; z = ((z).toLong + x0).toInt; this }
    def +~~(x0: Float): this.type = { x = math.round((x).toFloat + x0); y = math.round((y).toFloat + x0); z = math.round((z).toFloat + x0); this }
    def +~~(x0: Double): this.type = { x = (math.round((x).toDouble + x0)).toInt; y = (math.round((y).toDouble + x0)).toInt; z = (math.round((z).toDouble + x0)).toInt; this }
    def +~(sg3: GVec3S): this.type = { x = x + (sg3.x).toInt; y = y + (sg3.y).toInt; z = z + (sg3.z).toInt; this }
    def +~(ig3: GVec3I): this.type = { x = x + ig3.x; y = y + ig3.y; z = z + ig3.z; this }
    def +~(x0: Int, y0: Int, z0: Int): this.type = { x = x + x0; y = y + y0; z = z + z0; this }
    def +~~(lg3: GVec3L): this.type = { x = ((x).toLong + lg3.x).toInt; y = ((y).toLong + lg3.y).toInt; z = ((z).toLong + lg3.z).toInt; this }
    def +~~(fg3: GVec3F): this.type = { x = math.round((x).toFloat + fg3.x); y = math.round((y).toFloat + fg3.y); z = math.round((z).toFloat + fg3.z); this }
    def +~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble + dg3.x)).toInt; y = (math.round((y).toDouble + dg3.y)).toInt; z = (math.round((z).toDouble + dg3.z)).toInt; this }
    def -~(x0: Int): this.type = { x = x - x0; y = y - x0; z = z - x0; this }
    def -~~(x0: Long): this.type = { x = ((x).toLong - x0).toInt; y = ((y).toLong - x0).toInt; z = ((z).toLong - x0).toInt; this }
    def -~~(x0: Float): this.type = { x = math.round((x).toFloat - x0); y = math.round((y).toFloat - x0); z = math.round((z).toFloat - x0); this }
    def -~~(x0: Double): this.type = { x = (math.round((x).toDouble - x0)).toInt; y = (math.round((y).toDouble - x0)).toInt; z = (math.round((z).toDouble - x0)).toInt; this }
    def -~(sg3: GVec3S): this.type = { x = x - (sg3.x).toInt; y = y - (sg3.y).toInt; z = z - (sg3.z).toInt; this }
    def -~(ig3: GVec3I): this.type = { x = x - ig3.x; y = y - ig3.y; z = z - ig3.z; this }
    def -~(x0: Int, y0: Int, z0: Int): this.type = { x = x - x0; y = y - y0; z = z - z0; this }
    def -~~(lg3: GVec3L): this.type = { x = ((x).toLong - lg3.x).toInt; y = ((y).toLong - lg3.y).toInt; z = ((z).toLong - lg3.z).toInt; this }
    def -~~(fg3: GVec3F): this.type = { x = math.round((x).toFloat - fg3.x); y = math.round((y).toFloat - fg3.y); z = math.round((z).toFloat - fg3.z); this }
    def -~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble - dg3.x)).toInt; y = (math.round((y).toDouble - dg3.y)).toInt; z = (math.round((z).toDouble - dg3.z)).toInt; this }
    def *~(x0: Int): this.type = { x = x * x0; y = y * x0; z = z * x0; this }
    def *~~(x0: Long): this.type = { x = ((x).toLong * x0).toInt; y = ((y).toLong * x0).toInt; z = ((z).toLong * x0).toInt; this }
    def *~~(x0: Float): this.type = { x = math.round((x).toFloat * x0); y = math.round((y).toFloat * x0); z = math.round((z).toFloat * x0); this }
    def *~~(x0: Double): this.type = { x = (math.round((x).toDouble * x0)).toInt; y = (math.round((y).toDouble * x0)).toInt; z = (math.round((z).toDouble * x0)).toInt; this }
    def *~(sg3: GVec3S): this.type = { x = x * (sg3.x).toInt; y = y * (sg3.y).toInt; z = z * (sg3.z).toInt; this }
    def *~(ig3: GVec3I): this.type = { x = x * ig3.x; y = y * ig3.y; z = z * ig3.z; this }
    def *~(x0: Int, y0: Int, z0: Int): this.type = { x = x * x0; y = y * y0; z = z * z0; this }
    def *~~(lg3: GVec3L): this.type = { x = ((x).toLong * lg3.x).toInt; y = ((y).toLong * lg3.y).toInt; z = ((z).toLong * lg3.z).toInt; this }
    def *~~(fg3: GVec3F): this.type = { x = math.round((x).toFloat * fg3.x); y = math.round((y).toFloat * fg3.y); z = math.round((z).toFloat * fg3.z); this }
    def *~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble * dg3.x)).toInt; y = (math.round((y).toDouble * dg3.y)).toInt; z = (math.round((z).toDouble * dg3.z)).toInt; this }
    def /~(x0: Int): this.type = { x = x / x0; y = y / x0; z = z / x0; this }
    def /~~(x0: Long): this.type = { x = ((x).toLong / x0).toInt; y = ((y).toLong / x0).toInt; z = ((z).toLong / x0).toInt; this }
    def /~~(x0: Float): this.type = { x = math.round((x).toFloat / x0); y = math.round((y).toFloat / x0); z = math.round((z).toFloat / x0); this }
    def /~~(x0: Double): this.type = { x = (math.round((x).toDouble / x0)).toInt; y = (math.round((y).toDouble / x0)).toInt; z = (math.round((z).toDouble / x0)).toInt; this }
    def /~(sg3: GVec3S): this.type = { x = x / (sg3.x).toInt; y = y / (sg3.y).toInt; z = z / (sg3.z).toInt; this }
    def /~(ig3: GVec3I): this.type = { x = x / ig3.x; y = y / ig3.y; z = z / ig3.z; this }
    def /~(x0: Int, y0: Int, z0: Int): this.type = { x = x / x0; y = y / y0; z = z / z0; this }
    def /~~(lg3: GVec3L): this.type = { x = ((x).toLong / lg3.x).toInt; y = ((y).toLong / lg3.y).toInt; z = ((z).toLong / lg3.z).toInt; this }
    def /~~(fg3: GVec3F): this.type = { x = math.round((x).toFloat / fg3.x); y = math.round((y).toFloat / fg3.y); z = math.round((z).toFloat / fg3.z); this }
    def /~~(dg3: GVec3D): this.type = { x = (math.round((x).toDouble / dg3.x)).toInt; y = (math.round((y).toDouble / dg3.y)).toInt; z = (math.round((z).toDouble / dg3.z)).toInt; this }
    def crossEq(sg3: GVec3S): this.type = { val x0 = y*(sg3.z).toInt - z*(sg3.y).toInt; val y0 = z*(sg3.x).toInt - x*(sg3.z).toInt; z = x*(sg3.y).toInt - y*(sg3.x).toInt; x = x0; y = y0; this }
    def crossEq(ig3: GVec3I): this.type = { val x0 = y*ig3.z - z*ig3.y; val y0 = z*ig3.x - x*ig3.z; z = x*ig3.y - y*ig3.x; x = x0; y = y0; this }
    def crossEqCast(lg3: GVec3L): this.type = { val x0 = ((y).toLong*lg3.z - (z).toLong*lg3.y).toInt; val y0 = ((z).toLong*lg3.x - (x).toLong*lg3.z).toInt; z = ((x).toLong*lg3.y - (y).toLong*lg3.x).toInt; x = x0; y = y0; this }
    def crossEqCast(fg3: GVec3F): this.type = { val x0 = math.round((y).toFloat*fg3.z - (z).toFloat*fg3.y); val y0 = math.round((z).toFloat*fg3.x - (x).toFloat*fg3.z); z = math.round((x).toFloat*fg3.y - (y).toFloat*fg3.x); x = x0; y = y0; this }
    def crossEqCast(dg3: GVec3D): this.type = { val x0 = (math.round((y).toDouble*dg3.z - (z).toDouble*dg3.y)).toInt; val y0 = (math.round((z).toDouble*dg3.x - (x).toDouble*dg3.z)).toInt; z = (math.round((x).toDouble*dg3.y - (y).toDouble*dg3.x)).toInt; x = x0; y = y0; this }
    def maxEq(x0: Int): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toLong,x0)).toInt; y = (math.max((y).toLong,x0)).toInt; z = (math.max((z).toLong,x0)).toInt; this }
    def maxEqCast(x0: Float): this.type = { x = math.round(math.max((x).toFloat,x0)); y = math.round(math.max((y).toFloat,x0)); z = math.round(math.max((z).toFloat,x0)); this }
    def maxEqCast(x0: Double): this.type = { x = (math.round(math.max((x).toDouble,x0))).toInt; y = (math.round(math.max((y).toDouble,x0))).toInt; z = (math.round(math.max((z).toDouble,x0))).toInt; this }
    def maxEq(sg3: GVec3S): this.type = { x = math.max(x,(sg3.x).toInt); y = math.max(y,(sg3.y).toInt); z = math.max(z,(sg3.z).toInt); this }
    def maxEq(ig3: GVec3I): this.type = { x = math.max(x,ig3.x); y = math.max(y,ig3.y); z = math.max(z,ig3.z); this }
    def maxEq(x0: Int, y0: Int, z0: Int): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); this }
    def maxEqCast(lg3: GVec3L): this.type = { x = (math.max((x).toLong,lg3.x)).toInt; y = (math.max((y).toLong,lg3.y)).toInt; z = (math.max((z).toLong,lg3.z)).toInt; this }
    def maxEqCast(fg3: GVec3F): this.type = { x = math.round(math.max((x).toFloat,fg3.x)); y = math.round(math.max((y).toFloat,fg3.y)); z = math.round(math.max((z).toFloat,fg3.z)); this }
    def maxEqCast(dg3: GVec3D): this.type = { x = (math.round(math.max((x).toDouble,dg3.x))).toInt; y = (math.round(math.max((y).toDouble,dg3.y))).toInt; z = (math.round(math.max((z).toDouble,dg3.z))).toInt; this }
    def minEq(x0: Int): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toLong,x0)).toInt; y = (math.min((y).toLong,x0)).toInt; z = (math.min((z).toLong,x0)).toInt; this }
    def minEqCast(x0: Float): this.type = { x = math.round(math.min((x).toFloat,x0)); y = math.round(math.min((y).toFloat,x0)); z = math.round(math.min((z).toFloat,x0)); this }
    def minEqCast(x0: Double): this.type = { x = (math.round(math.min((x).toDouble,x0))).toInt; y = (math.round(math.min((y).toDouble,x0))).toInt; z = (math.round(math.min((z).toDouble,x0))).toInt; this }
    def minEq(sg3: GVec3S): this.type = { x = math.min(x,(sg3.x).toInt); y = math.min(y,(sg3.y).toInt); z = math.min(z,(sg3.z).toInt); this }
    def minEq(ig3: GVec3I): this.type = { x = math.min(x,ig3.x); y = math.min(y,ig3.y); z = math.min(z,ig3.z); this }
    def minEq(x0: Int, y0: Int, z0: Int): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); this }
    def minEqCast(lg3: GVec3L): this.type = { x = (math.min((x).toLong,lg3.x)).toInt; y = (math.min((y).toLong,lg3.y)).toInt; z = (math.min((z).toLong,lg3.z)).toInt; this }
    def minEqCast(fg3: GVec3F): this.type = { x = math.round(math.min((x).toFloat,fg3.x)); y = math.round(math.min((y).toFloat,fg3.y)); z = math.round(math.min((z).toFloat,fg3.z)); this }
    def minEqCast(dg3: GVec3D): this.type = { x = (math.round(math.min((x).toDouble,dg3.x))).toInt; y = (math.round(math.min((y).toDouble,dg3.y))).toInt; z = (math.round(math.min((z).toDouble,dg3.z))).toInt; this }
    def operateEq(sg3: GVec3S)(fun: (Int,Int)=>Int) = { x = fun(x,(sg3.x).toInt); y = fun(y,(sg3.y).toInt); z = fun(z,(sg3.z).toInt); this }
    def operateEq(ig3: GVec3I)(fun: (Int,Int)=>Int) = { x = fun(x,ig3.x); y = fun(y,ig3.y); z = fun(z,ig3.z); this }
    def operateEqCast(lg3: GVec3L)(fun: (Long,Long)=>Long) = { x = (fun((x).toLong,lg3.x)).toInt; y = (fun((y).toLong,lg3.y)).toInt; z = (fun((z).toLong,lg3.z)).toInt; this }
    def operateEqCast(fg3: GVec3F)(fun: (Float,Float)=>Float) = { x = math.round(fun((x).toFloat,fg3.x)); y = math.round(fun((y).toFloat,fg3.y)); z = math.round(fun((z).toFloat,fg3.z)); this }
    def operateEqCast(dg3: GVec3D)(fun: (Double,Double)=>Double) = { x = (math.round(fun((x).toDouble,dg3.x))).toInt; y = (math.round(fun((y).toDouble,dg3.y))).toInt; z = (math.round(fun((z).toDouble,dg3.z))).toInt; this }
    def **~(sg33: GMat3S) = {val x0 = x*(sg33.xx).toInt+y*(sg33.yx).toInt+z*(sg33.zx).toInt; val y0 = x*(sg33.xy).toInt+y*(sg33.yy).toInt+z*(sg33.zy).toInt; val z0 = x*(sg33.xz).toInt+y*(sg33.yz).toInt+z*(sg33.zz).toInt; x = x0; y = y0; z = z0; this }
    def **~:(sg33: GMat3S) = {val x0 = x*(sg33.xx).toInt+y*(sg33.xy).toInt+z*(sg33.xz).toInt; val y0 = x*(sg33.yx).toInt+y*(sg33.yy).toInt+z*(sg33.yz).toInt; val z0 = x*(sg33.zx).toInt+y*(sg33.zy).toInt+z*(sg33.zz).toInt; x = x0; y = y0; z = z0; this }
    def **~(ig33: GMat3I) = {val x0 = x*ig33.xx+y*ig33.yx+z*ig33.zx; val y0 = x*ig33.xy+y*ig33.yy+z*ig33.zy; val z0 = x*ig33.xz+y*ig33.yz+z*ig33.zz; x = x0; y = y0; z = z0; this }
    def **~:(ig33: GMat3I) = {val x0 = x*ig33.xx+y*ig33.xy+z*ig33.xz; val y0 = x*ig33.yx+y*ig33.yy+z*ig33.yz; val z0 = x*ig33.zx+y*ig33.zy+z*ig33.zz; x = x0; y = y0; z = z0; this }
    def **~~(lg33: GMat3L) = {val x0 = (x).toLong*lg33.xx+(y).toLong*lg33.yx+(z).toLong*lg33.zx; val y0 = (x).toLong*lg33.xy+(y).toLong*lg33.yy+(z).toLong*lg33.zy; val z0 = (x).toLong*lg33.xz+(y).toLong*lg33.yz+(z).toLong*lg33.zz; x = (x0).toInt; y = (y0).toInt; z = (z0).toInt; this }
    def **~~:(lg33: GMat3L) = {val x0 = (x).toLong*lg33.xx+(y).toLong*lg33.xy+(z).toLong*lg33.xz; val y0 = (x).toLong*lg33.yx+(y).toLong*lg33.yy+(z).toLong*lg33.yz; val z0 = (x).toLong*lg33.zx+(y).toLong*lg33.zy+(z).toLong*lg33.zz; x = (x0).toInt; y = (y0).toInt; z = (z0).toInt; this }
    def **~~(fg33: GMat3F) = {val x0 = (x).toFloat*fg33.xx+(y).toFloat*fg33.yx+(z).toFloat*fg33.zx; val y0 = (x).toFloat*fg33.xy+(y).toFloat*fg33.yy+(z).toFloat*fg33.zy; val z0 = (x).toFloat*fg33.xz+(y).toFloat*fg33.yz+(z).toFloat*fg33.zz; x = math.round(x0); y = math.round(y0); z = math.round(z0); this }
    def **~~:(fg33: GMat3F) = {val x0 = (x).toFloat*fg33.xx+(y).toFloat*fg33.xy+(z).toFloat*fg33.xz; val y0 = (x).toFloat*fg33.yx+(y).toFloat*fg33.yy+(z).toFloat*fg33.yz; val z0 = (x).toFloat*fg33.zx+(y).toFloat*fg33.zy+(z).toFloat*fg33.zz; x = math.round(x0); y = math.round(y0); z = math.round(z0); this }
    def **~~(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx; val y0 = (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy; val z0 = (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz; x = (math.round(x0)).toInt; y = (math.round(y0)).toInt; z = (math.round(z0)).toInt; this }
    def **~~:(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.xy+(z).toDouble*dg33.xz; val y0 = (x).toDouble*dg33.yx+(y).toDouble*dg33.yy+(z).toDouble*dg33.yz; val z0 = (x).toDouble*dg33.zx+(y).toDouble*dg33.zy+(z).toDouble*dg33.zz; x = (math.round(x0)).toInt; y = (math.round(y0)).toInt; z = (math.round(z0)).toInt; this }
  } // class AVec3I

  object AVec3I {
    def apply(x0: Int, y0: Int, z0: Int): AVec3I = new MVec3I(x0, y0, z0)
    def parse(str: String): AVec3I = IVec3I.parse(str).mut
    def zero: AVec3I = MVec3I.zero
    def xUnit: AVec3I = MVec3I.xUnit
    def yUnit: AVec3I = MVec3I.yUnit
    def zUnit: AVec3I = MVec3I.zUnit
  } // object AVec3I


  abstract class AVec3L extends GVec3L {
    def x_=(x0: Long): Unit
    def y_=(y0: Long): Unit
    def z_=(z0: Long): Unit
    override def clone(): AVec3L = new MVec3L(x, y, z)
    override def toS: AVec3S = new MVec3S((x).toShort, (y).toShort, (z).toShort)
    override def toI: AVec3I = new MVec3I((x).toInt, (y).toInt, (z).toInt)
    override def copy(x0: Long = x, y0: Long = y, z0: Long = z): AVec3L = new MVec3L(x0, y0, z0)
    override def trim: AVec2L = new MVec2L(x, y)
    override def pad(padding: Long = 1): AVec4L = new MVec4L(x, y, z, padding)
    def mapEq(fun: Long => Long): this.type = {x = fun(x); y = fun(y); z = fun(z); this }
    override def toF: AVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: AVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def negEq: this.type = { x = -x; y = -y; z = -z; this }
    def :~(x0: Long): this.type = { x = x0; y = x0; z = x0; this }
    def :~~(x0: Double): this.type = { x = math.round(x0); y = math.round(x0); z = math.round(x0); this }
    def :~(sg3: GVec3S): this.type = { x = (sg3.x).toLong; y = (sg3.y).toLong; z = (sg3.z).toLong; this }
    def :~(ig3: GVec3I): this.type = { x = (ig3.x).toLong; y = (ig3.y).toLong; z = (ig3.z).toLong; this }
    def :~(lg3: GVec3L): this.type = { x = lg3.x; y = lg3.y; z = lg3.z; this }
    def :~(x0: Long, y0: Long, z0: Long): this.type = { x = x0; y = y0; z = z0; this }
    def :~~(fg3: GVec3F): this.type = { x = math.round((fg3.x).toDouble); y = math.round((fg3.y).toDouble); z = math.round((fg3.z).toDouble); this }
    def :~~(dg3: GVec3D): this.type = { x = math.round(dg3.x); y = math.round(dg3.y); z = math.round(dg3.z); this }
    def +~(x0: Long): this.type = { x = x + x0; y = y + x0; z = z + x0; this }
    def +~~(x0: Double): this.type = { x = math.round((x).toDouble + x0); y = math.round((y).toDouble + x0); z = math.round((z).toDouble + x0); this }
    def +~(sg3: GVec3S): this.type = { x = x + (sg3.x).toLong; y = y + (sg3.y).toLong; z = z + (sg3.z).toLong; this }
    def +~(ig3: GVec3I): this.type = { x = x + (ig3.x).toLong; y = y + (ig3.y).toLong; z = z + (ig3.z).toLong; this }
    def +~(lg3: GVec3L): this.type = { x = x + lg3.x; y = y + lg3.y; z = z + lg3.z; this }
    def +~(x0: Long, y0: Long, z0: Long): this.type = { x = x + x0; y = y + y0; z = z + z0; this }
    def +~~(fg3: GVec3F): this.type = { x = math.round((x).toDouble + (fg3.x).toDouble); y = math.round((y).toDouble + (fg3.y).toDouble); z = math.round((z).toDouble + (fg3.z).toDouble); this }
    def +~~(dg3: GVec3D): this.type = { x = math.round((x).toDouble + dg3.x); y = math.round((y).toDouble + dg3.y); z = math.round((z).toDouble + dg3.z); this }
    def -~(x0: Long): this.type = { x = x - x0; y = y - x0; z = z - x0; this }
    def -~~(x0: Double): this.type = { x = math.round((x).toDouble - x0); y = math.round((y).toDouble - x0); z = math.round((z).toDouble - x0); this }
    def -~(sg3: GVec3S): this.type = { x = x - (sg3.x).toLong; y = y - (sg3.y).toLong; z = z - (sg3.z).toLong; this }
    def -~(ig3: GVec3I): this.type = { x = x - (ig3.x).toLong; y = y - (ig3.y).toLong; z = z - (ig3.z).toLong; this }
    def -~(lg3: GVec3L): this.type = { x = x - lg3.x; y = y - lg3.y; z = z - lg3.z; this }
    def -~(x0: Long, y0: Long, z0: Long): this.type = { x = x - x0; y = y - y0; z = z - z0; this }
    def -~~(fg3: GVec3F): this.type = { x = math.round((x).toDouble - (fg3.x).toDouble); y = math.round((y).toDouble - (fg3.y).toDouble); z = math.round((z).toDouble - (fg3.z).toDouble); this }
    def -~~(dg3: GVec3D): this.type = { x = math.round((x).toDouble - dg3.x); y = math.round((y).toDouble - dg3.y); z = math.round((z).toDouble - dg3.z); this }
    def *~(x0: Long): this.type = { x = x * x0; y = y * x0; z = z * x0; this }
    def *~~(x0: Double): this.type = { x = math.round((x).toDouble * x0); y = math.round((y).toDouble * x0); z = math.round((z).toDouble * x0); this }
    def *~(sg3: GVec3S): this.type = { x = x * (sg3.x).toLong; y = y * (sg3.y).toLong; z = z * (sg3.z).toLong; this }
    def *~(ig3: GVec3I): this.type = { x = x * (ig3.x).toLong; y = y * (ig3.y).toLong; z = z * (ig3.z).toLong; this }
    def *~(lg3: GVec3L): this.type = { x = x * lg3.x; y = y * lg3.y; z = z * lg3.z; this }
    def *~(x0: Long, y0: Long, z0: Long): this.type = { x = x * x0; y = y * y0; z = z * z0; this }
    def *~~(fg3: GVec3F): this.type = { x = math.round((x).toDouble * (fg3.x).toDouble); y = math.round((y).toDouble * (fg3.y).toDouble); z = math.round((z).toDouble * (fg3.z).toDouble); this }
    def *~~(dg3: GVec3D): this.type = { x = math.round((x).toDouble * dg3.x); y = math.round((y).toDouble * dg3.y); z = math.round((z).toDouble * dg3.z); this }
    def /~(x0: Long): this.type = { x = x / x0; y = y / x0; z = z / x0; this }
    def /~~(x0: Double): this.type = { x = math.round((x).toDouble / x0); y = math.round((y).toDouble / x0); z = math.round((z).toDouble / x0); this }
    def /~(sg3: GVec3S): this.type = { x = x / (sg3.x).toLong; y = y / (sg3.y).toLong; z = z / (sg3.z).toLong; this }
    def /~(ig3: GVec3I): this.type = { x = x / (ig3.x).toLong; y = y / (ig3.y).toLong; z = z / (ig3.z).toLong; this }
    def /~(lg3: GVec3L): this.type = { x = x / lg3.x; y = y / lg3.y; z = z / lg3.z; this }
    def /~(x0: Long, y0: Long, z0: Long): this.type = { x = x / x0; y = y / y0; z = z / z0; this }
    def /~~(fg3: GVec3F): this.type = { x = math.round((x).toDouble / (fg3.x).toDouble); y = math.round((y).toDouble / (fg3.y).toDouble); z = math.round((z).toDouble / (fg3.z).toDouble); this }
    def /~~(dg3: GVec3D): this.type = { x = math.round((x).toDouble / dg3.x); y = math.round((y).toDouble / dg3.y); z = math.round((z).toDouble / dg3.z); this }
    def crossEq(sg3: GVec3S): this.type = { val x0 = y*(sg3.z).toLong - z*(sg3.y).toLong; val y0 = z*(sg3.x).toLong - x*(sg3.z).toLong; z = x*(sg3.y).toLong - y*(sg3.x).toLong; x = x0; y = y0; this }
    def crossEq(ig3: GVec3I): this.type = { val x0 = y*(ig3.z).toLong - z*(ig3.y).toLong; val y0 = z*(ig3.x).toLong - x*(ig3.z).toLong; z = x*(ig3.y).toLong - y*(ig3.x).toLong; x = x0; y = y0; this }
    def crossEq(lg3: GVec3L): this.type = { val x0 = y*lg3.z - z*lg3.y; val y0 = z*lg3.x - x*lg3.z; z = x*lg3.y - y*lg3.x; x = x0; y = y0; this }
    def crossEqCast(fg3: GVec3F): this.type = { val x0 = math.round((y).toDouble*(fg3.z).toDouble - (z).toDouble*(fg3.y).toDouble); val y0 = math.round((z).toDouble*(fg3.x).toDouble - (x).toDouble*(fg3.z).toDouble); z = math.round((x).toDouble*(fg3.y).toDouble - (y).toDouble*(fg3.x).toDouble); x = x0; y = y0; this }
    def crossEqCast(dg3: GVec3D): this.type = { val x0 = math.round((y).toDouble*dg3.z - (z).toDouble*dg3.y); val y0 = math.round((z).toDouble*dg3.x - (x).toDouble*dg3.z); z = math.round((x).toDouble*dg3.y - (y).toDouble*dg3.x); x = x0; y = y0; this }
    def maxEq(x0: Long): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); this }
    def maxEqCast(x0: Double): this.type = { x = math.round(math.max((x).toDouble,x0)); y = math.round(math.max((y).toDouble,x0)); z = math.round(math.max((z).toDouble,x0)); this }
    def maxEq(sg3: GVec3S): this.type = { x = math.max(x,(sg3.x).toLong); y = math.max(y,(sg3.y).toLong); z = math.max(z,(sg3.z).toLong); this }
    def maxEq(ig3: GVec3I): this.type = { x = math.max(x,(ig3.x).toLong); y = math.max(y,(ig3.y).toLong); z = math.max(z,(ig3.z).toLong); this }
    def maxEq(lg3: GVec3L): this.type = { x = math.max(x,lg3.x); y = math.max(y,lg3.y); z = math.max(z,lg3.z); this }
    def maxEq(x0: Long, y0: Long, z0: Long): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); this }
    def maxEqCast(fg3: GVec3F): this.type = { x = math.round(math.max((x).toDouble,(fg3.x).toDouble)); y = math.round(math.max((y).toDouble,(fg3.y).toDouble)); z = math.round(math.max((z).toDouble,(fg3.z).toDouble)); this }
    def maxEqCast(dg3: GVec3D): this.type = { x = math.round(math.max((x).toDouble,dg3.x)); y = math.round(math.max((y).toDouble,dg3.y)); z = math.round(math.max((z).toDouble,dg3.z)); this }
    def minEq(x0: Long): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); this }
    def minEqCast(x0: Double): this.type = { x = math.round(math.min((x).toDouble,x0)); y = math.round(math.min((y).toDouble,x0)); z = math.round(math.min((z).toDouble,x0)); this }
    def minEq(sg3: GVec3S): this.type = { x = math.min(x,(sg3.x).toLong); y = math.min(y,(sg3.y).toLong); z = math.min(z,(sg3.z).toLong); this }
    def minEq(ig3: GVec3I): this.type = { x = math.min(x,(ig3.x).toLong); y = math.min(y,(ig3.y).toLong); z = math.min(z,(ig3.z).toLong); this }
    def minEq(lg3: GVec3L): this.type = { x = math.min(x,lg3.x); y = math.min(y,lg3.y); z = math.min(z,lg3.z); this }
    def minEq(x0: Long, y0: Long, z0: Long): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); this }
    def minEqCast(fg3: GVec3F): this.type = { x = math.round(math.min((x).toDouble,(fg3.x).toDouble)); y = math.round(math.min((y).toDouble,(fg3.y).toDouble)); z = math.round(math.min((z).toDouble,(fg3.z).toDouble)); this }
    def minEqCast(dg3: GVec3D): this.type = { x = math.round(math.min((x).toDouble,dg3.x)); y = math.round(math.min((y).toDouble,dg3.y)); z = math.round(math.min((z).toDouble,dg3.z)); this }
    def operateEq(sg3: GVec3S)(fun: (Long,Long)=>Long) = { x = fun(x,(sg3.x).toLong); y = fun(y,(sg3.y).toLong); z = fun(z,(sg3.z).toLong); this }
    def operateEq(ig3: GVec3I)(fun: (Long,Long)=>Long) = { x = fun(x,(ig3.x).toLong); y = fun(y,(ig3.y).toLong); z = fun(z,(ig3.z).toLong); this }
    def operateEq(lg3: GVec3L)(fun: (Long,Long)=>Long) = { x = fun(x,lg3.x); y = fun(y,lg3.y); z = fun(z,lg3.z); this }
    def operateEqCast(fg3: GVec3F)(fun: (Double,Double)=>Double) = { x = math.round(fun((x).toDouble,(fg3.x).toDouble)); y = math.round(fun((y).toDouble,(fg3.y).toDouble)); z = math.round(fun((z).toDouble,(fg3.z).toDouble)); this }
    def operateEqCast(dg3: GVec3D)(fun: (Double,Double)=>Double) = { x = math.round(fun((x).toDouble,dg3.x)); y = math.round(fun((y).toDouble,dg3.y)); z = math.round(fun((z).toDouble,dg3.z)); this }
    def **~(sg33: GMat3S) = {val x0 = x*(sg33.xx).toLong+y*(sg33.yx).toLong+z*(sg33.zx).toLong; val y0 = x*(sg33.xy).toLong+y*(sg33.yy).toLong+z*(sg33.zy).toLong; val z0 = x*(sg33.xz).toLong+y*(sg33.yz).toLong+z*(sg33.zz).toLong; x = x0; y = y0; z = z0; this }
    def **~:(sg33: GMat3S) = {val x0 = x*(sg33.xx).toLong+y*(sg33.xy).toLong+z*(sg33.xz).toLong; val y0 = x*(sg33.yx).toLong+y*(sg33.yy).toLong+z*(sg33.yz).toLong; val z0 = x*(sg33.zx).toLong+y*(sg33.zy).toLong+z*(sg33.zz).toLong; x = x0; y = y0; z = z0; this }
    def **~(ig33: GMat3I) = {val x0 = x*(ig33.xx).toLong+y*(ig33.yx).toLong+z*(ig33.zx).toLong; val y0 = x*(ig33.xy).toLong+y*(ig33.yy).toLong+z*(ig33.zy).toLong; val z0 = x*(ig33.xz).toLong+y*(ig33.yz).toLong+z*(ig33.zz).toLong; x = x0; y = y0; z = z0; this }
    def **~:(ig33: GMat3I) = {val x0 = x*(ig33.xx).toLong+y*(ig33.xy).toLong+z*(ig33.xz).toLong; val y0 = x*(ig33.yx).toLong+y*(ig33.yy).toLong+z*(ig33.yz).toLong; val z0 = x*(ig33.zx).toLong+y*(ig33.zy).toLong+z*(ig33.zz).toLong; x = x0; y = y0; z = z0; this }
    def **~(lg33: GMat3L) = {val x0 = x*lg33.xx+y*lg33.yx+z*lg33.zx; val y0 = x*lg33.xy+y*lg33.yy+z*lg33.zy; val z0 = x*lg33.xz+y*lg33.yz+z*lg33.zz; x = x0; y = y0; z = z0; this }
    def **~:(lg33: GMat3L) = {val x0 = x*lg33.xx+y*lg33.xy+z*lg33.xz; val y0 = x*lg33.yx+y*lg33.yy+z*lg33.yz; val z0 = x*lg33.zx+y*lg33.zy+z*lg33.zz; x = x0; y = y0; z = z0; this }
    def **~~(fg33: GMat3F) = {val x0 = (x).toDouble*(fg33.xx).toDouble+(y).toDouble*(fg33.yx).toDouble+(z).toDouble*(fg33.zx).toDouble; val y0 = (x).toDouble*(fg33.xy).toDouble+(y).toDouble*(fg33.yy).toDouble+(z).toDouble*(fg33.zy).toDouble; val z0 = (x).toDouble*(fg33.xz).toDouble+(y).toDouble*(fg33.yz).toDouble+(z).toDouble*(fg33.zz).toDouble; x = math.round(x0); y = math.round(y0); z = math.round(z0); this }
    def **~~:(fg33: GMat3F) = {val x0 = (x).toDouble*(fg33.xx).toDouble+(y).toDouble*(fg33.xy).toDouble+(z).toDouble*(fg33.xz).toDouble; val y0 = (x).toDouble*(fg33.yx).toDouble+(y).toDouble*(fg33.yy).toDouble+(z).toDouble*(fg33.yz).toDouble; val z0 = (x).toDouble*(fg33.zx).toDouble+(y).toDouble*(fg33.zy).toDouble+(z).toDouble*(fg33.zz).toDouble; x = math.round(x0); y = math.round(y0); z = math.round(z0); this }
    def **~~(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx; val y0 = (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy; val z0 = (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz; x = math.round(x0); y = math.round(y0); z = math.round(z0); this }
    def **~~:(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.xy+(z).toDouble*dg33.xz; val y0 = (x).toDouble*dg33.yx+(y).toDouble*dg33.yy+(z).toDouble*dg33.yz; val z0 = (x).toDouble*dg33.zx+(y).toDouble*dg33.zy+(z).toDouble*dg33.zz; x = math.round(x0); y = math.round(y0); z = math.round(z0); this }
  } // class AVec3L

  object AVec3L {
    def apply(x0: Long, y0: Long, z0: Long): AVec3L = new MVec3L(x0, y0, z0)
    def parse(str: String): AVec3L = IVec3L.parse(str).mut
    def zero: AVec3L = MVec3L.zero
    def xUnit: AVec3L = MVec3L.xUnit
    def yUnit: AVec3L = MVec3L.yUnit
    def zUnit: AVec3L = MVec3L.zUnit
  } // object AVec3L


  abstract class AVec3F extends GVec3F {
    def x_=(x0: Float): Unit
    def y_=(y0: Float): Unit
    def z_=(z0: Float): Unit
    override def clone(): AVec3F = new MVec3F(x, y, z)
    override def toS: AVec3S = new MVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: AVec3I = new MVec3I(math.round(x), math.round(y), math.round(z))
    override def toL: AVec3L = new MVec3L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble))
    override def copy(x0: Float = x, y0: Float = y, z0: Float = z): AVec3F = new MVec3F(x0, y0, z0)
    override def trim: AVec2F = new MVec2F(x, y)
    override def pad(padding: Float = 1): AVec4F = new MVec4F(x, y, z, padding)
    def mapEq(fun: Float => Float): this.type = {x = fun(x); y = fun(y); z = fun(z); this }
    override def toD: AVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
    def negEq: this.type = { x = -x; y = -y; z = -z; this }
    def normEq: this.type = { val k0 = 1/this.len; x = x*k0; y = y*k0; z = z*k0; this }
    def :~~(x0: Long): this.type = { x = (x0).toFloat; y = (x0).toFloat; z = (x0).toFloat; this }
    def :~(x0: Float): this.type = { x = x0; y = x0; z = x0; this }
    def :~~(x0: Double): this.type = { x = (x0).toFloat; y = (x0).toFloat; z = (x0).toFloat; this }
    def :~(sg3: GVec3S): this.type = { x = (sg3.x).toFloat; y = (sg3.y).toFloat; z = (sg3.z).toFloat; this }
    def :~(ig3: GVec3I): this.type = { x = (ig3.x).toFloat; y = (ig3.y).toFloat; z = (ig3.z).toFloat; this }
    def :~~(lg3: GVec3L): this.type = { x = ((lg3.x).toDouble).toFloat; y = ((lg3.y).toDouble).toFloat; z = ((lg3.z).toDouble).toFloat; this }
    def :~(fg3: GVec3F): this.type = { x = fg3.x; y = fg3.y; z = fg3.z; this }
    def :~(x0: Float, y0: Float, z0: Float): this.type = { x = x0; y = y0; z = z0; this }
    def :~~(dg3: GVec3D): this.type = { x = (dg3.x).toFloat; y = (dg3.y).toFloat; z = (dg3.z).toFloat; this }
    def +~~(x0: Long): this.type = { x = ((x).toDouble + (x0).toDouble).toFloat; y = ((y).toDouble + (x0).toDouble).toFloat; z = ((z).toDouble + (x0).toDouble).toFloat; this }
    def +~(x0: Float): this.type = { x = x + x0; y = y + x0; z = z + x0; this }
    def +~~(x0: Double): this.type = { x = ((x).toDouble + x0).toFloat; y = ((y).toDouble + x0).toFloat; z = ((z).toDouble + x0).toFloat; this }
    def +~(sg3: GVec3S): this.type = { x = x + (sg3.x).toFloat; y = y + (sg3.y).toFloat; z = z + (sg3.z).toFloat; this }
    def +~(ig3: GVec3I): this.type = { x = x + (ig3.x).toFloat; y = y + (ig3.y).toFloat; z = z + (ig3.z).toFloat; this }
    def +~~(lg3: GVec3L): this.type = { x = ((x).toDouble + (lg3.x).toDouble).toFloat; y = ((y).toDouble + (lg3.y).toDouble).toFloat; z = ((z).toDouble + (lg3.z).toDouble).toFloat; this }
    def +~(fg3: GVec3F): this.type = { x = x + fg3.x; y = y + fg3.y; z = z + fg3.z; this }
    def +~(x0: Float, y0: Float, z0: Float): this.type = { x = x + x0; y = y + y0; z = z + z0; this }
    def +~~(dg3: GVec3D): this.type = { x = ((x).toDouble + dg3.x).toFloat; y = ((y).toDouble + dg3.y).toFloat; z = ((z).toDouble + dg3.z).toFloat; this }
    def -~~(x0: Long): this.type = { x = ((x).toDouble - (x0).toDouble).toFloat; y = ((y).toDouble - (x0).toDouble).toFloat; z = ((z).toDouble - (x0).toDouble).toFloat; this }
    def -~(x0: Float): this.type = { x = x - x0; y = y - x0; z = z - x0; this }
    def -~~(x0: Double): this.type = { x = ((x).toDouble - x0).toFloat; y = ((y).toDouble - x0).toFloat; z = ((z).toDouble - x0).toFloat; this }
    def -~(sg3: GVec3S): this.type = { x = x - (sg3.x).toFloat; y = y - (sg3.y).toFloat; z = z - (sg3.z).toFloat; this }
    def -~(ig3: GVec3I): this.type = { x = x - (ig3.x).toFloat; y = y - (ig3.y).toFloat; z = z - (ig3.z).toFloat; this }
    def -~~(lg3: GVec3L): this.type = { x = ((x).toDouble - (lg3.x).toDouble).toFloat; y = ((y).toDouble - (lg3.y).toDouble).toFloat; z = ((z).toDouble - (lg3.z).toDouble).toFloat; this }
    def -~(fg3: GVec3F): this.type = { x = x - fg3.x; y = y - fg3.y; z = z - fg3.z; this }
    def -~(x0: Float, y0: Float, z0: Float): this.type = { x = x - x0; y = y - y0; z = z - z0; this }
    def -~~(dg3: GVec3D): this.type = { x = ((x).toDouble - dg3.x).toFloat; y = ((y).toDouble - dg3.y).toFloat; z = ((z).toDouble - dg3.z).toFloat; this }
    def *~~(x0: Long): this.type = { x = ((x).toDouble * (x0).toDouble).toFloat; y = ((y).toDouble * (x0).toDouble).toFloat; z = ((z).toDouble * (x0).toDouble).toFloat; this }
    def *~(x0: Float): this.type = { x = x * x0; y = y * x0; z = z * x0; this }
    def *~~(x0: Double): this.type = { x = ((x).toDouble * x0).toFloat; y = ((y).toDouble * x0).toFloat; z = ((z).toDouble * x0).toFloat; this }
    def *~(sg3: GVec3S): this.type = { x = x * (sg3.x).toFloat; y = y * (sg3.y).toFloat; z = z * (sg3.z).toFloat; this }
    def *~(ig3: GVec3I): this.type = { x = x * (ig3.x).toFloat; y = y * (ig3.y).toFloat; z = z * (ig3.z).toFloat; this }
    def *~~(lg3: GVec3L): this.type = { x = ((x).toDouble * (lg3.x).toDouble).toFloat; y = ((y).toDouble * (lg3.y).toDouble).toFloat; z = ((z).toDouble * (lg3.z).toDouble).toFloat; this }
    def *~(fg3: GVec3F): this.type = { x = x * fg3.x; y = y * fg3.y; z = z * fg3.z; this }
    def *~(x0: Float, y0: Float, z0: Float): this.type = { x = x * x0; y = y * y0; z = z * z0; this }
    def *~~(dg3: GVec3D): this.type = { x = ((x).toDouble * dg3.x).toFloat; y = ((y).toDouble * dg3.y).toFloat; z = ((z).toDouble * dg3.z).toFloat; this }
    def /~~(x0: Long): this.type = { x = ((x).toDouble / (x0).toDouble).toFloat; y = ((y).toDouble / (x0).toDouble).toFloat; z = ((z).toDouble / (x0).toDouble).toFloat; this }
    def /~(x0: Float): this.type = { x = x / x0; y = y / x0; z = z / x0; this }
    def /~~(x0: Double): this.type = { x = ((x).toDouble / x0).toFloat; y = ((y).toDouble / x0).toFloat; z = ((z).toDouble / x0).toFloat; this }
    def /~(sg3: GVec3S): this.type = { x = x / (sg3.x).toFloat; y = y / (sg3.y).toFloat; z = z / (sg3.z).toFloat; this }
    def /~(ig3: GVec3I): this.type = { x = x / (ig3.x).toFloat; y = y / (ig3.y).toFloat; z = z / (ig3.z).toFloat; this }
    def /~~(lg3: GVec3L): this.type = { x = ((x).toDouble / (lg3.x).toDouble).toFloat; y = ((y).toDouble / (lg3.y).toDouble).toFloat; z = ((z).toDouble / (lg3.z).toDouble).toFloat; this }
    def /~(fg3: GVec3F): this.type = { x = x / fg3.x; y = y / fg3.y; z = z / fg3.z; this }
    def /~(x0: Float, y0: Float, z0: Float): this.type = { x = x / x0; y = y / y0; z = z / z0; this }
    def /~~(dg3: GVec3D): this.type = { x = ((x).toDouble / dg3.x).toFloat; y = ((y).toDouble / dg3.y).toFloat; z = ((z).toDouble / dg3.z).toFloat; this }
    def crossEq(sg3: GVec3S): this.type = { val x0 = y*(sg3.z).toFloat - z*(sg3.y).toFloat; val y0 = z*(sg3.x).toFloat - x*(sg3.z).toFloat; z = x*(sg3.y).toFloat - y*(sg3.x).toFloat; x = x0; y = y0; this }
    def crossEq(ig3: GVec3I): this.type = { val x0 = y*(ig3.z).toFloat - z*(ig3.y).toFloat; val y0 = z*(ig3.x).toFloat - x*(ig3.z).toFloat; z = x*(ig3.y).toFloat - y*(ig3.x).toFloat; x = x0; y = y0; this }
    def crossEqCast(lg3: GVec3L): this.type = { val x0 = ((y).toDouble*(lg3.z).toDouble - (z).toDouble*(lg3.y).toDouble).toFloat; val y0 = ((z).toDouble*(lg3.x).toDouble - (x).toDouble*(lg3.z).toDouble).toFloat; z = ((x).toDouble*(lg3.y).toDouble - (y).toDouble*(lg3.x).toDouble).toFloat; x = x0; y = y0; this }
    def crossEq(fg3: GVec3F): this.type = { val x0 = y*fg3.z - z*fg3.y; val y0 = z*fg3.x - x*fg3.z; z = x*fg3.y - y*fg3.x; x = x0; y = y0; this }
    def crossEqCast(dg3: GVec3D): this.type = { val x0 = ((y).toDouble*dg3.z - (z).toDouble*dg3.y).toFloat; val y0 = ((z).toDouble*dg3.x - (x).toDouble*dg3.z).toFloat; z = ((x).toDouble*dg3.y - (y).toDouble*dg3.x).toFloat; x = x0; y = y0; this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toDouble,(x0).toDouble)).toFloat; y = (math.max((y).toDouble,(x0).toDouble)).toFloat; z = (math.max((z).toDouble,(x0).toDouble)).toFloat; this }
    def maxEq(x0: Float): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); this }
    def maxEqCast(x0: Double): this.type = { x = (math.max((x).toDouble,x0)).toFloat; y = (math.max((y).toDouble,x0)).toFloat; z = (math.max((z).toDouble,x0)).toFloat; this }
    def maxEq(sg3: GVec3S): this.type = { x = math.max(x,(sg3.x).toFloat); y = math.max(y,(sg3.y).toFloat); z = math.max(z,(sg3.z).toFloat); this }
    def maxEq(ig3: GVec3I): this.type = { x = math.max(x,(ig3.x).toFloat); y = math.max(y,(ig3.y).toFloat); z = math.max(z,(ig3.z).toFloat); this }
    def maxEqCast(lg3: GVec3L): this.type = { x = (math.max((x).toDouble,(lg3.x).toDouble)).toFloat; y = (math.max((y).toDouble,(lg3.y).toDouble)).toFloat; z = (math.max((z).toDouble,(lg3.z).toDouble)).toFloat; this }
    def maxEq(fg3: GVec3F): this.type = { x = math.max(x,fg3.x); y = math.max(y,fg3.y); z = math.max(z,fg3.z); this }
    def maxEq(x0: Float, y0: Float, z0: Float): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); this }
    def maxEqCast(dg3: GVec3D): this.type = { x = (math.max((x).toDouble,dg3.x)).toFloat; y = (math.max((y).toDouble,dg3.y)).toFloat; z = (math.max((z).toDouble,dg3.z)).toFloat; this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toDouble,(x0).toDouble)).toFloat; y = (math.min((y).toDouble,(x0).toDouble)).toFloat; z = (math.min((z).toDouble,(x0).toDouble)).toFloat; this }
    def minEq(x0: Float): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); this }
    def minEqCast(x0: Double): this.type = { x = (math.min((x).toDouble,x0)).toFloat; y = (math.min((y).toDouble,x0)).toFloat; z = (math.min((z).toDouble,x0)).toFloat; this }
    def minEq(sg3: GVec3S): this.type = { x = math.min(x,(sg3.x).toFloat); y = math.min(y,(sg3.y).toFloat); z = math.min(z,(sg3.z).toFloat); this }
    def minEq(ig3: GVec3I): this.type = { x = math.min(x,(ig3.x).toFloat); y = math.min(y,(ig3.y).toFloat); z = math.min(z,(ig3.z).toFloat); this }
    def minEqCast(lg3: GVec3L): this.type = { x = (math.min((x).toDouble,(lg3.x).toDouble)).toFloat; y = (math.min((y).toDouble,(lg3.y).toDouble)).toFloat; z = (math.min((z).toDouble,(lg3.z).toDouble)).toFloat; this }
    def minEq(fg3: GVec3F): this.type = { x = math.min(x,fg3.x); y = math.min(y,fg3.y); z = math.min(z,fg3.z); this }
    def minEq(x0: Float, y0: Float, z0: Float): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); this }
    def minEqCast(dg3: GVec3D): this.type = { x = (math.min((x).toDouble,dg3.x)).toFloat; y = (math.min((y).toDouble,dg3.y)).toFloat; z = (math.min((z).toDouble,dg3.z)).toFloat; this }
    def operateEq(sg3: GVec3S)(fun: (Float,Float)=>Float) = { x = fun(x,(sg3.x).toFloat); y = fun(y,(sg3.y).toFloat); z = fun(z,(sg3.z).toFloat); this }
    def operateEq(ig3: GVec3I)(fun: (Float,Float)=>Float) = { x = fun(x,(ig3.x).toFloat); y = fun(y,(ig3.y).toFloat); z = fun(z,(ig3.z).toFloat); this }
    def operateEqCast(lg3: GVec3L)(fun: (Double,Double)=>Double) = { x = (fun((x).toDouble,(lg3.x).toDouble)).toFloat; y = (fun((y).toDouble,(lg3.y).toDouble)).toFloat; z = (fun((z).toDouble,(lg3.z).toDouble)).toFloat; this }
    def operateEq(fg3: GVec3F)(fun: (Float,Float)=>Float) = { x = fun(x,fg3.x); y = fun(y,fg3.y); z = fun(z,fg3.z); this }
    def operateEqCast(dg3: GVec3D)(fun: (Double,Double)=>Double) = { x = (fun((x).toDouble,dg3.x)).toFloat; y = (fun((y).toDouble,dg3.y)).toFloat; z = (fun((z).toDouble,dg3.z)).toFloat; this }
    def **~(sg33: GMat3S) = {val x0 = x*(sg33.xx).toFloat+y*(sg33.yx).toFloat+z*(sg33.zx).toFloat; val y0 = x*(sg33.xy).toFloat+y*(sg33.yy).toFloat+z*(sg33.zy).toFloat; val z0 = x*(sg33.xz).toFloat+y*(sg33.yz).toFloat+z*(sg33.zz).toFloat; x = x0; y = y0; z = z0; this }
    def **~:(sg33: GMat3S) = {val x0 = x*(sg33.xx).toFloat+y*(sg33.xy).toFloat+z*(sg33.xz).toFloat; val y0 = x*(sg33.yx).toFloat+y*(sg33.yy).toFloat+z*(sg33.yz).toFloat; val z0 = x*(sg33.zx).toFloat+y*(sg33.zy).toFloat+z*(sg33.zz).toFloat; x = x0; y = y0; z = z0; this }
    def **~(ig33: GMat3I) = {val x0 = x*(ig33.xx).toFloat+y*(ig33.yx).toFloat+z*(ig33.zx).toFloat; val y0 = x*(ig33.xy).toFloat+y*(ig33.yy).toFloat+z*(ig33.zy).toFloat; val z0 = x*(ig33.xz).toFloat+y*(ig33.yz).toFloat+z*(ig33.zz).toFloat; x = x0; y = y0; z = z0; this }
    def **~:(ig33: GMat3I) = {val x0 = x*(ig33.xx).toFloat+y*(ig33.xy).toFloat+z*(ig33.xz).toFloat; val y0 = x*(ig33.yx).toFloat+y*(ig33.yy).toFloat+z*(ig33.yz).toFloat; val z0 = x*(ig33.zx).toFloat+y*(ig33.zy).toFloat+z*(ig33.zz).toFloat; x = x0; y = y0; z = z0; this }
    def **~~(lg33: GMat3L) = {val x0 = (x).toDouble*(lg33.xx).toDouble+(y).toDouble*(lg33.yx).toDouble+(z).toDouble*(lg33.zx).toDouble; val y0 = (x).toDouble*(lg33.xy).toDouble+(y).toDouble*(lg33.yy).toDouble+(z).toDouble*(lg33.zy).toDouble; val z0 = (x).toDouble*(lg33.xz).toDouble+(y).toDouble*(lg33.yz).toDouble+(z).toDouble*(lg33.zz).toDouble; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; this }
    def **~~:(lg33: GMat3L) = {val x0 = (x).toDouble*(lg33.xx).toDouble+(y).toDouble*(lg33.xy).toDouble+(z).toDouble*(lg33.xz).toDouble; val y0 = (x).toDouble*(lg33.yx).toDouble+(y).toDouble*(lg33.yy).toDouble+(z).toDouble*(lg33.yz).toDouble; val z0 = (x).toDouble*(lg33.zx).toDouble+(y).toDouble*(lg33.zy).toDouble+(z).toDouble*(lg33.zz).toDouble; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; this }
    def **~(fg33: GMat3F) = {val x0 = x*fg33.xx+y*fg33.yx+z*fg33.zx; val y0 = x*fg33.xy+y*fg33.yy+z*fg33.zy; val z0 = x*fg33.xz+y*fg33.yz+z*fg33.zz; x = x0; y = y0; z = z0; this }
    def **~:(fg33: GMat3F) = {val x0 = x*fg33.xx+y*fg33.xy+z*fg33.xz; val y0 = x*fg33.yx+y*fg33.yy+z*fg33.yz; val z0 = x*fg33.zx+y*fg33.zy+z*fg33.zz; x = x0; y = y0; z = z0; this }
    def **~~(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.yx+(z).toDouble*dg33.zx; val y0 = (x).toDouble*dg33.xy+(y).toDouble*dg33.yy+(z).toDouble*dg33.zy; val z0 = (x).toDouble*dg33.xz+(y).toDouble*dg33.yz+(z).toDouble*dg33.zz; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; this }
    def **~~:(dg33: GMat3D) = {val x0 = (x).toDouble*dg33.xx+(y).toDouble*dg33.xy+(z).toDouble*dg33.xz; val y0 = (x).toDouble*dg33.yx+(y).toDouble*dg33.yy+(z).toDouble*dg33.yz; val z0 = (x).toDouble*dg33.zx+(y).toDouble*dg33.zy+(z).toDouble*dg33.zz; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; this }
  } // class AVec3F

  object AVec3F {
    def apply(x0: Float, y0: Float, z0: Float): AVec3F = new MVec3F(x0, y0, z0)
    def parse(str: String): AVec3F = IVec3F.parse(str).mut
    def spherical(r0: Float, phi: Float, theta: Float): AVec3F = { val rsp = r0*math.sin(phi); new MVec3F((rsp*math.cos(theta)).toFloat, (rsp*math.sin(theta)).toFloat, (r0*math.cos(phi)).toFloat) }
    def cylindrical(r0: Float, theta: Float, z0: Float): AVec3F = new MVec3F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat, z0)
    def zero: AVec3F = MVec3F.zero
    def xUnit: AVec3F = MVec3F.xUnit
    def yUnit: AVec3F = MVec3F.yUnit
    def zUnit: AVec3F = MVec3F.zUnit
  } // object AVec3F


  abstract class AVec3D extends GVec3D {
    def x_=(x0: Double): Unit
    def y_=(y0: Double): Unit
    def z_=(z0: Double): Unit
    override def clone(): AVec3D = new MVec3D(x, y, z)
    override def toS: AVec3S = new MVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: AVec3I = new MVec3I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt)
    override def toL: AVec3L = new MVec3L(math.round(x), math.round(y), math.round(z))
    override def toF: AVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def copy(x0: Double = x, y0: Double = y, z0: Double = z): AVec3D = new MVec3D(x0, y0, z0)
    override def trim: AVec2D = new MVec2D(x, y)
    override def pad(padding: Double = 1): AVec4D = new MVec4D(x, y, z, padding)
    def mapEq(fun: Double => Double): this.type = {x = fun(x); y = fun(y); z = fun(z); this }
    def negEq: this.type = { x = -x; y = -y; z = -z; this }
    def normEq: this.type = { val k0 = 1/this.len; x = x*k0; y = y*k0; z = z*k0; this }
    def :~(x0: Double): this.type = { x = x0; y = x0; z = x0; this }
    def :~(sg3: GVec3S): this.type = { x = (sg3.x).toDouble; y = (sg3.y).toDouble; z = (sg3.z).toDouble; this }
    def :~(ig3: GVec3I): this.type = { x = (ig3.x).toDouble; y = (ig3.y).toDouble; z = (ig3.z).toDouble; this }
    def :~(lg3: GVec3L): this.type = { x = (lg3.x).toDouble; y = (lg3.y).toDouble; z = (lg3.z).toDouble; this }
    def :~(fg3: GVec3F): this.type = { x = (fg3.x).toDouble; y = (fg3.y).toDouble; z = (fg3.z).toDouble; this }
    def :~(dg3: GVec3D): this.type = { x = dg3.x; y = dg3.y; z = dg3.z; this }
    def :~(x0: Double, y0: Double, z0: Double): this.type = { x = x0; y = y0; z = z0; this }
    def +~(x0: Double): this.type = { x = x + x0; y = y + x0; z = z + x0; this }
    def +~(sg3: GVec3S): this.type = { x = x + (sg3.x).toDouble; y = y + (sg3.y).toDouble; z = z + (sg3.z).toDouble; this }
    def +~(ig3: GVec3I): this.type = { x = x + (ig3.x).toDouble; y = y + (ig3.y).toDouble; z = z + (ig3.z).toDouble; this }
    def +~(lg3: GVec3L): this.type = { x = x + (lg3.x).toDouble; y = y + (lg3.y).toDouble; z = z + (lg3.z).toDouble; this }
    def +~(fg3: GVec3F): this.type = { x = x + (fg3.x).toDouble; y = y + (fg3.y).toDouble; z = z + (fg3.z).toDouble; this }
    def +~(dg3: GVec3D): this.type = { x = x + dg3.x; y = y + dg3.y; z = z + dg3.z; this }
    def +~(x0: Double, y0: Double, z0: Double): this.type = { x = x + x0; y = y + y0; z = z + z0; this }
    def -~(x0: Double): this.type = { x = x - x0; y = y - x0; z = z - x0; this }
    def -~(sg3: GVec3S): this.type = { x = x - (sg3.x).toDouble; y = y - (sg3.y).toDouble; z = z - (sg3.z).toDouble; this }
    def -~(ig3: GVec3I): this.type = { x = x - (ig3.x).toDouble; y = y - (ig3.y).toDouble; z = z - (ig3.z).toDouble; this }
    def -~(lg3: GVec3L): this.type = { x = x - (lg3.x).toDouble; y = y - (lg3.y).toDouble; z = z - (lg3.z).toDouble; this }
    def -~(fg3: GVec3F): this.type = { x = x - (fg3.x).toDouble; y = y - (fg3.y).toDouble; z = z - (fg3.z).toDouble; this }
    def -~(dg3: GVec3D): this.type = { x = x - dg3.x; y = y - dg3.y; z = z - dg3.z; this }
    def -~(x0: Double, y0: Double, z0: Double): this.type = { x = x - x0; y = y - y0; z = z - z0; this }
    def *~(x0: Double): this.type = { x = x * x0; y = y * x0; z = z * x0; this }
    def *~(sg3: GVec3S): this.type = { x = x * (sg3.x).toDouble; y = y * (sg3.y).toDouble; z = z * (sg3.z).toDouble; this }
    def *~(ig3: GVec3I): this.type = { x = x * (ig3.x).toDouble; y = y * (ig3.y).toDouble; z = z * (ig3.z).toDouble; this }
    def *~(lg3: GVec3L): this.type = { x = x * (lg3.x).toDouble; y = y * (lg3.y).toDouble; z = z * (lg3.z).toDouble; this }
    def *~(fg3: GVec3F): this.type = { x = x * (fg3.x).toDouble; y = y * (fg3.y).toDouble; z = z * (fg3.z).toDouble; this }
    def *~(dg3: GVec3D): this.type = { x = x * dg3.x; y = y * dg3.y; z = z * dg3.z; this }
    def *~(x0: Double, y0: Double, z0: Double): this.type = { x = x * x0; y = y * y0; z = z * z0; this }
    def /~(x0: Double): this.type = { x = x / x0; y = y / x0; z = z / x0; this }
    def /~(sg3: GVec3S): this.type = { x = x / (sg3.x).toDouble; y = y / (sg3.y).toDouble; z = z / (sg3.z).toDouble; this }
    def /~(ig3: GVec3I): this.type = { x = x / (ig3.x).toDouble; y = y / (ig3.y).toDouble; z = z / (ig3.z).toDouble; this }
    def /~(lg3: GVec3L): this.type = { x = x / (lg3.x).toDouble; y = y / (lg3.y).toDouble; z = z / (lg3.z).toDouble; this }
    def /~(fg3: GVec3F): this.type = { x = x / (fg3.x).toDouble; y = y / (fg3.y).toDouble; z = z / (fg3.z).toDouble; this }
    def /~(dg3: GVec3D): this.type = { x = x / dg3.x; y = y / dg3.y; z = z / dg3.z; this }
    def /~(x0: Double, y0: Double, z0: Double): this.type = { x = x / x0; y = y / y0; z = z / z0; this }
    def crossEq(sg3: GVec3S): this.type = { val x0 = y*(sg3.z).toDouble - z*(sg3.y).toDouble; val y0 = z*(sg3.x).toDouble - x*(sg3.z).toDouble; z = x*(sg3.y).toDouble - y*(sg3.x).toDouble; x = x0; y = y0; this }
    def crossEq(ig3: GVec3I): this.type = { val x0 = y*(ig3.z).toDouble - z*(ig3.y).toDouble; val y0 = z*(ig3.x).toDouble - x*(ig3.z).toDouble; z = x*(ig3.y).toDouble - y*(ig3.x).toDouble; x = x0; y = y0; this }
    def crossEq(lg3: GVec3L): this.type = { val x0 = y*(lg3.z).toDouble - z*(lg3.y).toDouble; val y0 = z*(lg3.x).toDouble - x*(lg3.z).toDouble; z = x*(lg3.y).toDouble - y*(lg3.x).toDouble; x = x0; y = y0; this }
    def crossEq(fg3: GVec3F): this.type = { val x0 = y*(fg3.z).toDouble - z*(fg3.y).toDouble; val y0 = z*(fg3.x).toDouble - x*(fg3.z).toDouble; z = x*(fg3.y).toDouble - y*(fg3.x).toDouble; x = x0; y = y0; this }
    def crossEq(dg3: GVec3D): this.type = { val x0 = y*dg3.z - z*dg3.y; val y0 = z*dg3.x - x*dg3.z; z = x*dg3.y - y*dg3.x; x = x0; y = y0; this }
    def maxEq(x0: Double): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); this }
    def maxEq(sg3: GVec3S): this.type = { x = math.max(x,(sg3.x).toDouble); y = math.max(y,(sg3.y).toDouble); z = math.max(z,(sg3.z).toDouble); this }
    def maxEq(ig3: GVec3I): this.type = { x = math.max(x,(ig3.x).toDouble); y = math.max(y,(ig3.y).toDouble); z = math.max(z,(ig3.z).toDouble); this }
    def maxEq(lg3: GVec3L): this.type = { x = math.max(x,(lg3.x).toDouble); y = math.max(y,(lg3.y).toDouble); z = math.max(z,(lg3.z).toDouble); this }
    def maxEq(fg3: GVec3F): this.type = { x = math.max(x,(fg3.x).toDouble); y = math.max(y,(fg3.y).toDouble); z = math.max(z,(fg3.z).toDouble); this }
    def maxEq(dg3: GVec3D): this.type = { x = math.max(x,dg3.x); y = math.max(y,dg3.y); z = math.max(z,dg3.z); this }
    def maxEq(x0: Double, y0: Double, z0: Double): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); this }
    def minEq(x0: Double): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); this }
    def minEq(sg3: GVec3S): this.type = { x = math.min(x,(sg3.x).toDouble); y = math.min(y,(sg3.y).toDouble); z = math.min(z,(sg3.z).toDouble); this }
    def minEq(ig3: GVec3I): this.type = { x = math.min(x,(ig3.x).toDouble); y = math.min(y,(ig3.y).toDouble); z = math.min(z,(ig3.z).toDouble); this }
    def minEq(lg3: GVec3L): this.type = { x = math.min(x,(lg3.x).toDouble); y = math.min(y,(lg3.y).toDouble); z = math.min(z,(lg3.z).toDouble); this }
    def minEq(fg3: GVec3F): this.type = { x = math.min(x,(fg3.x).toDouble); y = math.min(y,(fg3.y).toDouble); z = math.min(z,(fg3.z).toDouble); this }
    def minEq(dg3: GVec3D): this.type = { x = math.min(x,dg3.x); y = math.min(y,dg3.y); z = math.min(z,dg3.z); this }
    def minEq(x0: Double, y0: Double, z0: Double): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); this }
    def operateEq(sg3: GVec3S)(fun: (Double,Double)=>Double) = { x = fun(x,(sg3.x).toDouble); y = fun(y,(sg3.y).toDouble); z = fun(z,(sg3.z).toDouble); this }
    def operateEq(ig3: GVec3I)(fun: (Double,Double)=>Double) = { x = fun(x,(ig3.x).toDouble); y = fun(y,(ig3.y).toDouble); z = fun(z,(ig3.z).toDouble); this }
    def operateEq(lg3: GVec3L)(fun: (Double,Double)=>Double) = { x = fun(x,(lg3.x).toDouble); y = fun(y,(lg3.y).toDouble); z = fun(z,(lg3.z).toDouble); this }
    def operateEq(fg3: GVec3F)(fun: (Double,Double)=>Double) = { x = fun(x,(fg3.x).toDouble); y = fun(y,(fg3.y).toDouble); z = fun(z,(fg3.z).toDouble); this }
    def operateEq(dg3: GVec3D)(fun: (Double,Double)=>Double) = { x = fun(x,dg3.x); y = fun(y,dg3.y); z = fun(z,dg3.z); this }
    def **~(sg33: GMat3S) = {val x0 = x*(sg33.xx).toDouble+y*(sg33.yx).toDouble+z*(sg33.zx).toDouble; val y0 = x*(sg33.xy).toDouble+y*(sg33.yy).toDouble+z*(sg33.zy).toDouble; val z0 = x*(sg33.xz).toDouble+y*(sg33.yz).toDouble+z*(sg33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~:(sg33: GMat3S) = {val x0 = x*(sg33.xx).toDouble+y*(sg33.xy).toDouble+z*(sg33.xz).toDouble; val y0 = x*(sg33.yx).toDouble+y*(sg33.yy).toDouble+z*(sg33.yz).toDouble; val z0 = x*(sg33.zx).toDouble+y*(sg33.zy).toDouble+z*(sg33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~(ig33: GMat3I) = {val x0 = x*(ig33.xx).toDouble+y*(ig33.yx).toDouble+z*(ig33.zx).toDouble; val y0 = x*(ig33.xy).toDouble+y*(ig33.yy).toDouble+z*(ig33.zy).toDouble; val z0 = x*(ig33.xz).toDouble+y*(ig33.yz).toDouble+z*(ig33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~:(ig33: GMat3I) = {val x0 = x*(ig33.xx).toDouble+y*(ig33.xy).toDouble+z*(ig33.xz).toDouble; val y0 = x*(ig33.yx).toDouble+y*(ig33.yy).toDouble+z*(ig33.yz).toDouble; val z0 = x*(ig33.zx).toDouble+y*(ig33.zy).toDouble+z*(ig33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~(lg33: GMat3L) = {val x0 = x*(lg33.xx).toDouble+y*(lg33.yx).toDouble+z*(lg33.zx).toDouble; val y0 = x*(lg33.xy).toDouble+y*(lg33.yy).toDouble+z*(lg33.zy).toDouble; val z0 = x*(lg33.xz).toDouble+y*(lg33.yz).toDouble+z*(lg33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~:(lg33: GMat3L) = {val x0 = x*(lg33.xx).toDouble+y*(lg33.xy).toDouble+z*(lg33.xz).toDouble; val y0 = x*(lg33.yx).toDouble+y*(lg33.yy).toDouble+z*(lg33.yz).toDouble; val z0 = x*(lg33.zx).toDouble+y*(lg33.zy).toDouble+z*(lg33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~(fg33: GMat3F) = {val x0 = x*(fg33.xx).toDouble+y*(fg33.yx).toDouble+z*(fg33.zx).toDouble; val y0 = x*(fg33.xy).toDouble+y*(fg33.yy).toDouble+z*(fg33.zy).toDouble; val z0 = x*(fg33.xz).toDouble+y*(fg33.yz).toDouble+z*(fg33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~:(fg33: GMat3F) = {val x0 = x*(fg33.xx).toDouble+y*(fg33.xy).toDouble+z*(fg33.xz).toDouble; val y0 = x*(fg33.yx).toDouble+y*(fg33.yy).toDouble+z*(fg33.yz).toDouble; val z0 = x*(fg33.zx).toDouble+y*(fg33.zy).toDouble+z*(fg33.zz).toDouble; x = x0; y = y0; z = z0; this }
    def **~(dg33: GMat3D) = {val x0 = x*dg33.xx+y*dg33.yx+z*dg33.zx; val y0 = x*dg33.xy+y*dg33.yy+z*dg33.zy; val z0 = x*dg33.xz+y*dg33.yz+z*dg33.zz; x = x0; y = y0; z = z0; this }
    def **~:(dg33: GMat3D) = {val x0 = x*dg33.xx+y*dg33.xy+z*dg33.xz; val y0 = x*dg33.yx+y*dg33.yy+z*dg33.yz; val z0 = x*dg33.zx+y*dg33.zy+z*dg33.zz; x = x0; y = y0; z = z0; this }
  } // class AVec3D

  object AVec3D {
    def apply(x0: Double, y0: Double, z0: Double): AVec3D = new MVec3D(x0, y0, z0)
    def parse(str: String): AVec3D = IVec3D.parse(str).mut
    def spherical(r0: Double, phi: Double, theta: Double): AVec3D = { val rsp = r0*math.sin(phi); new MVec3D(rsp*math.cos(theta), rsp*math.sin(theta), r0*math.cos(phi)) }
    def cylindrical(r0: Double, theta: Double, z0: Double): AVec3D = new MVec3D(r0 * math.cos(theta), r0 * math.sin(theta), z0)
    def zero: AVec3D = MVec3D.zero
    def xUnit: AVec3D = MVec3D.xUnit
    def yUnit: AVec3D = MVec3D.yUnit
    def zUnit: AVec3D = MVec3D.zUnit
  } // object AVec3D


  final class MVec3S(var x: Short, var y: Short, var z: Short) extends AVec3S {
    override def clone(): MVec3S = new MVec3S(x, y, z)
    override def copy(x0: Short = x, y0: Short = y, z0: Short = z): MVec3S = new MVec3S(x0, y0, z0)
    override def trim: MVec2S = new MVec2S(x, y)
    override def pad(padding: Short = 1): MVec4S = new MVec4S(x, y, z, padding)
    override def toI: MVec3I = new MVec3I((x).toInt, (y).toInt, (z).toInt)
    override def toL: MVec3L = new MVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class MVec3S

  object MVec3S {
    def apply(x0: Short, y0: Short, z0: Short): MVec3S = new MVec3S(x0, y0, z0)
    def parse(str: String): MVec3S = IVec3S.parse(str).mut
    def zero = new MVec3S(0, 0, 0)
    def xUnit = new MVec3S(1, 0, 0)
    def yUnit = new MVec3S(0, 1, 0)
    def zUnit = new MVec3S(0, 0, 1)
  } // object MVec3S


  final class MVec3I(var x: Int, var y: Int, var z: Int) extends AVec3I {
    override def clone(): MVec3I = new MVec3I(x, y, z)
    override def toS: MVec3S = new MVec3S((x).toShort, (y).toShort, (z).toShort)
    override def copy(x0: Int = x, y0: Int = y, z0: Int = z): MVec3I = new MVec3I(x0, y0, z0)
    override def trim: MVec2I = new MVec2I(x, y)
    override def pad(padding: Int = 1): MVec4I = new MVec4I(x, y, z, padding)
    override def toL: MVec3L = new MVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class MVec3I

  object MVec3I {
    def apply(x0: Int, y0: Int, z0: Int): MVec3I = new MVec3I(x0, y0, z0)
    def parse(str: String): MVec3I = IVec3I.parse(str).mut
    def zero = new MVec3I(0, 0, 0)
    def xUnit = new MVec3I(1, 0, 0)
    def yUnit = new MVec3I(0, 1, 0)
    def zUnit = new MVec3I(0, 0, 1)
  } // object MVec3I


  final class MVec3L(var x: Long, var y: Long, var z: Long) extends AVec3L {
    override def clone(): MVec3L = new MVec3L(x, y, z)
    override def toS: MVec3S = new MVec3S((x).toShort, (y).toShort, (z).toShort)
    override def toI: MVec3I = new MVec3I((x).toInt, (y).toInt, (z).toInt)
    override def copy(x0: Long = x, y0: Long = y, z0: Long = z): MVec3L = new MVec3L(x0, y0, z0)
    override def trim: MVec2L = new MVec2L(x, y)
    override def pad(padding: Long = 1): MVec4L = new MVec4L(x, y, z, padding)
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class MVec3L

  object MVec3L {
    def apply(x0: Long, y0: Long, z0: Long): MVec3L = new MVec3L(x0, y0, z0)
    def parse(str: String): MVec3L = IVec3L.parse(str).mut
    def zero = new MVec3L(0, 0, 0)
    def xUnit = new MVec3L(1, 0, 0)
    def yUnit = new MVec3L(0, 1, 0)
    def zUnit = new MVec3L(0, 0, 1)
  } // object MVec3L


  final class MVec3F(var x: Float, var y: Float, var z: Float) extends AVec3F {
    override def clone(): MVec3F = new MVec3F(x, y, z)
    override def toS: MVec3S = new MVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: MVec3I = new MVec3I(math.round(x), math.round(y), math.round(z))
    override def toL: MVec3L = new MVec3L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble))
    override def copy(x0: Float = x, y0: Float = y, z0: Float = z): MVec3F = new MVec3F(x0, y0, z0)
    override def trim: MVec2F = new MVec2F(x, y)
    override def pad(padding: Float = 1): MVec4F = new MVec4F(x, y, z, padding)
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class MVec3F

  object MVec3F {
    def apply(x0: Float, y0: Float, z0: Float): MVec3F = new MVec3F(x0, y0, z0)
    def parse(str: String): MVec3F = IVec3F.parse(str).mut
    def spherical(r0: Float, phi: Float, theta: Float): MVec3F = { val rsp = r0*math.sin(phi); new MVec3F((rsp*math.cos(theta)).toFloat, (rsp*math.sin(theta)).toFloat, (r0*math.cos(phi)).toFloat) }
    def cylindrical(r0: Float, theta: Float, z0: Float): MVec3F = new MVec3F((r0 * math.cos(theta)).toFloat, (r0 * math.sin(theta)).toFloat, z0)
    def zero = new MVec3F(0, 0, 0)
    def xUnit = new MVec3F(1, 0, 0)
    def yUnit = new MVec3F(0, 1, 0)
    def zUnit = new MVec3F(0, 0, 1)
  } // object MVec3F


  final class MVec3D(var x: Double, var y: Double, var z: Double) extends AVec3D {
    override def clone(): MVec3D = new MVec3D(x, y, z)
    override def toS: MVec3S = new MVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: MVec3I = new MVec3I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt)
    override def toL: MVec3L = new MVec3L(math.round(x), math.round(y), math.round(z))
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def copy(x0: Double = x, y0: Double = y, z0: Double = z): MVec3D = new MVec3D(x0, y0, z0)
    override def trim: MVec2D = new MVec2D(x, y)
    override def pad(padding: Double = 1): MVec4D = new MVec4D(x, y, z, padding)
  } // class MVec3D

  object MVec3D {
    def apply(x0: Double, y0: Double, z0: Double): MVec3D = new MVec3D(x0, y0, z0)
    def parse(str: String): MVec3D = IVec3D.parse(str).mut
    def spherical(r0: Double, phi: Double, theta: Double): MVec3D = { val rsp = r0*math.sin(phi); new MVec3D(rsp*math.cos(theta), rsp*math.sin(theta), r0*math.cos(phi)) }
    def cylindrical(r0: Double, theta: Double, z0: Double): MVec3D = new MVec3D(r0 * math.cos(theta), r0 * math.sin(theta), z0)
    def zero = new MVec3D(0, 0, 0)
    def xUnit = new MVec3D(1, 0, 0)
    def yUnit = new MVec3D(0, 1, 0)
    def zUnit = new MVec3D(0, 0, 1)
  } // object MVec3D


  class BVec3S(data: Array[Short]) extends AVec3S with Iterator[BVec3S] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Short) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Short) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Short) { data(index+2) = z0 }
    override def toString = if (index < 0 || index+3 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+"]")
    def hasNext = (fresh && 3 <= data.length) || (index + 6 <= data.length)
    def next = { if (fresh) fresh = false else index += 3; this }
    def reset(idx: Int = 0) = { index = idx*3; fresh = true; this }
    def spawn = { val v = new BVec3S(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toI: MVec3I = new MVec3I((x).toInt, (y).toInt, (z).toInt)
    override def toL: MVec3L = new MVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class BVec3S

  object BVec3S {
    def apply(a0: Array[Short]) = new BVec3S(a0)
    def apply(i0: Int) = new BVec3S(new Array[Short](i0*3))
  } // object BVec3S


  class BVec3I(data: Array[Int]) extends AVec3I with Iterator[BVec3I] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Int) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Int) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Int) { data(index+2) = z0 }
    override def toString = if (index < 0 || index+3 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+"]")
    def hasNext = (fresh && 3 <= data.length) || (index + 6 <= data.length)
    def next = { if (fresh) fresh = false else index += 3; this }
    def reset(idx: Int = 0) = { index = idx*3; fresh = true; this }
    def spawn = { val v = new BVec3I(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec3S = new MVec3S((x).toShort, (y).toShort, (z).toShort)
    override def toL: MVec3L = new MVec3L((x).toLong, (y).toLong, (z).toLong)
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class BVec3I

  object BVec3I {
    def apply(a0: Array[Int]) = new BVec3I(a0)
    def apply(i0: Int) = new BVec3I(new Array[Int](i0*3))
  } // object BVec3I


  class BVec3L(data: Array[Long]) extends AVec3L with Iterator[BVec3L] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Long) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Long) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Long) { data(index+2) = z0 }
    override def toString = if (index < 0 || index+3 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+"]")
    def hasNext = (fresh && 3 <= data.length) || (index + 6 <= data.length)
    def next = { if (fresh) fresh = false else index += 3; this }
    def reset(idx: Int = 0) = { index = idx*3; fresh = true; this }
    def spawn = { val v = new BVec3L(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec3S = new MVec3S((x).toShort, (y).toShort, (z).toShort)
    override def toI: MVec3I = new MVec3I((x).toInt, (y).toInt, (z).toInt)
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class BVec3L

  object BVec3L {
    def apply(a0: Array[Long]) = new BVec3L(a0)
    def apply(i0: Int) = new BVec3L(new Array[Long](i0*3))
  } // object BVec3L


  class BVec3F(data: Array[Float]) extends AVec3F with Iterator[BVec3F] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Float) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Float) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Float) { data(index+2) = z0 }
    override def toString = if (index < 0 || index+3 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+"]")
    def hasNext = (fresh && 3 <= data.length) || (index + 6 <= data.length)
    def next = { if (fresh) fresh = false else index += 3; this }
    def reset(idx: Int = 0) = { index = idx*3; fresh = true; this }
    def spawn = { val v = new BVec3F(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec3S = new MVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: MVec3I = new MVec3I(math.round(x), math.round(y), math.round(z))
    override def toL: MVec3L = new MVec3L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble))
    override def toD: MVec3D = new MVec3D((x).toDouble, (y).toDouble, (z).toDouble)
  } // class BVec3F

  object BVec3F {
    def apply(a0: Array[Float]) = new BVec3F(a0)
    def apply(i0: Int) = new BVec3F(new Array[Float](i0*3))
  } // object BVec3F


  class BVec3D(data: Array[Double]) extends AVec3D with Iterator[BVec3D] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Double) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Double) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Double) { data(index+2) = z0 }
    override def toString = if (index < 0 || index+3 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+"]")
    def hasNext = (fresh && 3 <= data.length) || (index + 6 <= data.length)
    def next = { if (fresh) fresh = false else index += 3; this }
    def reset(idx: Int = 0) = { index = idx*3; fresh = true; this }
    def spawn = { val v = new BVec3D(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec3S = new MVec3S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort)
    override def toI: MVec3I = new MVec3I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt)
    override def toL: MVec3L = new MVec3L(math.round(x), math.round(y), math.round(z))
    override def toF: MVec3F = new MVec3F((x).toFloat, (y).toFloat, (z).toFloat)
  } // class BVec3D

  object BVec3D {
    def apply(a0: Array[Double]) = new BVec3D(a0)
    def apply(i0: Int) = new BVec3D(new Array[Double](i0*3))
  } // object BVec3D


  abstract class GVec4S extends Cloneable {
    def x: Short
    def y: Short
    def z: Short
    def w: Short
    override def toString = "["+x+", "+y+", "+z+", "+w+"]"
    override def hashCode = (((w)*16777619 ^ z)*16777619 ^ y)*16777619 ^ x
    override def equals(any: Any) = any match { case sg4: GVec4S => {x==sg4.x && y==sg4.y && z==sg4.z && w==sg4.w }; case ig4: GVec4I => {x==ig4.x && y==ig4.y && z==ig4.z && w==ig4.w }; case lg4: GVec4L => {x==lg4.x && y==lg4.y && z==lg4.z && w==lg4.w }; case fg4: GVec4F => {x==fg4.x && y==fg4.y && z==fg4.z && w==fg4.w }; case dg4: GVec4D => {x==dg4.x && y==dg4.y && z==dg4.z && w==dg4.w }; case _ => false }
    override def clone(): GVec4S = new IVec4S(x, y, z, w)
    def copy(x0: Short = x, y0: Short = y, z0: Short = z, w0: Short = w): GVec4S = new IVec4S(x0, y0, z0, w0)
    def trim: GVec3S = new IVec3S(x, y, z)
    def toI: GVec4I = new IVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    def toL: GVec4L = new IVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    def toF: GVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    def toD: GVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def imm = new IVec4S(x, y, z, w)
    def mut = new MVec4S(x, y, z, w)
    def lenSq = x*x + y*y + z*z + w*w
    def unary_-() = new IVec4S((-x).toShort, (-y).toShort, (-z).toShort, (-w).toShort)
    def +(x0: Short) = new IVec4S((x + x0).toShort, (y + x0).toShort, (z + x0).toShort, (w + x0).toShort)
    def +(x0: Int) = new IVec4I((x).toInt + x0, (y).toInt + x0, (z).toInt + x0, (w).toInt + x0)
    def +(x0: Long) = new IVec4L((x).toLong + x0, (y).toLong + x0, (z).toLong + x0, (w).toLong + x0)
    def +(x0: Float) = new IVec4F((x).toFloat + x0, (y).toFloat + x0, (z).toFloat + x0, (w).toFloat + x0)
    def +(x0: Double) = new IVec4D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0, (w).toDouble + x0)
    def +(sg4: GVec4S) = new IVec4S((x + sg4.x).toShort, (y + sg4.y).toShort, (z + sg4.z).toShort, (w + sg4.w).toShort)
    def +(x0: Short, y0: Short, z0: Short, w0: Short) = new IVec4S((x + x0).toShort, (y + y0).toShort, (z + z0).toShort, (w + w0).toShort)
    def +(ig4: GVec4I) = new IVec4I((x).toInt + ig4.x, (y).toInt + ig4.y, (z).toInt + ig4.z, (w).toInt + ig4.w)
    def +(lg4: GVec4L) = new IVec4L((x).toLong + lg4.x, (y).toLong + lg4.y, (z).toLong + lg4.z, (w).toLong + lg4.w)
    def +(fg4: GVec4F) = new IVec4F((x).toFloat + fg4.x, (y).toFloat + fg4.y, (z).toFloat + fg4.z, (w).toFloat + fg4.w)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (y).toDouble + dg4.y, (z).toDouble + dg4.z, (w).toDouble + dg4.w)
    def -(x0: Short) = new IVec4S((x - x0).toShort, (y - x0).toShort, (z - x0).toShort, (w - x0).toShort)
    def -(x0: Int) = new IVec4I((x).toInt - x0, (y).toInt - x0, (z).toInt - x0, (w).toInt - x0)
    def -(x0: Long) = new IVec4L((x).toLong - x0, (y).toLong - x0, (z).toLong - x0, (w).toLong - x0)
    def -(x0: Float) = new IVec4F((x).toFloat - x0, (y).toFloat - x0, (z).toFloat - x0, (w).toFloat - x0)
    def -(x0: Double) = new IVec4D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0, (w).toDouble - x0)
    def -(sg4: GVec4S) = new IVec4S((x - sg4.x).toShort, (y - sg4.y).toShort, (z - sg4.z).toShort, (w - sg4.w).toShort)
    def -(x0: Short, y0: Short, z0: Short, w0: Short) = new IVec4S((x - x0).toShort, (y - y0).toShort, (z - z0).toShort, (w - w0).toShort)
    def -(ig4: GVec4I) = new IVec4I((x).toInt - ig4.x, (y).toInt - ig4.y, (z).toInt - ig4.z, (w).toInt - ig4.w)
    def -(lg4: GVec4L) = new IVec4L((x).toLong - lg4.x, (y).toLong - lg4.y, (z).toLong - lg4.z, (w).toLong - lg4.w)
    def -(fg4: GVec4F) = new IVec4F((x).toFloat - fg4.x, (y).toFloat - fg4.y, (z).toFloat - fg4.z, (w).toFloat - fg4.w)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (y).toDouble - dg4.y, (z).toDouble - dg4.z, (w).toDouble - dg4.w)
    def *(x0: Short) = new IVec4S((x * x0).toShort, (y * x0).toShort, (z * x0).toShort, (w * x0).toShort)
    def *(x0: Int) = new IVec4I((x).toInt * x0, (y).toInt * x0, (z).toInt * x0, (w).toInt * x0)
    def *(x0: Long) = new IVec4L((x).toLong * x0, (y).toLong * x0, (z).toLong * x0, (w).toLong * x0)
    def *(x0: Float) = new IVec4F((x).toFloat * x0, (y).toFloat * x0, (z).toFloat * x0, (w).toFloat * x0)
    def *(x0: Double) = new IVec4D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0, (w).toDouble * x0)
    def *(sg4: GVec4S) = new IVec4S((x * sg4.x).toShort, (y * sg4.y).toShort, (z * sg4.z).toShort, (w * sg4.w).toShort)
    def *(x0: Short, y0: Short, z0: Short, w0: Short) = new IVec4S((x * x0).toShort, (y * y0).toShort, (z * z0).toShort, (w * w0).toShort)
    def *(ig4: GVec4I) = new IVec4I((x).toInt * ig4.x, (y).toInt * ig4.y, (z).toInt * ig4.z, (w).toInt * ig4.w)
    def *(lg4: GVec4L) = new IVec4L((x).toLong * lg4.x, (y).toLong * lg4.y, (z).toLong * lg4.z, (w).toLong * lg4.w)
    def *(fg4: GVec4F) = new IVec4F((x).toFloat * fg4.x, (y).toFloat * fg4.y, (z).toFloat * fg4.z, (w).toFloat * fg4.w)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (y).toDouble * dg4.y, (z).toDouble * dg4.z, (w).toDouble * dg4.w)
    def /(x0: Short) = new IVec4S((x / x0).toShort, (y / x0).toShort, (z / x0).toShort, (w / x0).toShort)
    def /(x0: Int) = new IVec4I((x).toInt / x0, (y).toInt / x0, (z).toInt / x0, (w).toInt / x0)
    def /(x0: Long) = new IVec4L((x).toLong / x0, (y).toLong / x0, (z).toLong / x0, (w).toLong / x0)
    def /(x0: Float) = new IVec4F((x).toFloat / x0, (y).toFloat / x0, (z).toFloat / x0, (w).toFloat / x0)
    def /(x0: Double) = new IVec4D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0, (w).toDouble / x0)
    def /(sg4: GVec4S) = new IVec4S((x / sg4.x).toShort, (y / sg4.y).toShort, (z / sg4.z).toShort, (w / sg4.w).toShort)
    def /(x0: Short, y0: Short, z0: Short, w0: Short) = new IVec4S((x / x0).toShort, (y / y0).toShort, (z / z0).toShort, (w / w0).toShort)
    def /(ig4: GVec4I) = new IVec4I((x).toInt / ig4.x, (y).toInt / ig4.y, (z).toInt / ig4.z, (w).toInt / ig4.w)
    def /(lg4: GVec4L) = new IVec4L((x).toLong / lg4.x, (y).toLong / lg4.y, (z).toLong / lg4.z, (w).toLong / lg4.w)
    def /(fg4: GVec4F) = new IVec4F((x).toFloat / fg4.x, (y).toFloat / fg4.y, (z).toFloat / fg4.z, (w).toFloat / fg4.w)
    def /(dg4: GVec4D) = new IVec4D((x).toDouble / dg4.x, (y).toDouble / dg4.y, (z).toDouble / dg4.z, (w).toDouble / dg4.w)
    def max(x0: Short) = new IVec4S((math.max(x,x0)).toShort, (math.max(y,x0)).toShort, (math.max(z,x0)).toShort, (math.max(w,x0)).toShort)
    def max(x0: Int) = new IVec4I(math.max((x).toInt,x0), math.max((y).toInt,x0), math.max((z).toInt,x0), math.max((w).toInt,x0))
    def max(x0: Long) = new IVec4L(math.max((x).toLong,x0), math.max((y).toLong,x0), math.max((z).toLong,x0), math.max((w).toLong,x0))
    def max(x0: Float) = new IVec4F(math.max((x).toFloat,x0), math.max((y).toFloat,x0), math.max((z).toFloat,x0), math.max((w).toFloat,x0))
    def max(x0: Double) = new IVec4D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0), math.max((w).toDouble,x0))
    def max(sg4: GVec4S) = new IVec4S((math.max(x,sg4.x)).toShort, (math.max(y,sg4.y)).toShort, (math.max(z,sg4.z)).toShort, (math.max(w,sg4.w)).toShort)
    def max(x0: Short, y0: Short, z0: Short, w0: Short) = new IVec4S((math.max(x,x0)).toShort, (math.max(y,y0)).toShort, (math.max(z,z0)).toShort, (math.max(w,w0)).toShort)
    def max(ig4: GVec4I) = new IVec4I(math.max((x).toInt,ig4.x), math.max((y).toInt,ig4.y), math.max((z).toInt,ig4.z), math.max((w).toInt,ig4.w))
    def max(lg4: GVec4L) = new IVec4L(math.max((x).toLong,lg4.x), math.max((y).toLong,lg4.y), math.max((z).toLong,lg4.z), math.max((w).toLong,lg4.w))
    def max(fg4: GVec4F) = new IVec4F(math.max((x).toFloat,fg4.x), math.max((y).toFloat,fg4.y), math.max((z).toFloat,fg4.z), math.max((w).toFloat,fg4.w))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((y).toDouble,dg4.y), math.max((z).toDouble,dg4.z), math.max((w).toDouble,dg4.w))
    def min(x0: Short) = new IVec4S((math.min(x,x0)).toShort, (math.min(y,x0)).toShort, (math.min(z,x0)).toShort, (math.min(w,x0)).toShort)
    def min(x0: Int) = new IVec4I(math.min((x).toInt,x0), math.min((y).toInt,x0), math.min((z).toInt,x0), math.min((w).toInt,x0))
    def min(x0: Long) = new IVec4L(math.min((x).toLong,x0), math.min((y).toLong,x0), math.min((z).toLong,x0), math.min((w).toLong,x0))
    def min(x0: Float) = new IVec4F(math.min((x).toFloat,x0), math.min((y).toFloat,x0), math.min((z).toFloat,x0), math.min((w).toFloat,x0))
    def min(x0: Double) = new IVec4D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0), math.min((w).toDouble,x0))
    def min(sg4: GVec4S) = new IVec4S((math.min(x,sg4.x)).toShort, (math.min(y,sg4.y)).toShort, (math.min(z,sg4.z)).toShort, (math.min(w,sg4.w)).toShort)
    def min(x0: Short, y0: Short, z0: Short, w0: Short) = new IVec4S((math.min(x,x0)).toShort, (math.min(y,y0)).toShort, (math.min(z,z0)).toShort, (math.min(w,w0)).toShort)
    def min(ig4: GVec4I) = new IVec4I(math.min((x).toInt,ig4.x), math.min((y).toInt,ig4.y), math.min((z).toInt,ig4.z), math.min((w).toInt,ig4.w))
    def min(lg4: GVec4L) = new IVec4L(math.min((x).toLong,lg4.x), math.min((y).toLong,lg4.y), math.min((z).toLong,lg4.z), math.min((w).toLong,lg4.w))
    def min(fg4: GVec4F) = new IVec4F(math.min((x).toFloat,fg4.x), math.min((y).toFloat,fg4.y), math.min((z).toFloat,fg4.z), math.min((w).toFloat,fg4.w))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((y).toDouble,dg4.y), math.min((z).toDouble,dg4.z), math.min((w).toDouble,dg4.w))
    def operate(sg4: GVec4S)(fun: (Short,Short)=>Short) = new IVec4S((fun(x,sg4.x)).toShort, (fun(y,sg4.y)).toShort, (fun(z,sg4.z)).toShort, (fun(w,sg4.w)).toShort)
    def operate(ig4: GVec4I)(fun: (Int,Int)=>Int) = new IVec4I(fun((x).toInt,ig4.x), fun((y).toInt,ig4.y), fun((z).toInt,ig4.z), fun((w).toInt,ig4.w))
    def operate(lg4: GVec4L)(fun: (Long,Long)=>Long) = new IVec4L(fun((x).toLong,lg4.x), fun((y).toLong,lg4.y), fun((z).toLong,lg4.z), fun((w).toLong,lg4.w))
    def operate(fg4: GVec4F)(fun: (Float,Float)=>Float) = new IVec4F(fun((x).toFloat,fg4.x), fun((y).toFloat,fg4.y), fun((z).toFloat,fg4.z), fun((w).toFloat,fg4.w))
    def operate(dg4: GVec4D)(fun: (Double,Double)=>Double) = new IVec4D(fun((x).toDouble,dg4.x), fun((y).toDouble,dg4.y), fun((z).toDouble,dg4.z), fun((w).toDouble,dg4.w))
    def dot(sg4: GVec4S) = ((((x*sg4.x).toShort + (y*sg4.y).toShort).toShort + (z*sg4.z).toShort).toShort + (w*sg4.w).toShort).toShort
    def dot(ig4: GVec4I) = (x).toInt*ig4.x + (y).toInt*ig4.y + (z).toInt*ig4.z + (w).toInt*ig4.w
    def dot(lg4: GVec4L) = (x).toLong*lg4.x + (y).toLong*lg4.y + (z).toLong*lg4.z + (w).toLong*lg4.w
    def dot(fg4: GVec4F) = (x).toFloat*fg4.x + (y).toFloat*fg4.y + (z).toFloat*fg4.z + (w).toFloat*fg4.w
    def dot(dg4: GVec4D) = (x).toDouble*dg4.x + (y).toDouble*dg4.y + (z).toDouble*dg4.z + (w).toDouble*dg4.w
    final def **(sg4: GVec4S): Short = this.dot(sg4)
    final def **(ig4: GVec4I): Int = this.dot(ig4)
    final def **(lg4: GVec4L): Long = this.dot(lg4)
    final def **(fg4: GVec4F): Float = this.dot(fg4)
    final def **(dg4: GVec4D): Double = this.dot(dg4)
    def dot(x0: Short, y0: Short, z0: Short, w0: Short) = ((((x*x0).toShort + (y*y0).toShort).toShort + (z*z0).toShort).toShort + (w*w0).toShort).toShort
    final def **(x0: Short, y0: Short, z0: Short, w0: Short): Short = this.dot(x0, y0, z0, w0)
    final def unitDot(fg4: GVec4F): Float = (this.dot(fg4) / math.sqrt(lenSq * fg4.lenSq)).toFloat
    final def unitDot(dg4: GVec4D): Double = this.dot(dg4) / math.sqrt(lenSq * dg4.lenSq)
    final def *^*(fg4: GVec4F): Float = this.unitDot(fg4)
    final def *^*(dg4: GVec4D): Double = this.unitDot(dg4)
    def distSq(sg4: GVec4S) = (((((x-sg4.x)*(x-sg4.x)).toShort + ((y-sg4.y)*(y-sg4.y)).toShort).toShort + ((z-sg4.z)*(z-sg4.z)).toShort).toShort + ((w-sg4.w)*(w-sg4.w)).toShort).toShort
    def distSq(ig4: GVec4I) = ((x).toInt-ig4.x)*((x).toInt-ig4.x) + ((y).toInt-ig4.y)*((y).toInt-ig4.y) + ((z).toInt-ig4.z)*((z).toInt-ig4.z) + ((w).toInt-ig4.w)*((w).toInt-ig4.w)
    def distSq(lg4: GVec4L) = ((x).toLong-lg4.x)*((x).toLong-lg4.x) + ((y).toLong-lg4.y)*((y).toLong-lg4.y) + ((z).toLong-lg4.z)*((z).toLong-lg4.z) + ((w).toLong-lg4.w)*((w).toLong-lg4.w)
    def distSq(fg4: GVec4F) = ((x).toFloat-fg4.x)*((x).toFloat-fg4.x) + ((y).toFloat-fg4.y)*((y).toFloat-fg4.y) + ((z).toFloat-fg4.z)*((z).toFloat-fg4.z) + ((w).toFloat-fg4.w)*((w).toFloat-fg4.w)
    def distSq(dg4: GVec4D) = ((x).toDouble-dg4.x)*((x).toDouble-dg4.x) + ((y).toDouble-dg4.y)*((y).toDouble-dg4.y) + ((z).toDouble-dg4.z)*((z).toDouble-dg4.z) + ((w).toDouble-dg4.w)*((w).toDouble-dg4.w)
    final def dist(sg4: GVec4S): Short = (math.round(math.sqrt(this.distSq(sg4)))).toShort
    final def dist(ig4: GVec4I): Int = (math.round(math.sqrt(this.distSq(ig4)))).toInt
    final def dist(lg4: GVec4L): Long = math.round(math.sqrt(this.distSq(lg4)))
    final def dist(fg4: GVec4F): Float = (math.sqrt(this.distSq(fg4))).toFloat
    final def dist(dg4: GVec4D): Double = math.sqrt(this.distSq(dg4))
    def distSq(x0: Short, y0: Short, z0: Short, w0: Short) = (((((x-x0)*(x-x0)).toShort + ((y-y0)*(y-y0)).toShort).toShort + ((z-z0)*(z-z0)).toShort).toShort + ((w-w0)*(w-w0)).toShort).toShort
    final def dist(x0: Short, y0: Short, z0: Short, w0: Short): Short = (math.round(math.sqrt(this.distSq(x0, y0, z0, w0)))).toShort
    def ===(sg4: GVec4S) = x==sg4.x && y==sg4.y && z==sg4.z && w==sg4.w
    def ===(x0: Short, y0: Short, z0: Short, w0: Short) = x==x0 && y==y0 && z==z0 && w==w0
    def **(sg44: GMat4S) = new IVec4S((x*sg44.xx+y*sg44.yx+z*sg44.zx+w*sg44.wx).toShort, (x*sg44.xy+y*sg44.yy+z*sg44.zy+w*sg44.wy).toShort, (x*sg44.xz+y*sg44.yz+z*sg44.zz+w*sg44.wz).toShort, (x*sg44.xw+y*sg44.yw+z*sg44.zw+w*sg44.ww).toShort)
    def **(ig44: GMat4I) = new IVec4I((x).toInt*ig44.xx+(y).toInt*ig44.yx+(z).toInt*ig44.zx+(w).toInt*ig44.wx, (x).toInt*ig44.xy+(y).toInt*ig44.yy+(z).toInt*ig44.zy+(w).toInt*ig44.wy, (x).toInt*ig44.xz+(y).toInt*ig44.yz+(z).toInt*ig44.zz+(w).toInt*ig44.wz, (x).toInt*ig44.xw+(y).toInt*ig44.yw+(z).toInt*ig44.zw+(w).toInt*ig44.ww)
    def **(lg44: GMat4L) = new IVec4L((x).toLong*lg44.xx+(y).toLong*lg44.yx+(z).toLong*lg44.zx+(w).toLong*lg44.wx, (x).toLong*lg44.xy+(y).toLong*lg44.yy+(z).toLong*lg44.zy+(w).toLong*lg44.wy, (x).toLong*lg44.xz+(y).toLong*lg44.yz+(z).toLong*lg44.zz+(w).toLong*lg44.wz, (x).toLong*lg44.xw+(y).toLong*lg44.yw+(z).toLong*lg44.zw+(w).toLong*lg44.ww)
    def **(fg44: GMat4F) = new IVec4F((x).toFloat*fg44.xx+(y).toFloat*fg44.yx+(z).toFloat*fg44.zx+(w).toFloat*fg44.wx, (x).toFloat*fg44.xy+(y).toFloat*fg44.yy+(z).toFloat*fg44.zy+(w).toFloat*fg44.wy, (x).toFloat*fg44.xz+(y).toFloat*fg44.yz+(z).toFloat*fg44.zz+(w).toFloat*fg44.wz, (x).toFloat*fg44.xw+(y).toFloat*fg44.yw+(z).toFloat*fg44.zw+(w).toFloat*fg44.ww)
    def **(dg44: GMat4D) = new IVec4D((x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx, (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy, (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz, (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww)
  } // class GVec4S

  object GVec4S {
    def apply(x0: Short, y0: Short, z0: Short, w0: Short): GVec4S = new IVec4S(x0, y0, z0, w0)
    def parse(str: String): GVec4S = IVec4S.parse(str)
    val zero: GVec4S = IVec4S.zero
    val xUnit: GVec4S = IVec4S.xUnit
    val yUnit: GVec4S = IVec4S.yUnit
    val zUnit: GVec4S = IVec4S.zUnit
    val wUnit: GVec4S = IVec4S.wUnit
  } // object GVec4S


  abstract class GVec4I extends Cloneable {
    def x: Int
    def y: Int
    def z: Int
    def w: Int
    override def toString = "["+x+", "+y+", "+z+", "+w+"]"
    override def hashCode = (((w)*16777619 ^ z)*16777619 ^ y)*16777619 ^ x
    override def equals(any: Any) = any match { case sg4: GVec4S => {x==sg4.x && y==sg4.y && z==sg4.z && w==sg4.w }; case ig4: GVec4I => {x==ig4.x && y==ig4.y && z==ig4.z && w==ig4.w }; case lg4: GVec4L => {x==lg4.x && y==lg4.y && z==lg4.z && w==lg4.w }; case fg4: GVec4F => {x==fg4.x && y==fg4.y && z==fg4.z && w==fg4.w }; case dg4: GVec4D => {x==dg4.x && y==dg4.y && z==dg4.z && w==dg4.w }; case _ => false }
    override def clone(): GVec4I = new IVec4I(x, y, z, w)
    def toS: GVec4S = new IVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    def copy(x0: Int = x, y0: Int = y, z0: Int = z, w0: Int = w): GVec4I = new IVec4I(x0, y0, z0, w0)
    def trim: GVec3I = new IVec3I(x, y, z)
    def mapI(fun: Int => Int) = new IVec4I(fun(x), fun(y), fun(z), fun(w))
    def toL: GVec4L = new IVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    def mapL(fun: Int => Long) = new IVec4L((fun(x)).toLong, (fun(y)).toLong, (fun(z)).toLong, (fun(w)).toLong)
    def toF: GVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    def mapF(fun: Int => Float) = new IVec4F((fun(x)).toFloat, (fun(y)).toFloat, (fun(z)).toFloat, (fun(w)).toFloat)
    def toD: GVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def mapD(fun: Int => Double) = new IVec4D((fun(x)).toDouble, (fun(y)).toDouble, (fun(z)).toDouble, (fun(w)).toDouble)
    def imm = new IVec4I(x, y, z, w)
    def mut = new MVec4I(x, y, z, w)
    def lenSq = x*x + y*y + z*z + w*w
    def unary_-() = new IVec4I(-x, -y, -z, -w)
    def +(x0: Int) = new IVec4I(x + x0, y + x0, z + x0, w + x0)
    def +(x0: Long) = new IVec4L((x).toLong + x0, (y).toLong + x0, (z).toLong + x0, (w).toLong + x0)
    def +(x0: Float) = new IVec4F((x).toFloat + x0, (y).toFloat + x0, (z).toFloat + x0, (w).toFloat + x0)
    def +(x0: Double) = new IVec4D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0, (w).toDouble + x0)
    def +(sg4: GVec4S) = new IVec4I(x + (sg4.x).toInt, y + (sg4.y).toInt, z + (sg4.z).toInt, w + (sg4.w).toInt)
    def +(ig4: GVec4I) = new IVec4I(x + ig4.x, y + ig4.y, z + ig4.z, w + ig4.w)
    def +(x0: Int, y0: Int, z0: Int, w0: Int) = new IVec4I(x + x0, y + y0, z + z0, w + w0)
    def +(lg4: GVec4L) = new IVec4L((x).toLong + lg4.x, (y).toLong + lg4.y, (z).toLong + lg4.z, (w).toLong + lg4.w)
    def +(fg4: GVec4F) = new IVec4F((x).toFloat + fg4.x, (y).toFloat + fg4.y, (z).toFloat + fg4.z, (w).toFloat + fg4.w)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (y).toDouble + dg4.y, (z).toDouble + dg4.z, (w).toDouble + dg4.w)
    def -(x0: Int) = new IVec4I(x - x0, y - x0, z - x0, w - x0)
    def -(x0: Long) = new IVec4L((x).toLong - x0, (y).toLong - x0, (z).toLong - x0, (w).toLong - x0)
    def -(x0: Float) = new IVec4F((x).toFloat - x0, (y).toFloat - x0, (z).toFloat - x0, (w).toFloat - x0)
    def -(x0: Double) = new IVec4D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0, (w).toDouble - x0)
    def -(sg4: GVec4S) = new IVec4I(x - (sg4.x).toInt, y - (sg4.y).toInt, z - (sg4.z).toInt, w - (sg4.w).toInt)
    def -(ig4: GVec4I) = new IVec4I(x - ig4.x, y - ig4.y, z - ig4.z, w - ig4.w)
    def -(x0: Int, y0: Int, z0: Int, w0: Int) = new IVec4I(x - x0, y - y0, z - z0, w - w0)
    def -(lg4: GVec4L) = new IVec4L((x).toLong - lg4.x, (y).toLong - lg4.y, (z).toLong - lg4.z, (w).toLong - lg4.w)
    def -(fg4: GVec4F) = new IVec4F((x).toFloat - fg4.x, (y).toFloat - fg4.y, (z).toFloat - fg4.z, (w).toFloat - fg4.w)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (y).toDouble - dg4.y, (z).toDouble - dg4.z, (w).toDouble - dg4.w)
    def *(x0: Int) = new IVec4I(x * x0, y * x0, z * x0, w * x0)
    def *(x0: Long) = new IVec4L((x).toLong * x0, (y).toLong * x0, (z).toLong * x0, (w).toLong * x0)
    def *(x0: Float) = new IVec4F((x).toFloat * x0, (y).toFloat * x0, (z).toFloat * x0, (w).toFloat * x0)
    def *(x0: Double) = new IVec4D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0, (w).toDouble * x0)
    def *(sg4: GVec4S) = new IVec4I(x * (sg4.x).toInt, y * (sg4.y).toInt, z * (sg4.z).toInt, w * (sg4.w).toInt)
    def *(ig4: GVec4I) = new IVec4I(x * ig4.x, y * ig4.y, z * ig4.z, w * ig4.w)
    def *(x0: Int, y0: Int, z0: Int, w0: Int) = new IVec4I(x * x0, y * y0, z * z0, w * w0)
    def *(lg4: GVec4L) = new IVec4L((x).toLong * lg4.x, (y).toLong * lg4.y, (z).toLong * lg4.z, (w).toLong * lg4.w)
    def *(fg4: GVec4F) = new IVec4F((x).toFloat * fg4.x, (y).toFloat * fg4.y, (z).toFloat * fg4.z, (w).toFloat * fg4.w)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (y).toDouble * dg4.y, (z).toDouble * dg4.z, (w).toDouble * dg4.w)
    def /(x0: Int) = new IVec4I(x / x0, y / x0, z / x0, w / x0)
    def /(x0: Long) = new IVec4L((x).toLong / x0, (y).toLong / x0, (z).toLong / x0, (w).toLong / x0)
    def /(x0: Float) = new IVec4F((x).toFloat / x0, (y).toFloat / x0, (z).toFloat / x0, (w).toFloat / x0)
    def /(x0: Double) = new IVec4D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0, (w).toDouble / x0)
    def /(sg4: GVec4S) = new IVec4I(x / (sg4.x).toInt, y / (sg4.y).toInt, z / (sg4.z).toInt, w / (sg4.w).toInt)
    def /(ig4: GVec4I) = new IVec4I(x / ig4.x, y / ig4.y, z / ig4.z, w / ig4.w)
    def /(x0: Int, y0: Int, z0: Int, w0: Int) = new IVec4I(x / x0, y / y0, z / z0, w / w0)
    def /(lg4: GVec4L) = new IVec4L((x).toLong / lg4.x, (y).toLong / lg4.y, (z).toLong / lg4.z, (w).toLong / lg4.w)
    def /(fg4: GVec4F) = new IVec4F((x).toFloat / fg4.x, (y).toFloat / fg4.y, (z).toFloat / fg4.z, (w).toFloat / fg4.w)
    def /(dg4: GVec4D) = new IVec4D((x).toDouble / dg4.x, (y).toDouble / dg4.y, (z).toDouble / dg4.z, (w).toDouble / dg4.w)
    def max(x0: Int) = new IVec4I(math.max(x,x0), math.max(y,x0), math.max(z,x0), math.max(w,x0))
    def max(x0: Long) = new IVec4L(math.max((x).toLong,x0), math.max((y).toLong,x0), math.max((z).toLong,x0), math.max((w).toLong,x0))
    def max(x0: Float) = new IVec4F(math.max((x).toFloat,x0), math.max((y).toFloat,x0), math.max((z).toFloat,x0), math.max((w).toFloat,x0))
    def max(x0: Double) = new IVec4D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0), math.max((w).toDouble,x0))
    def max(sg4: GVec4S) = new IVec4I(math.max(x,(sg4.x).toInt), math.max(y,(sg4.y).toInt), math.max(z,(sg4.z).toInt), math.max(w,(sg4.w).toInt))
    def max(ig4: GVec4I) = new IVec4I(math.max(x,ig4.x), math.max(y,ig4.y), math.max(z,ig4.z), math.max(w,ig4.w))
    def max(x0: Int, y0: Int, z0: Int, w0: Int) = new IVec4I(math.max(x,x0), math.max(y,y0), math.max(z,z0), math.max(w,w0))
    def max(lg4: GVec4L) = new IVec4L(math.max((x).toLong,lg4.x), math.max((y).toLong,lg4.y), math.max((z).toLong,lg4.z), math.max((w).toLong,lg4.w))
    def max(fg4: GVec4F) = new IVec4F(math.max((x).toFloat,fg4.x), math.max((y).toFloat,fg4.y), math.max((z).toFloat,fg4.z), math.max((w).toFloat,fg4.w))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((y).toDouble,dg4.y), math.max((z).toDouble,dg4.z), math.max((w).toDouble,dg4.w))
    def min(x0: Int) = new IVec4I(math.min(x,x0), math.min(y,x0), math.min(z,x0), math.min(w,x0))
    def min(x0: Long) = new IVec4L(math.min((x).toLong,x0), math.min((y).toLong,x0), math.min((z).toLong,x0), math.min((w).toLong,x0))
    def min(x0: Float) = new IVec4F(math.min((x).toFloat,x0), math.min((y).toFloat,x0), math.min((z).toFloat,x0), math.min((w).toFloat,x0))
    def min(x0: Double) = new IVec4D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0), math.min((w).toDouble,x0))
    def min(sg4: GVec4S) = new IVec4I(math.min(x,(sg4.x).toInt), math.min(y,(sg4.y).toInt), math.min(z,(sg4.z).toInt), math.min(w,(sg4.w).toInt))
    def min(ig4: GVec4I) = new IVec4I(math.min(x,ig4.x), math.min(y,ig4.y), math.min(z,ig4.z), math.min(w,ig4.w))
    def min(x0: Int, y0: Int, z0: Int, w0: Int) = new IVec4I(math.min(x,x0), math.min(y,y0), math.min(z,z0), math.min(w,w0))
    def min(lg4: GVec4L) = new IVec4L(math.min((x).toLong,lg4.x), math.min((y).toLong,lg4.y), math.min((z).toLong,lg4.z), math.min((w).toLong,lg4.w))
    def min(fg4: GVec4F) = new IVec4F(math.min((x).toFloat,fg4.x), math.min((y).toFloat,fg4.y), math.min((z).toFloat,fg4.z), math.min((w).toFloat,fg4.w))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((y).toDouble,dg4.y), math.min((z).toDouble,dg4.z), math.min((w).toDouble,dg4.w))
    def operate(sg4: GVec4S)(fun: (Int,Int)=>Int) = new IVec4I(fun(x,(sg4.x).toInt), fun(y,(sg4.y).toInt), fun(z,(sg4.z).toInt), fun(w,(sg4.w).toInt))
    def operate(ig4: GVec4I)(fun: (Int,Int)=>Int) = new IVec4I(fun(x,ig4.x), fun(y,ig4.y), fun(z,ig4.z), fun(w,ig4.w))
    def operate(lg4: GVec4L)(fun: (Long,Long)=>Long) = new IVec4L(fun((x).toLong,lg4.x), fun((y).toLong,lg4.y), fun((z).toLong,lg4.z), fun((w).toLong,lg4.w))
    def operate(fg4: GVec4F)(fun: (Float,Float)=>Float) = new IVec4F(fun((x).toFloat,fg4.x), fun((y).toFloat,fg4.y), fun((z).toFloat,fg4.z), fun((w).toFloat,fg4.w))
    def operate(dg4: GVec4D)(fun: (Double,Double)=>Double) = new IVec4D(fun((x).toDouble,dg4.x), fun((y).toDouble,dg4.y), fun((z).toDouble,dg4.z), fun((w).toDouble,dg4.w))
    def dot(sg4: GVec4S) = x*(sg4.x).toInt + y*(sg4.y).toInt + z*(sg4.z).toInt + w*(sg4.w).toInt
    def dot(ig4: GVec4I) = x*ig4.x + y*ig4.y + z*ig4.z + w*ig4.w
    def dot(lg4: GVec4L) = (x).toLong*lg4.x + (y).toLong*lg4.y + (z).toLong*lg4.z + (w).toLong*lg4.w
    def dot(fg4: GVec4F) = (x).toFloat*fg4.x + (y).toFloat*fg4.y + (z).toFloat*fg4.z + (w).toFloat*fg4.w
    def dot(dg4: GVec4D) = (x).toDouble*dg4.x + (y).toDouble*dg4.y + (z).toDouble*dg4.z + (w).toDouble*dg4.w
    final def **(sg4: GVec4S): Int = this.dot(sg4)
    final def **(ig4: GVec4I): Int = this.dot(ig4)
    final def **(lg4: GVec4L): Long = this.dot(lg4)
    final def **(fg4: GVec4F): Float = this.dot(fg4)
    final def **(dg4: GVec4D): Double = this.dot(dg4)
    def dot(x0: Int, y0: Int, z0: Int, w0: Int) = x*x0 + y*y0 + z*z0 + w*w0
    final def **(x0: Int, y0: Int, z0: Int, w0: Int): Int = this.dot(x0, y0, z0, w0)
    final def unitDot(fg4: GVec4F): Float = (this.dot(fg4) / math.sqrt(lenSq * fg4.lenSq)).toFloat
    final def unitDot(dg4: GVec4D): Double = this.dot(dg4) / math.sqrt(lenSq * dg4.lenSq)
    final def *^*(fg4: GVec4F): Float = this.unitDot(fg4)
    final def *^*(dg4: GVec4D): Double = this.unitDot(dg4)
    def fold(zero: Int)(fun: (Int,Int)=>Int) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Long)(fun: (Long,Int)=>Long) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Float)(fun: (Float,Int)=>Float) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Double)(fun: (Double,Int)=>Double) = fun(fun(fun(fun(zero,x),y),z),w)
    def reduce(fun: (Int,Int)=>Int) = fun(fun(fun(x,y),z),w)
    def distSq(sg4: GVec4S) = (x-(sg4.x).toInt)*(x-(sg4.x).toInt) + (y-(sg4.y).toInt)*(y-(sg4.y).toInt) + (z-(sg4.z).toInt)*(z-(sg4.z).toInt) + (w-(sg4.w).toInt)*(w-(sg4.w).toInt)
    def distSq(ig4: GVec4I) = (x-ig4.x)*(x-ig4.x) + (y-ig4.y)*(y-ig4.y) + (z-ig4.z)*(z-ig4.z) + (w-ig4.w)*(w-ig4.w)
    def distSq(lg4: GVec4L) = ((x).toLong-lg4.x)*((x).toLong-lg4.x) + ((y).toLong-lg4.y)*((y).toLong-lg4.y) + ((z).toLong-lg4.z)*((z).toLong-lg4.z) + ((w).toLong-lg4.w)*((w).toLong-lg4.w)
    def distSq(fg4: GVec4F) = ((x).toFloat-fg4.x)*((x).toFloat-fg4.x) + ((y).toFloat-fg4.y)*((y).toFloat-fg4.y) + ((z).toFloat-fg4.z)*((z).toFloat-fg4.z) + ((w).toFloat-fg4.w)*((w).toFloat-fg4.w)
    def distSq(dg4: GVec4D) = ((x).toDouble-dg4.x)*((x).toDouble-dg4.x) + ((y).toDouble-dg4.y)*((y).toDouble-dg4.y) + ((z).toDouble-dg4.z)*((z).toDouble-dg4.z) + ((w).toDouble-dg4.w)*((w).toDouble-dg4.w)
    final def dist(sg4: GVec4S): Int = (math.round(math.sqrt(this.distSq(sg4)))).toInt
    final def dist(ig4: GVec4I): Int = (math.round(math.sqrt(this.distSq(ig4)))).toInt
    final def dist(lg4: GVec4L): Long = math.round(math.sqrt(this.distSq(lg4)))
    final def dist(fg4: GVec4F): Float = (math.sqrt(this.distSq(fg4))).toFloat
    final def dist(dg4: GVec4D): Double = math.sqrt(this.distSq(dg4))
    def distSq(x0: Int, y0: Int, z0: Int, w0: Int) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0) + (w-w0)*(w-w0)
    final def dist(x0: Int, y0: Int, z0: Int, w0: Int): Int = (math.round(math.sqrt(this.distSq(x0, y0, z0, w0)))).toInt
    def ===(ig4: GVec4I) = x==ig4.x && y==ig4.y && z==ig4.z && w==ig4.w
    def ===(x0: Int, y0: Int, z0: Int, w0: Int) = x==x0 && y==y0 && z==z0 && w==w0
    def **(sg44: GMat4S) = new IVec4I(x*(sg44.xx).toInt+y*(sg44.yx).toInt+z*(sg44.zx).toInt+w*(sg44.wx).toInt, x*(sg44.xy).toInt+y*(sg44.yy).toInt+z*(sg44.zy).toInt+w*(sg44.wy).toInt, x*(sg44.xz).toInt+y*(sg44.yz).toInt+z*(sg44.zz).toInt+w*(sg44.wz).toInt, x*(sg44.xw).toInt+y*(sg44.yw).toInt+z*(sg44.zw).toInt+w*(sg44.ww).toInt)
    def **(ig44: GMat4I) = new IVec4I(x*ig44.xx+y*ig44.yx+z*ig44.zx+w*ig44.wx, x*ig44.xy+y*ig44.yy+z*ig44.zy+w*ig44.wy, x*ig44.xz+y*ig44.yz+z*ig44.zz+w*ig44.wz, x*ig44.xw+y*ig44.yw+z*ig44.zw+w*ig44.ww)
    def **(lg44: GMat4L) = new IVec4L((x).toLong*lg44.xx+(y).toLong*lg44.yx+(z).toLong*lg44.zx+(w).toLong*lg44.wx, (x).toLong*lg44.xy+(y).toLong*lg44.yy+(z).toLong*lg44.zy+(w).toLong*lg44.wy, (x).toLong*lg44.xz+(y).toLong*lg44.yz+(z).toLong*lg44.zz+(w).toLong*lg44.wz, (x).toLong*lg44.xw+(y).toLong*lg44.yw+(z).toLong*lg44.zw+(w).toLong*lg44.ww)
    def **(fg44: GMat4F) = new IVec4F((x).toFloat*fg44.xx+(y).toFloat*fg44.yx+(z).toFloat*fg44.zx+(w).toFloat*fg44.wx, (x).toFloat*fg44.xy+(y).toFloat*fg44.yy+(z).toFloat*fg44.zy+(w).toFloat*fg44.wy, (x).toFloat*fg44.xz+(y).toFloat*fg44.yz+(z).toFloat*fg44.zz+(w).toFloat*fg44.wz, (x).toFloat*fg44.xw+(y).toFloat*fg44.yw+(z).toFloat*fg44.zw+(w).toFloat*fg44.ww)
    def **(dg44: GMat4D) = new IVec4D((x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx, (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy, (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz, (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww)
  } // class GVec4I

  object GVec4I {
    def apply(x0: Int, y0: Int, z0: Int, w0: Int): GVec4I = new IVec4I(x0, y0, z0, w0)
    def parse(str: String): GVec4I = IVec4I.parse(str)
    val zero: GVec4I = IVec4I.zero
    val xUnit: GVec4I = IVec4I.xUnit
    val yUnit: GVec4I = IVec4I.yUnit
    val zUnit: GVec4I = IVec4I.zUnit
    val wUnit: GVec4I = IVec4I.wUnit
  } // object GVec4I


  abstract class GVec4L extends Cloneable {
    def x: Long
    def y: Long
    def z: Long
    def w: Long
    override def toString = "["+x+", "+y+", "+z+", "+w+"]"
    override def hashCode = (((w.##)*16777619 ^ z.##)*16777619 ^ y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg4: GVec4S => {x==sg4.x && y==sg4.y && z==sg4.z && w==sg4.w }; case ig4: GVec4I => {x==ig4.x && y==ig4.y && z==ig4.z && w==ig4.w }; case lg4: GVec4L => {x==lg4.x && y==lg4.y && z==lg4.z && w==lg4.w }; case fg4: GVec4F => {x==fg4.x && y==fg4.y && z==fg4.z && w==fg4.w }; case dg4: GVec4D => {x==dg4.x && y==dg4.y && z==dg4.z && w==dg4.w }; case _ => false }
    override def clone(): GVec4L = new IVec4L(x, y, z, w)
    def toS: GVec4S = new IVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    def toI: GVec4I = new IVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    def mapI(fun: Long => Int) = new IVec4I((fun(x)).toInt, (fun(y)).toInt, (fun(z)).toInt, (fun(w)).toInt)
    def copy(x0: Long = x, y0: Long = y, z0: Long = z, w0: Long = w): GVec4L = new IVec4L(x0, y0, z0, w0)
    def trim: GVec3L = new IVec3L(x, y, z)
    def mapL(fun: Long => Long) = new IVec4L(fun(x), fun(y), fun(z), fun(w))
    def toF: GVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    def mapF(fun: Long => Float) = new IVec4F((fun(x)).toFloat, (fun(y)).toFloat, (fun(z)).toFloat, (fun(w)).toFloat)
    def toD: GVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def mapD(fun: Long => Double) = new IVec4D((fun(x)).toDouble, (fun(y)).toDouble, (fun(z)).toDouble, (fun(w)).toDouble)
    def imm = new IVec4L(x, y, z, w)
    def mut = new MVec4L(x, y, z, w)
    def lenSq = x*x + y*y + z*z + w*w
    def unary_-() = new IVec4L(-x, -y, -z, -w)
    def +(x0: Long) = new IVec4L(x + x0, y + x0, z + x0, w + x0)
    def +(x0: Double) = new IVec4D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0, (w).toDouble + x0)
    def +(sg4: GVec4S) = new IVec4L(x + (sg4.x).toLong, y + (sg4.y).toLong, z + (sg4.z).toLong, w + (sg4.w).toLong)
    def +(ig4: GVec4I) = new IVec4L(x + (ig4.x).toLong, y + (ig4.y).toLong, z + (ig4.z).toLong, w + (ig4.w).toLong)
    def +(lg4: GVec4L) = new IVec4L(x + lg4.x, y + lg4.y, z + lg4.z, w + lg4.w)
    def +(x0: Long, y0: Long, z0: Long, w0: Long) = new IVec4L(x + x0, y + y0, z + z0, w + w0)
    def +(fg4: GVec4F) = new IVec4D((x).toDouble + (fg4.x).toDouble, (y).toDouble + (fg4.y).toDouble, (z).toDouble + (fg4.z).toDouble, (w).toDouble + (fg4.w).toDouble)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (y).toDouble + dg4.y, (z).toDouble + dg4.z, (w).toDouble + dg4.w)
    def -(x0: Long) = new IVec4L(x - x0, y - x0, z - x0, w - x0)
    def -(x0: Double) = new IVec4D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0, (w).toDouble - x0)
    def -(sg4: GVec4S) = new IVec4L(x - (sg4.x).toLong, y - (sg4.y).toLong, z - (sg4.z).toLong, w - (sg4.w).toLong)
    def -(ig4: GVec4I) = new IVec4L(x - (ig4.x).toLong, y - (ig4.y).toLong, z - (ig4.z).toLong, w - (ig4.w).toLong)
    def -(lg4: GVec4L) = new IVec4L(x - lg4.x, y - lg4.y, z - lg4.z, w - lg4.w)
    def -(x0: Long, y0: Long, z0: Long, w0: Long) = new IVec4L(x - x0, y - y0, z - z0, w - w0)
    def -(fg4: GVec4F) = new IVec4D((x).toDouble - (fg4.x).toDouble, (y).toDouble - (fg4.y).toDouble, (z).toDouble - (fg4.z).toDouble, (w).toDouble - (fg4.w).toDouble)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (y).toDouble - dg4.y, (z).toDouble - dg4.z, (w).toDouble - dg4.w)
    def *(x0: Long) = new IVec4L(x * x0, y * x0, z * x0, w * x0)
    def *(x0: Double) = new IVec4D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0, (w).toDouble * x0)
    def *(sg4: GVec4S) = new IVec4L(x * (sg4.x).toLong, y * (sg4.y).toLong, z * (sg4.z).toLong, w * (sg4.w).toLong)
    def *(ig4: GVec4I) = new IVec4L(x * (ig4.x).toLong, y * (ig4.y).toLong, z * (ig4.z).toLong, w * (ig4.w).toLong)
    def *(lg4: GVec4L) = new IVec4L(x * lg4.x, y * lg4.y, z * lg4.z, w * lg4.w)
    def *(x0: Long, y0: Long, z0: Long, w0: Long) = new IVec4L(x * x0, y * y0, z * z0, w * w0)
    def *(fg4: GVec4F) = new IVec4D((x).toDouble * (fg4.x).toDouble, (y).toDouble * (fg4.y).toDouble, (z).toDouble * (fg4.z).toDouble, (w).toDouble * (fg4.w).toDouble)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (y).toDouble * dg4.y, (z).toDouble * dg4.z, (w).toDouble * dg4.w)
    def /(x0: Long) = new IVec4L(x / x0, y / x0, z / x0, w / x0)
    def /(x0: Double) = new IVec4D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0, (w).toDouble / x0)
    def /(sg4: GVec4S) = new IVec4L(x / (sg4.x).toLong, y / (sg4.y).toLong, z / (sg4.z).toLong, w / (sg4.w).toLong)
    def /(ig4: GVec4I) = new IVec4L(x / (ig4.x).toLong, y / (ig4.y).toLong, z / (ig4.z).toLong, w / (ig4.w).toLong)
    def /(lg4: GVec4L) = new IVec4L(x / lg4.x, y / lg4.y, z / lg4.z, w / lg4.w)
    def /(x0: Long, y0: Long, z0: Long, w0: Long) = new IVec4L(x / x0, y / y0, z / z0, w / w0)
    def /(fg4: GVec4F) = new IVec4D((x).toDouble / (fg4.x).toDouble, (y).toDouble / (fg4.y).toDouble, (z).toDouble / (fg4.z).toDouble, (w).toDouble / (fg4.w).toDouble)
    def /(dg4: GVec4D) = new IVec4D((x).toDouble / dg4.x, (y).toDouble / dg4.y, (z).toDouble / dg4.z, (w).toDouble / dg4.w)
    def max(x0: Long) = new IVec4L(math.max(x,x0), math.max(y,x0), math.max(z,x0), math.max(w,x0))
    def max(x0: Double) = new IVec4D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0), math.max((w).toDouble,x0))
    def max(sg4: GVec4S) = new IVec4L(math.max(x,(sg4.x).toLong), math.max(y,(sg4.y).toLong), math.max(z,(sg4.z).toLong), math.max(w,(sg4.w).toLong))
    def max(ig4: GVec4I) = new IVec4L(math.max(x,(ig4.x).toLong), math.max(y,(ig4.y).toLong), math.max(z,(ig4.z).toLong), math.max(w,(ig4.w).toLong))
    def max(lg4: GVec4L) = new IVec4L(math.max(x,lg4.x), math.max(y,lg4.y), math.max(z,lg4.z), math.max(w,lg4.w))
    def max(x0: Long, y0: Long, z0: Long, w0: Long) = new IVec4L(math.max(x,x0), math.max(y,y0), math.max(z,z0), math.max(w,w0))
    def max(fg4: GVec4F) = new IVec4D(math.max((x).toDouble,(fg4.x).toDouble), math.max((y).toDouble,(fg4.y).toDouble), math.max((z).toDouble,(fg4.z).toDouble), math.max((w).toDouble,(fg4.w).toDouble))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((y).toDouble,dg4.y), math.max((z).toDouble,dg4.z), math.max((w).toDouble,dg4.w))
    def min(x0: Long) = new IVec4L(math.min(x,x0), math.min(y,x0), math.min(z,x0), math.min(w,x0))
    def min(x0: Double) = new IVec4D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0), math.min((w).toDouble,x0))
    def min(sg4: GVec4S) = new IVec4L(math.min(x,(sg4.x).toLong), math.min(y,(sg4.y).toLong), math.min(z,(sg4.z).toLong), math.min(w,(sg4.w).toLong))
    def min(ig4: GVec4I) = new IVec4L(math.min(x,(ig4.x).toLong), math.min(y,(ig4.y).toLong), math.min(z,(ig4.z).toLong), math.min(w,(ig4.w).toLong))
    def min(lg4: GVec4L) = new IVec4L(math.min(x,lg4.x), math.min(y,lg4.y), math.min(z,lg4.z), math.min(w,lg4.w))
    def min(x0: Long, y0: Long, z0: Long, w0: Long) = new IVec4L(math.min(x,x0), math.min(y,y0), math.min(z,z0), math.min(w,w0))
    def min(fg4: GVec4F) = new IVec4D(math.min((x).toDouble,(fg4.x).toDouble), math.min((y).toDouble,(fg4.y).toDouble), math.min((z).toDouble,(fg4.z).toDouble), math.min((w).toDouble,(fg4.w).toDouble))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((y).toDouble,dg4.y), math.min((z).toDouble,dg4.z), math.min((w).toDouble,dg4.w))
    def operate(sg4: GVec4S)(fun: (Long,Long)=>Long) = new IVec4L(fun(x,(sg4.x).toLong), fun(y,(sg4.y).toLong), fun(z,(sg4.z).toLong), fun(w,(sg4.w).toLong))
    def operate(ig4: GVec4I)(fun: (Long,Long)=>Long) = new IVec4L(fun(x,(ig4.x).toLong), fun(y,(ig4.y).toLong), fun(z,(ig4.z).toLong), fun(w,(ig4.w).toLong))
    def operate(lg4: GVec4L)(fun: (Long,Long)=>Long) = new IVec4L(fun(x,lg4.x), fun(y,lg4.y), fun(z,lg4.z), fun(w,lg4.w))
    def operate(fg4: GVec4F)(fun: (Double,Double)=>Double) = new IVec4D(fun((x).toDouble,(fg4.x).toDouble), fun((y).toDouble,(fg4.y).toDouble), fun((z).toDouble,(fg4.z).toDouble), fun((w).toDouble,(fg4.w).toDouble))
    def operate(dg4: GVec4D)(fun: (Double,Double)=>Double) = new IVec4D(fun((x).toDouble,dg4.x), fun((y).toDouble,dg4.y), fun((z).toDouble,dg4.z), fun((w).toDouble,dg4.w))
    def dot(sg4: GVec4S) = x*(sg4.x).toLong + y*(sg4.y).toLong + z*(sg4.z).toLong + w*(sg4.w).toLong
    def dot(ig4: GVec4I) = x*(ig4.x).toLong + y*(ig4.y).toLong + z*(ig4.z).toLong + w*(ig4.w).toLong
    def dot(lg4: GVec4L) = x*lg4.x + y*lg4.y + z*lg4.z + w*lg4.w
    def dot(fg4: GVec4F) = (x).toDouble*(fg4.x).toDouble + (y).toDouble*(fg4.y).toDouble + (z).toDouble*(fg4.z).toDouble + (w).toDouble*(fg4.w).toDouble
    def dot(dg4: GVec4D) = (x).toDouble*dg4.x + (y).toDouble*dg4.y + (z).toDouble*dg4.z + (w).toDouble*dg4.w
    final def **(sg4: GVec4S): Long = this.dot(sg4)
    final def **(ig4: GVec4I): Long = this.dot(ig4)
    final def **(lg4: GVec4L): Long = this.dot(lg4)
    final def **(fg4: GVec4F): Double = this.dot(fg4)
    final def **(dg4: GVec4D): Double = this.dot(dg4)
    def dot(x0: Long, y0: Long, z0: Long, w0: Long) = x*x0 + y*y0 + z*z0 + w*w0
    final def **(x0: Long, y0: Long, z0: Long, w0: Long): Long = this.dot(x0, y0, z0, w0)
    final def unitDot(fg4: GVec4F): Double = this.dot(fg4) / math.sqrt(lenSq * fg4.lenSq)
    final def unitDot(dg4: GVec4D): Double = this.dot(dg4) / math.sqrt(lenSq * dg4.lenSq)
    final def *^*(fg4: GVec4F): Double = this.unitDot(fg4)
    final def *^*(dg4: GVec4D): Double = this.unitDot(dg4)
    def fold(zero: Int)(fun: (Int,Long)=>Int) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Long)(fun: (Long,Long)=>Long) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Float)(fun: (Float,Long)=>Float) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Double)(fun: (Double,Long)=>Double) = fun(fun(fun(fun(zero,x),y),z),w)
    def reduce(fun: (Long,Long)=>Long) = fun(fun(fun(x,y),z),w)
    def distSq(sg4: GVec4S) = (x-(sg4.x).toLong)*(x-(sg4.x).toLong) + (y-(sg4.y).toLong)*(y-(sg4.y).toLong) + (z-(sg4.z).toLong)*(z-(sg4.z).toLong) + (w-(sg4.w).toLong)*(w-(sg4.w).toLong)
    def distSq(ig4: GVec4I) = (x-(ig4.x).toLong)*(x-(ig4.x).toLong) + (y-(ig4.y).toLong)*(y-(ig4.y).toLong) + (z-(ig4.z).toLong)*(z-(ig4.z).toLong) + (w-(ig4.w).toLong)*(w-(ig4.w).toLong)
    def distSq(lg4: GVec4L) = (x-lg4.x)*(x-lg4.x) + (y-lg4.y)*(y-lg4.y) + (z-lg4.z)*(z-lg4.z) + (w-lg4.w)*(w-lg4.w)
    def distSq(fg4: GVec4F) = ((x).toDouble-(fg4.x).toDouble)*((x).toDouble-(fg4.x).toDouble) + ((y).toDouble-(fg4.y).toDouble)*((y).toDouble-(fg4.y).toDouble) + ((z).toDouble-(fg4.z).toDouble)*((z).toDouble-(fg4.z).toDouble) + ((w).toDouble-(fg4.w).toDouble)*((w).toDouble-(fg4.w).toDouble)
    def distSq(dg4: GVec4D) = ((x).toDouble-dg4.x)*((x).toDouble-dg4.x) + ((y).toDouble-dg4.y)*((y).toDouble-dg4.y) + ((z).toDouble-dg4.z)*((z).toDouble-dg4.z) + ((w).toDouble-dg4.w)*((w).toDouble-dg4.w)
    final def dist(sg4: GVec4S): Long = math.round(math.sqrt(this.distSq(sg4)))
    final def dist(ig4: GVec4I): Long = math.round(math.sqrt(this.distSq(ig4)))
    final def dist(lg4: GVec4L): Long = math.round(math.sqrt(this.distSq(lg4)))
    final def dist(fg4: GVec4F): Double = math.sqrt(this.distSq(fg4))
    final def dist(dg4: GVec4D): Double = math.sqrt(this.distSq(dg4))
    def distSq(x0: Long, y0: Long, z0: Long, w0: Long) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0) + (w-w0)*(w-w0)
    final def dist(x0: Long, y0: Long, z0: Long, w0: Long): Long = math.round(math.sqrt(this.distSq(x0, y0, z0, w0)))
    def ===(lg4: GVec4L) = x==lg4.x && y==lg4.y && z==lg4.z && w==lg4.w
    def ===(x0: Long, y0: Long, z0: Long, w0: Long) = x==x0 && y==y0 && z==z0 && w==w0
    def **(sg44: GMat4S) = new IVec4L(x*(sg44.xx).toLong+y*(sg44.yx).toLong+z*(sg44.zx).toLong+w*(sg44.wx).toLong, x*(sg44.xy).toLong+y*(sg44.yy).toLong+z*(sg44.zy).toLong+w*(sg44.wy).toLong, x*(sg44.xz).toLong+y*(sg44.yz).toLong+z*(sg44.zz).toLong+w*(sg44.wz).toLong, x*(sg44.xw).toLong+y*(sg44.yw).toLong+z*(sg44.zw).toLong+w*(sg44.ww).toLong)
    def **(ig44: GMat4I) = new IVec4L(x*(ig44.xx).toLong+y*(ig44.yx).toLong+z*(ig44.zx).toLong+w*(ig44.wx).toLong, x*(ig44.xy).toLong+y*(ig44.yy).toLong+z*(ig44.zy).toLong+w*(ig44.wy).toLong, x*(ig44.xz).toLong+y*(ig44.yz).toLong+z*(ig44.zz).toLong+w*(ig44.wz).toLong, x*(ig44.xw).toLong+y*(ig44.yw).toLong+z*(ig44.zw).toLong+w*(ig44.ww).toLong)
    def **(lg44: GMat4L) = new IVec4L(x*lg44.xx+y*lg44.yx+z*lg44.zx+w*lg44.wx, x*lg44.xy+y*lg44.yy+z*lg44.zy+w*lg44.wy, x*lg44.xz+y*lg44.yz+z*lg44.zz+w*lg44.wz, x*lg44.xw+y*lg44.yw+z*lg44.zw+w*lg44.ww)
    def **(fg44: GMat4F) = new IVec4D((x).toDouble*(fg44.xx).toDouble+(y).toDouble*(fg44.yx).toDouble+(z).toDouble*(fg44.zx).toDouble+(w).toDouble*(fg44.wx).toDouble, (x).toDouble*(fg44.xy).toDouble+(y).toDouble*(fg44.yy).toDouble+(z).toDouble*(fg44.zy).toDouble+(w).toDouble*(fg44.wy).toDouble, (x).toDouble*(fg44.xz).toDouble+(y).toDouble*(fg44.yz).toDouble+(z).toDouble*(fg44.zz).toDouble+(w).toDouble*(fg44.wz).toDouble, (x).toDouble*(fg44.xw).toDouble+(y).toDouble*(fg44.yw).toDouble+(z).toDouble*(fg44.zw).toDouble+(w).toDouble*(fg44.ww).toDouble)
    def **(dg44: GMat4D) = new IVec4D((x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx, (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy, (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz, (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww)
  } // class GVec4L

  object GVec4L {
    def apply(x0: Long, y0: Long, z0: Long, w0: Long): GVec4L = new IVec4L(x0, y0, z0, w0)
    def parse(str: String): GVec4L = IVec4L.parse(str)
    val zero: GVec4L = IVec4L.zero
    val xUnit: GVec4L = IVec4L.xUnit
    val yUnit: GVec4L = IVec4L.yUnit
    val zUnit: GVec4L = IVec4L.zUnit
    val wUnit: GVec4L = IVec4L.wUnit
  } // object GVec4L


  abstract class GVec4F extends Cloneable {
    def x: Float
    def y: Float
    def z: Float
    def w: Float
    override def toString = "["+x+", "+y+", "+z+", "+w+"]"
    override def hashCode = (((w.##)*16777619 ^ z.##)*16777619 ^ y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg4: GVec4S => {x==sg4.x && y==sg4.y && z==sg4.z && w==sg4.w }; case ig4: GVec4I => {x==ig4.x && y==ig4.y && z==ig4.z && w==ig4.w }; case lg4: GVec4L => {x==lg4.x && y==lg4.y && z==lg4.z && w==lg4.w }; case fg4: GVec4F => {x==fg4.x && y==fg4.y && z==fg4.z && w==fg4.w }; case dg4: GVec4D => {x==dg4.x && y==dg4.y && z==dg4.z && w==dg4.w }; case _ => false }
    override def clone(): GVec4F = new IVec4F(x, y, z, w)
    def toS: GVec4S = new IVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    def toI: GVec4I = new IVec4I(math.round(x), math.round(y), math.round(z), math.round(w))
    def mapI(fun: Float => Int) = new IVec4I(math.round(fun(x)), math.round(fun(y)), math.round(fun(z)), math.round(fun(w)))
    def toL: GVec4L = new IVec4L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble), math.round((w).toDouble))
    def mapL(fun: Float => Long) = new IVec4L(math.round((fun(x)).toDouble), math.round((fun(y)).toDouble), math.round((fun(z)).toDouble), math.round((fun(w)).toDouble))
    def copy(x0: Float = x, y0: Float = y, z0: Float = z, w0: Float = w): GVec4F = new IVec4F(x0, y0, z0, w0)
    def trim: GVec3F = new IVec3F(x, y, z)
    def mapF(fun: Float => Float) = new IVec4F(fun(x), fun(y), fun(z), fun(w))
    def toD: GVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def mapD(fun: Float => Double) = new IVec4D((fun(x)).toDouble, (fun(y)).toDouble, (fun(z)).toDouble, (fun(w)).toDouble)
    def imm = new IVec4F(x, y, z, w)
    def mut = new MVec4F(x, y, z, w)
    def lenSq = x*x + y*y + z*z + w*w
    final def len = (math.sqrt(lenSq)).toFloat
    def unary_-() = new IVec4F(-x, -y, -z, -w)
    def norm = { val k0 = 1/this.len; new IVec4F(x*k0, y*k0, z*k0, w*k0) }
    def +(x0: Long) = new IVec4D((x).toDouble + (x0).toDouble, (y).toDouble + (x0).toDouble, (z).toDouble + (x0).toDouble, (w).toDouble + (x0).toDouble)
    def +(x0: Float) = new IVec4F(x + x0, y + x0, z + x0, w + x0)
    def +(x0: Double) = new IVec4D((x).toDouble + x0, (y).toDouble + x0, (z).toDouble + x0, (w).toDouble + x0)
    def +(sg4: GVec4S) = new IVec4F(x + (sg4.x).toFloat, y + (sg4.y).toFloat, z + (sg4.z).toFloat, w + (sg4.w).toFloat)
    def +(ig4: GVec4I) = new IVec4F(x + (ig4.x).toFloat, y + (ig4.y).toFloat, z + (ig4.z).toFloat, w + (ig4.w).toFloat)
    def +(lg4: GVec4L) = new IVec4D((x).toDouble + (lg4.x).toDouble, (y).toDouble + (lg4.y).toDouble, (z).toDouble + (lg4.z).toDouble, (w).toDouble + (lg4.w).toDouble)
    def +(fg4: GVec4F) = new IVec4F(x + fg4.x, y + fg4.y, z + fg4.z, w + fg4.w)
    def +(x0: Float, y0: Float, z0: Float, w0: Float) = new IVec4F(x + x0, y + y0, z + z0, w + w0)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (y).toDouble + dg4.y, (z).toDouble + dg4.z, (w).toDouble + dg4.w)
    def -(x0: Long) = new IVec4D((x).toDouble - (x0).toDouble, (y).toDouble - (x0).toDouble, (z).toDouble - (x0).toDouble, (w).toDouble - (x0).toDouble)
    def -(x0: Float) = new IVec4F(x - x0, y - x0, z - x0, w - x0)
    def -(x0: Double) = new IVec4D((x).toDouble - x0, (y).toDouble - x0, (z).toDouble - x0, (w).toDouble - x0)
    def -(sg4: GVec4S) = new IVec4F(x - (sg4.x).toFloat, y - (sg4.y).toFloat, z - (sg4.z).toFloat, w - (sg4.w).toFloat)
    def -(ig4: GVec4I) = new IVec4F(x - (ig4.x).toFloat, y - (ig4.y).toFloat, z - (ig4.z).toFloat, w - (ig4.w).toFloat)
    def -(lg4: GVec4L) = new IVec4D((x).toDouble - (lg4.x).toDouble, (y).toDouble - (lg4.y).toDouble, (z).toDouble - (lg4.z).toDouble, (w).toDouble - (lg4.w).toDouble)
    def -(fg4: GVec4F) = new IVec4F(x - fg4.x, y - fg4.y, z - fg4.z, w - fg4.w)
    def -(x0: Float, y0: Float, z0: Float, w0: Float) = new IVec4F(x - x0, y - y0, z - z0, w - w0)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (y).toDouble - dg4.y, (z).toDouble - dg4.z, (w).toDouble - dg4.w)
    def *(x0: Long) = new IVec4D((x).toDouble * (x0).toDouble, (y).toDouble * (x0).toDouble, (z).toDouble * (x0).toDouble, (w).toDouble * (x0).toDouble)
    def *(x0: Float) = new IVec4F(x * x0, y * x0, z * x0, w * x0)
    def *(x0: Double) = new IVec4D((x).toDouble * x0, (y).toDouble * x0, (z).toDouble * x0, (w).toDouble * x0)
    def *(sg4: GVec4S) = new IVec4F(x * (sg4.x).toFloat, y * (sg4.y).toFloat, z * (sg4.z).toFloat, w * (sg4.w).toFloat)
    def *(ig4: GVec4I) = new IVec4F(x * (ig4.x).toFloat, y * (ig4.y).toFloat, z * (ig4.z).toFloat, w * (ig4.w).toFloat)
    def *(lg4: GVec4L) = new IVec4D((x).toDouble * (lg4.x).toDouble, (y).toDouble * (lg4.y).toDouble, (z).toDouble * (lg4.z).toDouble, (w).toDouble * (lg4.w).toDouble)
    def *(fg4: GVec4F) = new IVec4F(x * fg4.x, y * fg4.y, z * fg4.z, w * fg4.w)
    def *(x0: Float, y0: Float, z0: Float, w0: Float) = new IVec4F(x * x0, y * y0, z * z0, w * w0)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (y).toDouble * dg4.y, (z).toDouble * dg4.z, (w).toDouble * dg4.w)
    def /(x0: Long) = new IVec4D((x).toDouble / (x0).toDouble, (y).toDouble / (x0).toDouble, (z).toDouble / (x0).toDouble, (w).toDouble / (x0).toDouble)
    def /(x0: Float) = new IVec4F(x / x0, y / x0, z / x0, w / x0)
    def /(x0: Double) = new IVec4D((x).toDouble / x0, (y).toDouble / x0, (z).toDouble / x0, (w).toDouble / x0)
    def /(sg4: GVec4S) = new IVec4F(x / (sg4.x).toFloat, y / (sg4.y).toFloat, z / (sg4.z).toFloat, w / (sg4.w).toFloat)
    def /(ig4: GVec4I) = new IVec4F(x / (ig4.x).toFloat, y / (ig4.y).toFloat, z / (ig4.z).toFloat, w / (ig4.w).toFloat)
    def /(lg4: GVec4L) = new IVec4D((x).toDouble / (lg4.x).toDouble, (y).toDouble / (lg4.y).toDouble, (z).toDouble / (lg4.z).toDouble, (w).toDouble / (lg4.w).toDouble)
    def /(fg4: GVec4F) = new IVec4F(x / fg4.x, y / fg4.y, z / fg4.z, w / fg4.w)
    def /(x0: Float, y0: Float, z0: Float, w0: Float) = new IVec4F(x / x0, y / y0, z / z0, w / w0)
    def /(dg4: GVec4D) = new IVec4D((x).toDouble / dg4.x, (y).toDouble / dg4.y, (z).toDouble / dg4.z, (w).toDouble / dg4.w)
    def max(x0: Long) = new IVec4D(math.max((x).toDouble,(x0).toDouble), math.max((y).toDouble,(x0).toDouble), math.max((z).toDouble,(x0).toDouble), math.max((w).toDouble,(x0).toDouble))
    def max(x0: Float) = new IVec4F(math.max(x,x0), math.max(y,x0), math.max(z,x0), math.max(w,x0))
    def max(x0: Double) = new IVec4D(math.max((x).toDouble,x0), math.max((y).toDouble,x0), math.max((z).toDouble,x0), math.max((w).toDouble,x0))
    def max(sg4: GVec4S) = new IVec4F(math.max(x,(sg4.x).toFloat), math.max(y,(sg4.y).toFloat), math.max(z,(sg4.z).toFloat), math.max(w,(sg4.w).toFloat))
    def max(ig4: GVec4I) = new IVec4F(math.max(x,(ig4.x).toFloat), math.max(y,(ig4.y).toFloat), math.max(z,(ig4.z).toFloat), math.max(w,(ig4.w).toFloat))
    def max(lg4: GVec4L) = new IVec4D(math.max((x).toDouble,(lg4.x).toDouble), math.max((y).toDouble,(lg4.y).toDouble), math.max((z).toDouble,(lg4.z).toDouble), math.max((w).toDouble,(lg4.w).toDouble))
    def max(fg4: GVec4F) = new IVec4F(math.max(x,fg4.x), math.max(y,fg4.y), math.max(z,fg4.z), math.max(w,fg4.w))
    def max(x0: Float, y0: Float, z0: Float, w0: Float) = new IVec4F(math.max(x,x0), math.max(y,y0), math.max(z,z0), math.max(w,w0))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((y).toDouble,dg4.y), math.max((z).toDouble,dg4.z), math.max((w).toDouble,dg4.w))
    def min(x0: Long) = new IVec4D(math.min((x).toDouble,(x0).toDouble), math.min((y).toDouble,(x0).toDouble), math.min((z).toDouble,(x0).toDouble), math.min((w).toDouble,(x0).toDouble))
    def min(x0: Float) = new IVec4F(math.min(x,x0), math.min(y,x0), math.min(z,x0), math.min(w,x0))
    def min(x0: Double) = new IVec4D(math.min((x).toDouble,x0), math.min((y).toDouble,x0), math.min((z).toDouble,x0), math.min((w).toDouble,x0))
    def min(sg4: GVec4S) = new IVec4F(math.min(x,(sg4.x).toFloat), math.min(y,(sg4.y).toFloat), math.min(z,(sg4.z).toFloat), math.min(w,(sg4.w).toFloat))
    def min(ig4: GVec4I) = new IVec4F(math.min(x,(ig4.x).toFloat), math.min(y,(ig4.y).toFloat), math.min(z,(ig4.z).toFloat), math.min(w,(ig4.w).toFloat))
    def min(lg4: GVec4L) = new IVec4D(math.min((x).toDouble,(lg4.x).toDouble), math.min((y).toDouble,(lg4.y).toDouble), math.min((z).toDouble,(lg4.z).toDouble), math.min((w).toDouble,(lg4.w).toDouble))
    def min(fg4: GVec4F) = new IVec4F(math.min(x,fg4.x), math.min(y,fg4.y), math.min(z,fg4.z), math.min(w,fg4.w))
    def min(x0: Float, y0: Float, z0: Float, w0: Float) = new IVec4F(math.min(x,x0), math.min(y,y0), math.min(z,z0), math.min(w,w0))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((y).toDouble,dg4.y), math.min((z).toDouble,dg4.z), math.min((w).toDouble,dg4.w))
    def operate(sg4: GVec4S)(fun: (Float,Float)=>Float) = new IVec4F(fun(x,(sg4.x).toFloat), fun(y,(sg4.y).toFloat), fun(z,(sg4.z).toFloat), fun(w,(sg4.w).toFloat))
    def operate(ig4: GVec4I)(fun: (Float,Float)=>Float) = new IVec4F(fun(x,(ig4.x).toFloat), fun(y,(ig4.y).toFloat), fun(z,(ig4.z).toFloat), fun(w,(ig4.w).toFloat))
    def operate(lg4: GVec4L)(fun: (Double,Double)=>Double) = new IVec4D(fun((x).toDouble,(lg4.x).toDouble), fun((y).toDouble,(lg4.y).toDouble), fun((z).toDouble,(lg4.z).toDouble), fun((w).toDouble,(lg4.w).toDouble))
    def operate(fg4: GVec4F)(fun: (Float,Float)=>Float) = new IVec4F(fun(x,fg4.x), fun(y,fg4.y), fun(z,fg4.z), fun(w,fg4.w))
    def operate(dg4: GVec4D)(fun: (Double,Double)=>Double) = new IVec4D(fun((x).toDouble,dg4.x), fun((y).toDouble,dg4.y), fun((z).toDouble,dg4.z), fun((w).toDouble,dg4.w))
    def dot(sg4: GVec4S) = x*(sg4.x).toFloat + y*(sg4.y).toFloat + z*(sg4.z).toFloat + w*(sg4.w).toFloat
    def dot(ig4: GVec4I) = x*(ig4.x).toFloat + y*(ig4.y).toFloat + z*(ig4.z).toFloat + w*(ig4.w).toFloat
    def dot(lg4: GVec4L) = (x).toDouble*(lg4.x).toDouble + (y).toDouble*(lg4.y).toDouble + (z).toDouble*(lg4.z).toDouble + (w).toDouble*(lg4.w).toDouble
    def dot(fg4: GVec4F) = x*fg4.x + y*fg4.y + z*fg4.z + w*fg4.w
    def dot(dg4: GVec4D) = (x).toDouble*dg4.x + (y).toDouble*dg4.y + (z).toDouble*dg4.z + (w).toDouble*dg4.w
    final def **(sg4: GVec4S): Float = this.dot(sg4)
    final def **(ig4: GVec4I): Float = this.dot(ig4)
    final def **(lg4: GVec4L): Double = this.dot(lg4)
    final def **(fg4: GVec4F): Float = this.dot(fg4)
    final def **(dg4: GVec4D): Double = this.dot(dg4)
    def dot(x0: Float, y0: Float, z0: Float, w0: Float) = x*x0 + y*y0 + z*z0 + w*w0
    final def **(x0: Float, y0: Float, z0: Float, w0: Float): Float = this.dot(x0, y0, z0, w0)
    final def unitDot(sg4: GVec4S): Float = (this.dot(sg4) / math.sqrt(lenSq * sg4.lenSq)).toFloat
    final def unitDot(ig4: GVec4I): Float = (this.dot(ig4) / math.sqrt(lenSq * ig4.lenSq)).toFloat
    final def unitDot(lg4: GVec4L): Double = this.dot(lg4) / math.sqrt(lenSq * lg4.lenSq)
    final def unitDot(fg4: GVec4F): Float = (this.dot(fg4) / math.sqrt(lenSq * fg4.lenSq)).toFloat
    final def unitDot(dg4: GVec4D): Double = this.dot(dg4) / math.sqrt(lenSq * dg4.lenSq)
    final def *^*(sg4: GVec4S): Float = this.unitDot(sg4)
    final def *^*(ig4: GVec4I): Float = this.unitDot(ig4)
    final def *^*(lg4: GVec4L): Double = this.unitDot(lg4)
    final def *^*(fg4: GVec4F): Float = this.unitDot(fg4)
    final def *^*(dg4: GVec4D): Double = this.unitDot(dg4)
    def fold(zero: Int)(fun: (Int,Float)=>Int) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Long)(fun: (Long,Float)=>Long) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Float)(fun: (Float,Float)=>Float) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Double)(fun: (Double,Float)=>Double) = fun(fun(fun(fun(zero,x),y),z),w)
    def reduce(fun: (Float,Float)=>Float) = fun(fun(fun(x,y),z),w)
    def distSq(sg4: GVec4S) = (x-(sg4.x).toFloat)*(x-(sg4.x).toFloat) + (y-(sg4.y).toFloat)*(y-(sg4.y).toFloat) + (z-(sg4.z).toFloat)*(z-(sg4.z).toFloat) + (w-(sg4.w).toFloat)*(w-(sg4.w).toFloat)
    def distSq(ig4: GVec4I) = (x-(ig4.x).toFloat)*(x-(ig4.x).toFloat) + (y-(ig4.y).toFloat)*(y-(ig4.y).toFloat) + (z-(ig4.z).toFloat)*(z-(ig4.z).toFloat) + (w-(ig4.w).toFloat)*(w-(ig4.w).toFloat)
    def distSq(lg4: GVec4L) = ((x).toDouble-(lg4.x).toDouble)*((x).toDouble-(lg4.x).toDouble) + ((y).toDouble-(lg4.y).toDouble)*((y).toDouble-(lg4.y).toDouble) + ((z).toDouble-(lg4.z).toDouble)*((z).toDouble-(lg4.z).toDouble) + ((w).toDouble-(lg4.w).toDouble)*((w).toDouble-(lg4.w).toDouble)
    def distSq(fg4: GVec4F) = (x-fg4.x)*(x-fg4.x) + (y-fg4.y)*(y-fg4.y) + (z-fg4.z)*(z-fg4.z) + (w-fg4.w)*(w-fg4.w)
    def distSq(dg4: GVec4D) = ((x).toDouble-dg4.x)*((x).toDouble-dg4.x) + ((y).toDouble-dg4.y)*((y).toDouble-dg4.y) + ((z).toDouble-dg4.z)*((z).toDouble-dg4.z) + ((w).toDouble-dg4.w)*((w).toDouble-dg4.w)
    final def dist(sg4: GVec4S): Float = (math.sqrt(this.distSq(sg4))).toFloat
    final def dist(ig4: GVec4I): Float = (math.sqrt(this.distSq(ig4))).toFloat
    final def dist(lg4: GVec4L): Double = math.sqrt(this.distSq(lg4))
    final def dist(fg4: GVec4F): Float = (math.sqrt(this.distSq(fg4))).toFloat
    final def dist(dg4: GVec4D): Double = math.sqrt(this.distSq(dg4))
    def distSq(x0: Float, y0: Float, z0: Float, w0: Float) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0) + (w-w0)*(w-w0)
    final def dist(x0: Float, y0: Float, z0: Float, w0: Float): Float = (math.sqrt(this.distSq(x0, y0, z0, w0))).toFloat
    def ===(fg4: GVec4F) = x==fg4.x && y==fg4.y && z==fg4.z && w==fg4.w
    def ===(x0: Float, y0: Float, z0: Float, w0: Float) = x==x0 && y==y0 && z==z0 && w==w0
    def approx(fg4: GVec4F, eps: Float) = ScalarF.close(x,fg4.x,eps) && ScalarF.close(y,fg4.y,eps) && ScalarF.close(z,fg4.z,eps) && ScalarF.close(w,fg4.w,eps)
    def approx(dg4: GVec4D, eps: Double) = ScalarD.close(x,dg4.x,eps) && ScalarD.close(y,dg4.y,eps) && ScalarD.close(z,dg4.z,eps) && ScalarD.close(w,dg4.w,eps)
    final def =~=(fg4: GVec4F) = approx(fg4, 1e-10f)
    final def =~=(dg4: GVec4D) = approx(dg4, 1e-10)
    def approx(x0: Float, y0: Float, z0: Float, w0: Float, eps: Float) = ScalarF.close(x,x0,eps) && ScalarF.close(y,y0,eps) && ScalarF.close(z,z0,eps) && ScalarF.close(w,w0,eps)
    def **(sg44: GMat4S) = new IVec4F(x*(sg44.xx).toFloat+y*(sg44.yx).toFloat+z*(sg44.zx).toFloat+w*(sg44.wx).toFloat, x*(sg44.xy).toFloat+y*(sg44.yy).toFloat+z*(sg44.zy).toFloat+w*(sg44.wy).toFloat, x*(sg44.xz).toFloat+y*(sg44.yz).toFloat+z*(sg44.zz).toFloat+w*(sg44.wz).toFloat, x*(sg44.xw).toFloat+y*(sg44.yw).toFloat+z*(sg44.zw).toFloat+w*(sg44.ww).toFloat)
    def **(ig44: GMat4I) = new IVec4F(x*(ig44.xx).toFloat+y*(ig44.yx).toFloat+z*(ig44.zx).toFloat+w*(ig44.wx).toFloat, x*(ig44.xy).toFloat+y*(ig44.yy).toFloat+z*(ig44.zy).toFloat+w*(ig44.wy).toFloat, x*(ig44.xz).toFloat+y*(ig44.yz).toFloat+z*(ig44.zz).toFloat+w*(ig44.wz).toFloat, x*(ig44.xw).toFloat+y*(ig44.yw).toFloat+z*(ig44.zw).toFloat+w*(ig44.ww).toFloat)
    def **(lg44: GMat4L) = new IVec4D((x).toDouble*(lg44.xx).toDouble+(y).toDouble*(lg44.yx).toDouble+(z).toDouble*(lg44.zx).toDouble+(w).toDouble*(lg44.wx).toDouble, (x).toDouble*(lg44.xy).toDouble+(y).toDouble*(lg44.yy).toDouble+(z).toDouble*(lg44.zy).toDouble+(w).toDouble*(lg44.wy).toDouble, (x).toDouble*(lg44.xz).toDouble+(y).toDouble*(lg44.yz).toDouble+(z).toDouble*(lg44.zz).toDouble+(w).toDouble*(lg44.wz).toDouble, (x).toDouble*(lg44.xw).toDouble+(y).toDouble*(lg44.yw).toDouble+(z).toDouble*(lg44.zw).toDouble+(w).toDouble*(lg44.ww).toDouble)
    def **(fg44: GMat4F) = new IVec4F(x*fg44.xx+y*fg44.yx+z*fg44.zx+w*fg44.wx, x*fg44.xy+y*fg44.yy+z*fg44.zy+w*fg44.wy, x*fg44.xz+y*fg44.yz+z*fg44.zz+w*fg44.wz, x*fg44.xw+y*fg44.yw+z*fg44.zw+w*fg44.ww)
    def **(dg44: GMat4D) = new IVec4D((x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx, (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy, (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz, (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww)
  } // class GVec4F

  object GVec4F {
    def apply(x0: Float, y0: Float, z0: Float, w0: Float): GVec4F = new IVec4F(x0, y0, z0, w0)
    def parse(str: String): GVec4F = IVec4F.parse(str)
    val zero: GVec4F = IVec4F.zero
    val xUnit: GVec4F = IVec4F.xUnit
    val yUnit: GVec4F = IVec4F.yUnit
    val zUnit: GVec4F = IVec4F.zUnit
    val wUnit: GVec4F = IVec4F.wUnit
  } // object GVec4F


  abstract class GVec4D extends Cloneable {
    def x: Double
    def y: Double
    def z: Double
    def w: Double
    override def toString = "["+x+", "+y+", "+z+", "+w+"]"
    override def hashCode = (((w.##)*16777619 ^ z.##)*16777619 ^ y.##)*16777619 ^ x.##
    override def equals(any: Any) = any match { case sg4: GVec4S => {x==sg4.x && y==sg4.y && z==sg4.z && w==sg4.w }; case ig4: GVec4I => {x==ig4.x && y==ig4.y && z==ig4.z && w==ig4.w }; case lg4: GVec4L => {x==lg4.x && y==lg4.y && z==lg4.z && w==lg4.w }; case fg4: GVec4F => {x==fg4.x && y==fg4.y && z==fg4.z && w==fg4.w }; case dg4: GVec4D => {x==dg4.x && y==dg4.y && z==dg4.z && w==dg4.w }; case _ => false }
    override def clone(): GVec4D = new IVec4D(x, y, z, w)
    def toS: GVec4S = new IVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    def toI: GVec4I = new IVec4I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt, (math.round(w)).toInt)
    def mapI(fun: Double => Int) = new IVec4I((math.round(fun(x))).toInt, (math.round(fun(y))).toInt, (math.round(fun(z))).toInt, (math.round(fun(w))).toInt)
    def toL: GVec4L = new IVec4L(math.round(x), math.round(y), math.round(z), math.round(w))
    def mapL(fun: Double => Long) = new IVec4L(math.round(fun(x)), math.round(fun(y)), math.round(fun(z)), math.round(fun(w)))
    def toF: GVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    def mapF(fun: Double => Float) = new IVec4F((fun(x)).toFloat, (fun(y)).toFloat, (fun(z)).toFloat, (fun(w)).toFloat)
    def copy(x0: Double = x, y0: Double = y, z0: Double = z, w0: Double = w): GVec4D = new IVec4D(x0, y0, z0, w0)
    def trim: GVec3D = new IVec3D(x, y, z)
    def mapD(fun: Double => Double) = new IVec4D(fun(x), fun(y), fun(z), fun(w))
    def imm = new IVec4D(x, y, z, w)
    def mut = new MVec4D(x, y, z, w)
    def lenSq = x*x + y*y + z*z + w*w
    final def len = math.sqrt(lenSq)
    def unary_-() = new IVec4D(-x, -y, -z, -w)
    def norm = { val k0 = 1/this.len; new IVec4D(x*k0, y*k0, z*k0, w*k0) }
    def +(x0: Double) = new IVec4D(x + x0, y + x0, z + x0, w + x0)
    def +(sg4: GVec4S) = new IVec4D(x + (sg4.x).toDouble, y + (sg4.y).toDouble, z + (sg4.z).toDouble, w + (sg4.w).toDouble)
    def +(ig4: GVec4I) = new IVec4D(x + (ig4.x).toDouble, y + (ig4.y).toDouble, z + (ig4.z).toDouble, w + (ig4.w).toDouble)
    def +(lg4: GVec4L) = new IVec4D(x + (lg4.x).toDouble, y + (lg4.y).toDouble, z + (lg4.z).toDouble, w + (lg4.w).toDouble)
    def +(fg4: GVec4F) = new IVec4D(x + (fg4.x).toDouble, y + (fg4.y).toDouble, z + (fg4.z).toDouble, w + (fg4.w).toDouble)
    def +(dg4: GVec4D) = new IVec4D(x + dg4.x, y + dg4.y, z + dg4.z, w + dg4.w)
    def +(x0: Double, y0: Double, z0: Double, w0: Double) = new IVec4D(x + x0, y + y0, z + z0, w + w0)
    def -(x0: Double) = new IVec4D(x - x0, y - x0, z - x0, w - x0)
    def -(sg4: GVec4S) = new IVec4D(x - (sg4.x).toDouble, y - (sg4.y).toDouble, z - (sg4.z).toDouble, w - (sg4.w).toDouble)
    def -(ig4: GVec4I) = new IVec4D(x - (ig4.x).toDouble, y - (ig4.y).toDouble, z - (ig4.z).toDouble, w - (ig4.w).toDouble)
    def -(lg4: GVec4L) = new IVec4D(x - (lg4.x).toDouble, y - (lg4.y).toDouble, z - (lg4.z).toDouble, w - (lg4.w).toDouble)
    def -(fg4: GVec4F) = new IVec4D(x - (fg4.x).toDouble, y - (fg4.y).toDouble, z - (fg4.z).toDouble, w - (fg4.w).toDouble)
    def -(dg4: GVec4D) = new IVec4D(x - dg4.x, y - dg4.y, z - dg4.z, w - dg4.w)
    def -(x0: Double, y0: Double, z0: Double, w0: Double) = new IVec4D(x - x0, y - y0, z - z0, w - w0)
    def *(x0: Double) = new IVec4D(x * x0, y * x0, z * x0, w * x0)
    def *(sg4: GVec4S) = new IVec4D(x * (sg4.x).toDouble, y * (sg4.y).toDouble, z * (sg4.z).toDouble, w * (sg4.w).toDouble)
    def *(ig4: GVec4I) = new IVec4D(x * (ig4.x).toDouble, y * (ig4.y).toDouble, z * (ig4.z).toDouble, w * (ig4.w).toDouble)
    def *(lg4: GVec4L) = new IVec4D(x * (lg4.x).toDouble, y * (lg4.y).toDouble, z * (lg4.z).toDouble, w * (lg4.w).toDouble)
    def *(fg4: GVec4F) = new IVec4D(x * (fg4.x).toDouble, y * (fg4.y).toDouble, z * (fg4.z).toDouble, w * (fg4.w).toDouble)
    def *(dg4: GVec4D) = new IVec4D(x * dg4.x, y * dg4.y, z * dg4.z, w * dg4.w)
    def *(x0: Double, y0: Double, z0: Double, w0: Double) = new IVec4D(x * x0, y * y0, z * z0, w * w0)
    def /(x0: Double) = new IVec4D(x / x0, y / x0, z / x0, w / x0)
    def /(sg4: GVec4S) = new IVec4D(x / (sg4.x).toDouble, y / (sg4.y).toDouble, z / (sg4.z).toDouble, w / (sg4.w).toDouble)
    def /(ig4: GVec4I) = new IVec4D(x / (ig4.x).toDouble, y / (ig4.y).toDouble, z / (ig4.z).toDouble, w / (ig4.w).toDouble)
    def /(lg4: GVec4L) = new IVec4D(x / (lg4.x).toDouble, y / (lg4.y).toDouble, z / (lg4.z).toDouble, w / (lg4.w).toDouble)
    def /(fg4: GVec4F) = new IVec4D(x / (fg4.x).toDouble, y / (fg4.y).toDouble, z / (fg4.z).toDouble, w / (fg4.w).toDouble)
    def /(dg4: GVec4D) = new IVec4D(x / dg4.x, y / dg4.y, z / dg4.z, w / dg4.w)
    def /(x0: Double, y0: Double, z0: Double, w0: Double) = new IVec4D(x / x0, y / y0, z / z0, w / w0)
    def max(x0: Double) = new IVec4D(math.max(x,x0), math.max(y,x0), math.max(z,x0), math.max(w,x0))
    def max(sg4: GVec4S) = new IVec4D(math.max(x,(sg4.x).toDouble), math.max(y,(sg4.y).toDouble), math.max(z,(sg4.z).toDouble), math.max(w,(sg4.w).toDouble))
    def max(ig4: GVec4I) = new IVec4D(math.max(x,(ig4.x).toDouble), math.max(y,(ig4.y).toDouble), math.max(z,(ig4.z).toDouble), math.max(w,(ig4.w).toDouble))
    def max(lg4: GVec4L) = new IVec4D(math.max(x,(lg4.x).toDouble), math.max(y,(lg4.y).toDouble), math.max(z,(lg4.z).toDouble), math.max(w,(lg4.w).toDouble))
    def max(fg4: GVec4F) = new IVec4D(math.max(x,(fg4.x).toDouble), math.max(y,(fg4.y).toDouble), math.max(z,(fg4.z).toDouble), math.max(w,(fg4.w).toDouble))
    def max(dg4: GVec4D) = new IVec4D(math.max(x,dg4.x), math.max(y,dg4.y), math.max(z,dg4.z), math.max(w,dg4.w))
    def max(x0: Double, y0: Double, z0: Double, w0: Double) = new IVec4D(math.max(x,x0), math.max(y,y0), math.max(z,z0), math.max(w,w0))
    def min(x0: Double) = new IVec4D(math.min(x,x0), math.min(y,x0), math.min(z,x0), math.min(w,x0))
    def min(sg4: GVec4S) = new IVec4D(math.min(x,(sg4.x).toDouble), math.min(y,(sg4.y).toDouble), math.min(z,(sg4.z).toDouble), math.min(w,(sg4.w).toDouble))
    def min(ig4: GVec4I) = new IVec4D(math.min(x,(ig4.x).toDouble), math.min(y,(ig4.y).toDouble), math.min(z,(ig4.z).toDouble), math.min(w,(ig4.w).toDouble))
    def min(lg4: GVec4L) = new IVec4D(math.min(x,(lg4.x).toDouble), math.min(y,(lg4.y).toDouble), math.min(z,(lg4.z).toDouble), math.min(w,(lg4.w).toDouble))
    def min(fg4: GVec4F) = new IVec4D(math.min(x,(fg4.x).toDouble), math.min(y,(fg4.y).toDouble), math.min(z,(fg4.z).toDouble), math.min(w,(fg4.w).toDouble))
    def min(dg4: GVec4D) = new IVec4D(math.min(x,dg4.x), math.min(y,dg4.y), math.min(z,dg4.z), math.min(w,dg4.w))
    def min(x0: Double, y0: Double, z0: Double, w0: Double) = new IVec4D(math.min(x,x0), math.min(y,y0), math.min(z,z0), math.min(w,w0))
    def operate(sg4: GVec4S)(fun: (Double,Double)=>Double) = new IVec4D(fun(x,(sg4.x).toDouble), fun(y,(sg4.y).toDouble), fun(z,(sg4.z).toDouble), fun(w,(sg4.w).toDouble))
    def operate(ig4: GVec4I)(fun: (Double,Double)=>Double) = new IVec4D(fun(x,(ig4.x).toDouble), fun(y,(ig4.y).toDouble), fun(z,(ig4.z).toDouble), fun(w,(ig4.w).toDouble))
    def operate(lg4: GVec4L)(fun: (Double,Double)=>Double) = new IVec4D(fun(x,(lg4.x).toDouble), fun(y,(lg4.y).toDouble), fun(z,(lg4.z).toDouble), fun(w,(lg4.w).toDouble))
    def operate(fg4: GVec4F)(fun: (Double,Double)=>Double) = new IVec4D(fun(x,(fg4.x).toDouble), fun(y,(fg4.y).toDouble), fun(z,(fg4.z).toDouble), fun(w,(fg4.w).toDouble))
    def operate(dg4: GVec4D)(fun: (Double,Double)=>Double) = new IVec4D(fun(x,dg4.x), fun(y,dg4.y), fun(z,dg4.z), fun(w,dg4.w))
    def dot(sg4: GVec4S) = x*(sg4.x).toDouble + y*(sg4.y).toDouble + z*(sg4.z).toDouble + w*(sg4.w).toDouble
    def dot(ig4: GVec4I) = x*(ig4.x).toDouble + y*(ig4.y).toDouble + z*(ig4.z).toDouble + w*(ig4.w).toDouble
    def dot(lg4: GVec4L) = x*(lg4.x).toDouble + y*(lg4.y).toDouble + z*(lg4.z).toDouble + w*(lg4.w).toDouble
    def dot(fg4: GVec4F) = x*(fg4.x).toDouble + y*(fg4.y).toDouble + z*(fg4.z).toDouble + w*(fg4.w).toDouble
    def dot(dg4: GVec4D) = x*dg4.x + y*dg4.y + z*dg4.z + w*dg4.w
    final def **(sg4: GVec4S): Double = this.dot(sg4)
    final def **(ig4: GVec4I): Double = this.dot(ig4)
    final def **(lg4: GVec4L): Double = this.dot(lg4)
    final def **(fg4: GVec4F): Double = this.dot(fg4)
    final def **(dg4: GVec4D): Double = this.dot(dg4)
    def dot(x0: Double, y0: Double, z0: Double, w0: Double) = x*x0 + y*y0 + z*z0 + w*w0
    final def **(x0: Double, y0: Double, z0: Double, w0: Double): Double = this.dot(x0, y0, z0, w0)
    final def unitDot(sg4: GVec4S): Double = this.dot(sg4) / math.sqrt(lenSq * sg4.lenSq)
    final def unitDot(ig4: GVec4I): Double = this.dot(ig4) / math.sqrt(lenSq * ig4.lenSq)
    final def unitDot(lg4: GVec4L): Double = this.dot(lg4) / math.sqrt(lenSq * lg4.lenSq)
    final def unitDot(fg4: GVec4F): Double = this.dot(fg4) / math.sqrt(lenSq * fg4.lenSq)
    final def unitDot(dg4: GVec4D): Double = this.dot(dg4) / math.sqrt(lenSq * dg4.lenSq)
    final def *^*(sg4: GVec4S): Double = this.unitDot(sg4)
    final def *^*(ig4: GVec4I): Double = this.unitDot(ig4)
    final def *^*(lg4: GVec4L): Double = this.unitDot(lg4)
    final def *^*(fg4: GVec4F): Double = this.unitDot(fg4)
    final def *^*(dg4: GVec4D): Double = this.unitDot(dg4)
    def fold(zero: Int)(fun: (Int,Double)=>Int) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Long)(fun: (Long,Double)=>Long) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Float)(fun: (Float,Double)=>Float) = fun(fun(fun(fun(zero,x),y),z),w)
    def fold(zero: Double)(fun: (Double,Double)=>Double) = fun(fun(fun(fun(zero,x),y),z),w)
    def reduce(fun: (Double,Double)=>Double) = fun(fun(fun(x,y),z),w)
    def distSq(sg4: GVec4S) = (x-(sg4.x).toDouble)*(x-(sg4.x).toDouble) + (y-(sg4.y).toDouble)*(y-(sg4.y).toDouble) + (z-(sg4.z).toDouble)*(z-(sg4.z).toDouble) + (w-(sg4.w).toDouble)*(w-(sg4.w).toDouble)
    def distSq(ig4: GVec4I) = (x-(ig4.x).toDouble)*(x-(ig4.x).toDouble) + (y-(ig4.y).toDouble)*(y-(ig4.y).toDouble) + (z-(ig4.z).toDouble)*(z-(ig4.z).toDouble) + (w-(ig4.w).toDouble)*(w-(ig4.w).toDouble)
    def distSq(lg4: GVec4L) = (x-(lg4.x).toDouble)*(x-(lg4.x).toDouble) + (y-(lg4.y).toDouble)*(y-(lg4.y).toDouble) + (z-(lg4.z).toDouble)*(z-(lg4.z).toDouble) + (w-(lg4.w).toDouble)*(w-(lg4.w).toDouble)
    def distSq(fg4: GVec4F) = (x-(fg4.x).toDouble)*(x-(fg4.x).toDouble) + (y-(fg4.y).toDouble)*(y-(fg4.y).toDouble) + (z-(fg4.z).toDouble)*(z-(fg4.z).toDouble) + (w-(fg4.w).toDouble)*(w-(fg4.w).toDouble)
    def distSq(dg4: GVec4D) = (x-dg4.x)*(x-dg4.x) + (y-dg4.y)*(y-dg4.y) + (z-dg4.z)*(z-dg4.z) + (w-dg4.w)*(w-dg4.w)
    final def dist(sg4: GVec4S): Double = math.sqrt(this.distSq(sg4))
    final def dist(ig4: GVec4I): Double = math.sqrt(this.distSq(ig4))
    final def dist(lg4: GVec4L): Double = math.sqrt(this.distSq(lg4))
    final def dist(fg4: GVec4F): Double = math.sqrt(this.distSq(fg4))
    final def dist(dg4: GVec4D): Double = math.sqrt(this.distSq(dg4))
    def distSq(x0: Double, y0: Double, z0: Double, w0: Double) = (x-x0)*(x-x0) + (y-y0)*(y-y0) + (z-z0)*(z-z0) + (w-w0)*(w-w0)
    final def dist(x0: Double, y0: Double, z0: Double, w0: Double): Double = math.sqrt(this.distSq(x0, y0, z0, w0))
    def ===(dg4: GVec4D) = x==dg4.x && y==dg4.y && z==dg4.z && w==dg4.w
    def ===(x0: Double, y0: Double, z0: Double, w0: Double) = x==x0 && y==y0 && z==z0 && w==w0
    def approx(fg4: GVec4F, eps: Double) = ScalarD.close(x,(fg4.x).toDouble,eps) && ScalarD.close(y,(fg4.y).toDouble,eps) && ScalarD.close(z,(fg4.z).toDouble,eps) && ScalarD.close(w,(fg4.w).toDouble,eps)
    def approx(dg4: GVec4D, eps: Double) = ScalarD.close(x,dg4.x,eps) && ScalarD.close(y,dg4.y,eps) && ScalarD.close(z,dg4.z,eps) && ScalarD.close(w,dg4.w,eps)
    final def =~=(fg4: GVec4F) = approx(fg4, 1e-10)
    final def =~=(dg4: GVec4D) = approx(dg4, 1e-20)
    def approx(x0: Double, y0: Double, z0: Double, w0: Double, eps: Double) = ScalarD.close(x,x0,eps) && ScalarD.close(y,y0,eps) && ScalarD.close(z,z0,eps) && ScalarD.close(w,w0,eps)
    def **(sg44: GMat4S) = new IVec4D(x*(sg44.xx).toDouble+y*(sg44.yx).toDouble+z*(sg44.zx).toDouble+w*(sg44.wx).toDouble, x*(sg44.xy).toDouble+y*(sg44.yy).toDouble+z*(sg44.zy).toDouble+w*(sg44.wy).toDouble, x*(sg44.xz).toDouble+y*(sg44.yz).toDouble+z*(sg44.zz).toDouble+w*(sg44.wz).toDouble, x*(sg44.xw).toDouble+y*(sg44.yw).toDouble+z*(sg44.zw).toDouble+w*(sg44.ww).toDouble)
    def **(ig44: GMat4I) = new IVec4D(x*(ig44.xx).toDouble+y*(ig44.yx).toDouble+z*(ig44.zx).toDouble+w*(ig44.wx).toDouble, x*(ig44.xy).toDouble+y*(ig44.yy).toDouble+z*(ig44.zy).toDouble+w*(ig44.wy).toDouble, x*(ig44.xz).toDouble+y*(ig44.yz).toDouble+z*(ig44.zz).toDouble+w*(ig44.wz).toDouble, x*(ig44.xw).toDouble+y*(ig44.yw).toDouble+z*(ig44.zw).toDouble+w*(ig44.ww).toDouble)
    def **(lg44: GMat4L) = new IVec4D(x*(lg44.xx).toDouble+y*(lg44.yx).toDouble+z*(lg44.zx).toDouble+w*(lg44.wx).toDouble, x*(lg44.xy).toDouble+y*(lg44.yy).toDouble+z*(lg44.zy).toDouble+w*(lg44.wy).toDouble, x*(lg44.xz).toDouble+y*(lg44.yz).toDouble+z*(lg44.zz).toDouble+w*(lg44.wz).toDouble, x*(lg44.xw).toDouble+y*(lg44.yw).toDouble+z*(lg44.zw).toDouble+w*(lg44.ww).toDouble)
    def **(fg44: GMat4F) = new IVec4D(x*(fg44.xx).toDouble+y*(fg44.yx).toDouble+z*(fg44.zx).toDouble+w*(fg44.wx).toDouble, x*(fg44.xy).toDouble+y*(fg44.yy).toDouble+z*(fg44.zy).toDouble+w*(fg44.wy).toDouble, x*(fg44.xz).toDouble+y*(fg44.yz).toDouble+z*(fg44.zz).toDouble+w*(fg44.wz).toDouble, x*(fg44.xw).toDouble+y*(fg44.yw).toDouble+z*(fg44.zw).toDouble+w*(fg44.ww).toDouble)
    def **(dg44: GMat4D) = new IVec4D(x*dg44.xx+y*dg44.yx+z*dg44.zx+w*dg44.wx, x*dg44.xy+y*dg44.yy+z*dg44.zy+w*dg44.wy, x*dg44.xz+y*dg44.yz+z*dg44.zz+w*dg44.wz, x*dg44.xw+y*dg44.yw+z*dg44.zw+w*dg44.ww)
  } // class GVec4D

  object GVec4D {
    def apply(x0: Double, y0: Double, z0: Double, w0: Double): GVec4D = new IVec4D(x0, y0, z0, w0)
    def parse(str: String): GVec4D = IVec4D.parse(str)
    val zero: GVec4D = IVec4D.zero
    val xUnit: GVec4D = IVec4D.xUnit
    val yUnit: GVec4D = IVec4D.yUnit
    val zUnit: GVec4D = IVec4D.zUnit
    val wUnit: GVec4D = IVec4D.wUnit
  } // object GVec4D


  final case class IVec4S(val x: Short, val y: Short, val z: Short, val w: Short) extends GVec4S {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec4S = new IVec4S(x, y, z, w)
    override def copy(x0: Short = x, y0: Short = y, z0: Short = z, w0: Short = w): IVec4S = new IVec4S(x0, y0, z0, w0)
    override def trim: IVec3S = new IVec3S(x, y, z)
    def vec = this
    override def imm = this
    override def toI: IVec4I = new IVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def toL: IVec4L = new IVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: IVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: IVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class IVec4S

  object IVec4S {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec4S = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toShort); new IVec4S(p(0), p(1), p(2), p(3)) }
    val zero = new IVec4S(0, 0, 0, 0)
    val xUnit = new IVec4S(1, 0, 0, 0)
    val yUnit = new IVec4S(0, 1, 0, 0)
    val zUnit = new IVec4S(0, 0, 1, 0)
    val wUnit = new IVec4S(0, 0, 0, 1)
  } // object IVec4S


  final case class IVec4I(val x: Int, val y: Int, val z: Int, val w: Int) extends GVec4I {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec4I = new IVec4I(x, y, z, w)
    override def toS: IVec4S = new IVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def copy(x0: Int = x, y0: Int = y, z0: Int = z, w0: Int = w): IVec4I = new IVec4I(x0, y0, z0, w0)
    override def trim: IVec3I = new IVec3I(x, y, z)
    def vec = this
    override def imm = this
    override def toL: IVec4L = new IVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: IVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: IVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class IVec4I

  object IVec4I {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec4I = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toInt); new IVec4I(p(0), p(1), p(2), p(3)) }
    val zero = new IVec4I(0, 0, 0, 0)
    val xUnit = new IVec4I(1, 0, 0, 0)
    val yUnit = new IVec4I(0, 1, 0, 0)
    val zUnit = new IVec4I(0, 0, 1, 0)
    val wUnit = new IVec4I(0, 0, 0, 1)
  } // object IVec4I


  final case class IVec4L(val x: Long, val y: Long, val z: Long, val w: Long) extends GVec4L {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec4L = new IVec4L(x, y, z, w)
    override def toS: IVec4S = new IVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def toI: IVec4I = new IVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def copy(x0: Long = x, y0: Long = y, z0: Long = z, w0: Long = w): IVec4L = new IVec4L(x0, y0, z0, w0)
    override def trim: IVec3L = new IVec3L(x, y, z)
    def vec = this
    override def imm = this
    override def toF: IVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: IVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class IVec4L

  object IVec4L {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec4L = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toLong); new IVec4L(p(0), p(1), p(2), p(3)) }
    val zero = new IVec4L(0, 0, 0, 0)
    val xUnit = new IVec4L(1, 0, 0, 0)
    val yUnit = new IVec4L(0, 1, 0, 0)
    val zUnit = new IVec4L(0, 0, 1, 0)
    val wUnit = new IVec4L(0, 0, 0, 1)
  } // object IVec4L


  final case class IVec4F(val x: Float, val y: Float, val z: Float, val w: Float) extends GVec4F {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec4F = new IVec4F(x, y, z, w)
    override def toS: IVec4S = new IVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: IVec4I = new IVec4I(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toL: IVec4L = new IVec4L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble), math.round((w).toDouble))
    override def copy(x0: Float = x, y0: Float = y, z0: Float = z, w0: Float = w): IVec4F = new IVec4F(x0, y0, z0, w0)
    override def trim: IVec3F = new IVec3F(x, y, z)
    def vec = this
    override def imm = this
    override def toD: IVec4D = new IVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class IVec4F

  object IVec4F {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec4F = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toFloat); new IVec4F(p(0), p(1), p(2), p(3)) }
    val zero = new IVec4F(0, 0, 0, 0)
    val xUnit = new IVec4F(1, 0, 0, 0)
    val yUnit = new IVec4F(0, 1, 0, 0)
    val zUnit = new IVec4F(0, 0, 1, 0)
    val wUnit = new IVec4F(0, 0, 0, 1)
  } // object IVec4F


  final case class IVec4D(val x: Double, val y: Double, val z: Double, val w: Double) extends GVec4D {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IVec4D = new IVec4D(x, y, z, w)
    override def toS: IVec4S = new IVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: IVec4I = new IVec4I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt, (math.round(w)).toInt)
    override def toL: IVec4L = new IVec4L(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toF: IVec4F = new IVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def copy(x0: Double = x, y0: Double = y, z0: Double = z, w0: Double = w): IVec4D = new IVec4D(x0, y0, z0, w0)
    override def trim: IVec3D = new IVec3D(x, y, z)
    def vec = this
    override def imm = this
  } // class IVec4D

  object IVec4D {
    val pattern = """\[([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\s*[,;]\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IVec4D = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toDouble); new IVec4D(p(0), p(1), p(2), p(3)) }
    val zero = new IVec4D(0, 0, 0, 0)
    val xUnit = new IVec4D(1, 0, 0, 0)
    val yUnit = new IVec4D(0, 1, 0, 0)
    val zUnit = new IVec4D(0, 0, 1, 0)
    val wUnit = new IVec4D(0, 0, 0, 1)
  } // object IVec4D


  abstract class AVec4S extends GVec4S {
    def x_=(x0: Short): Unit
    def y_=(y0: Short): Unit
    def z_=(z0: Short): Unit
    def w_=(w0: Short): Unit
    override def clone(): AVec4S = new MVec4S(x, y, z, w)
    override def copy(x0: Short = x, y0: Short = y, z0: Short = z, w0: Short = w): AVec4S = new MVec4S(x0, y0, z0, w0)
    override def trim: AVec3S = new MVec3S(x, y, z)
    override def toI: AVec4I = new MVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def toL: AVec4L = new MVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: AVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: AVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def negEq: this.type = { x = (-x).toShort; y = (-y).toShort; z = (-z).toShort; w = (-w).toShort; this }
    def :~(x0: Short): this.type = { x = x0; y = x0; z = x0; w = x0; this }
    def :~~(x0: Int): this.type = { x = (x0).toShort; y = (x0).toShort; z = (x0).toShort; w = (x0).toShort; this }
    def :~~(x0: Long): this.type = { x = (x0).toShort; y = (x0).toShort; z = (x0).toShort; w = (x0).toShort; this }
    def :~~(x0: Float): this.type = { x = (math.round(x0)).toShort; y = (math.round(x0)).toShort; z = (math.round(x0)).toShort; w = (math.round(x0)).toShort; this }
    def :~~(x0: Double): this.type = { x = (math.round(x0)).toShort; y = (math.round(x0)).toShort; z = (math.round(x0)).toShort; w = (math.round(x0)).toShort; this }
    def :~(sg4: GVec4S): this.type = { x = sg4.x; y = sg4.y; z = sg4.z; w = sg4.w; this }
    def :~(x0: Short, y0: Short, z0: Short, w0: Short): this.type = { x = x0; y = y0; z = z0; w = w0; this }
    def :~~(ig4: GVec4I): this.type = { x = (ig4.x).toShort; y = (ig4.y).toShort; z = (ig4.z).toShort; w = (ig4.w).toShort; this }
    def :~~(lg4: GVec4L): this.type = { x = (lg4.x).toShort; y = (lg4.y).toShort; z = (lg4.z).toShort; w = (lg4.w).toShort; this }
    def :~~(fg4: GVec4F): this.type = { x = (math.round(fg4.x)).toShort; y = (math.round(fg4.y)).toShort; z = (math.round(fg4.z)).toShort; w = (math.round(fg4.w)).toShort; this }
    def :~~(dg4: GVec4D): this.type = { x = (math.round(dg4.x)).toShort; y = (math.round(dg4.y)).toShort; z = (math.round(dg4.z)).toShort; w = (math.round(dg4.w)).toShort; this }
    def +~(x0: Short): this.type = { x = (x + x0).toShort; y = (y + x0).toShort; z = (z + x0).toShort; w = (w + x0).toShort; this }
    def +~~(x0: Int): this.type = { x = ((x).toInt + x0).toShort; y = ((y).toInt + x0).toShort; z = ((z).toInt + x0).toShort; w = ((w).toInt + x0).toShort; this }
    def +~~(x0: Long): this.type = { x = ((x).toLong + x0).toShort; y = ((y).toLong + x0).toShort; z = ((z).toLong + x0).toShort; w = ((w).toLong + x0).toShort; this }
    def +~~(x0: Float): this.type = { x = (math.round((x).toFloat + x0)).toShort; y = (math.round((y).toFloat + x0)).toShort; z = (math.round((z).toFloat + x0)).toShort; w = (math.round((w).toFloat + x0)).toShort; this }
    def +~~(x0: Double): this.type = { x = (math.round((x).toDouble + x0)).toShort; y = (math.round((y).toDouble + x0)).toShort; z = (math.round((z).toDouble + x0)).toShort; w = (math.round((w).toDouble + x0)).toShort; this }
    def +~(sg4: GVec4S): this.type = { x = (x + sg4.x).toShort; y = (y + sg4.y).toShort; z = (z + sg4.z).toShort; w = (w + sg4.w).toShort; this }
    def +~(x0: Short, y0: Short, z0: Short, w0: Short): this.type = { x = (x + x0).toShort; y = (y + y0).toShort; z = (z + z0).toShort; w = (w + w0).toShort; this }
    def +~~(ig4: GVec4I): this.type = { x = ((x).toInt + ig4.x).toShort; y = ((y).toInt + ig4.y).toShort; z = ((z).toInt + ig4.z).toShort; w = ((w).toInt + ig4.w).toShort; this }
    def +~~(lg4: GVec4L): this.type = { x = ((x).toLong + lg4.x).toShort; y = ((y).toLong + lg4.y).toShort; z = ((z).toLong + lg4.z).toShort; w = ((w).toLong + lg4.w).toShort; this }
    def +~~(fg4: GVec4F): this.type = { x = (math.round((x).toFloat + fg4.x)).toShort; y = (math.round((y).toFloat + fg4.y)).toShort; z = (math.round((z).toFloat + fg4.z)).toShort; w = (math.round((w).toFloat + fg4.w)).toShort; this }
    def +~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble + dg4.x)).toShort; y = (math.round((y).toDouble + dg4.y)).toShort; z = (math.round((z).toDouble + dg4.z)).toShort; w = (math.round((w).toDouble + dg4.w)).toShort; this }
    def -~(x0: Short): this.type = { x = (x - x0).toShort; y = (y - x0).toShort; z = (z - x0).toShort; w = (w - x0).toShort; this }
    def -~~(x0: Int): this.type = { x = ((x).toInt - x0).toShort; y = ((y).toInt - x0).toShort; z = ((z).toInt - x0).toShort; w = ((w).toInt - x0).toShort; this }
    def -~~(x0: Long): this.type = { x = ((x).toLong - x0).toShort; y = ((y).toLong - x0).toShort; z = ((z).toLong - x0).toShort; w = ((w).toLong - x0).toShort; this }
    def -~~(x0: Float): this.type = { x = (math.round((x).toFloat - x0)).toShort; y = (math.round((y).toFloat - x0)).toShort; z = (math.round((z).toFloat - x0)).toShort; w = (math.round((w).toFloat - x0)).toShort; this }
    def -~~(x0: Double): this.type = { x = (math.round((x).toDouble - x0)).toShort; y = (math.round((y).toDouble - x0)).toShort; z = (math.round((z).toDouble - x0)).toShort; w = (math.round((w).toDouble - x0)).toShort; this }
    def -~(sg4: GVec4S): this.type = { x = (x - sg4.x).toShort; y = (y - sg4.y).toShort; z = (z - sg4.z).toShort; w = (w - sg4.w).toShort; this }
    def -~(x0: Short, y0: Short, z0: Short, w0: Short): this.type = { x = (x - x0).toShort; y = (y - y0).toShort; z = (z - z0).toShort; w = (w - w0).toShort; this }
    def -~~(ig4: GVec4I): this.type = { x = ((x).toInt - ig4.x).toShort; y = ((y).toInt - ig4.y).toShort; z = ((z).toInt - ig4.z).toShort; w = ((w).toInt - ig4.w).toShort; this }
    def -~~(lg4: GVec4L): this.type = { x = ((x).toLong - lg4.x).toShort; y = ((y).toLong - lg4.y).toShort; z = ((z).toLong - lg4.z).toShort; w = ((w).toLong - lg4.w).toShort; this }
    def -~~(fg4: GVec4F): this.type = { x = (math.round((x).toFloat - fg4.x)).toShort; y = (math.round((y).toFloat - fg4.y)).toShort; z = (math.round((z).toFloat - fg4.z)).toShort; w = (math.round((w).toFloat - fg4.w)).toShort; this }
    def -~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble - dg4.x)).toShort; y = (math.round((y).toDouble - dg4.y)).toShort; z = (math.round((z).toDouble - dg4.z)).toShort; w = (math.round((w).toDouble - dg4.w)).toShort; this }
    def *~(x0: Short): this.type = { x = (x * x0).toShort; y = (y * x0).toShort; z = (z * x0).toShort; w = (w * x0).toShort; this }
    def *~~(x0: Int): this.type = { x = ((x).toInt * x0).toShort; y = ((y).toInt * x0).toShort; z = ((z).toInt * x0).toShort; w = ((w).toInt * x0).toShort; this }
    def *~~(x0: Long): this.type = { x = ((x).toLong * x0).toShort; y = ((y).toLong * x0).toShort; z = ((z).toLong * x0).toShort; w = ((w).toLong * x0).toShort; this }
    def *~~(x0: Float): this.type = { x = (math.round((x).toFloat * x0)).toShort; y = (math.round((y).toFloat * x0)).toShort; z = (math.round((z).toFloat * x0)).toShort; w = (math.round((w).toFloat * x0)).toShort; this }
    def *~~(x0: Double): this.type = { x = (math.round((x).toDouble * x0)).toShort; y = (math.round((y).toDouble * x0)).toShort; z = (math.round((z).toDouble * x0)).toShort; w = (math.round((w).toDouble * x0)).toShort; this }
    def *~(sg4: GVec4S): this.type = { x = (x * sg4.x).toShort; y = (y * sg4.y).toShort; z = (z * sg4.z).toShort; w = (w * sg4.w).toShort; this }
    def *~(x0: Short, y0: Short, z0: Short, w0: Short): this.type = { x = (x * x0).toShort; y = (y * y0).toShort; z = (z * z0).toShort; w = (w * w0).toShort; this }
    def *~~(ig4: GVec4I): this.type = { x = ((x).toInt * ig4.x).toShort; y = ((y).toInt * ig4.y).toShort; z = ((z).toInt * ig4.z).toShort; w = ((w).toInt * ig4.w).toShort; this }
    def *~~(lg4: GVec4L): this.type = { x = ((x).toLong * lg4.x).toShort; y = ((y).toLong * lg4.y).toShort; z = ((z).toLong * lg4.z).toShort; w = ((w).toLong * lg4.w).toShort; this }
    def *~~(fg4: GVec4F): this.type = { x = (math.round((x).toFloat * fg4.x)).toShort; y = (math.round((y).toFloat * fg4.y)).toShort; z = (math.round((z).toFloat * fg4.z)).toShort; w = (math.round((w).toFloat * fg4.w)).toShort; this }
    def *~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble * dg4.x)).toShort; y = (math.round((y).toDouble * dg4.y)).toShort; z = (math.round((z).toDouble * dg4.z)).toShort; w = (math.round((w).toDouble * dg4.w)).toShort; this }
    def /~(x0: Short): this.type = { x = (x / x0).toShort; y = (y / x0).toShort; z = (z / x0).toShort; w = (w / x0).toShort; this }
    def /~~(x0: Int): this.type = { x = ((x).toInt / x0).toShort; y = ((y).toInt / x0).toShort; z = ((z).toInt / x0).toShort; w = ((w).toInt / x0).toShort; this }
    def /~~(x0: Long): this.type = { x = ((x).toLong / x0).toShort; y = ((y).toLong / x0).toShort; z = ((z).toLong / x0).toShort; w = ((w).toLong / x0).toShort; this }
    def /~~(x0: Float): this.type = { x = (math.round((x).toFloat / x0)).toShort; y = (math.round((y).toFloat / x0)).toShort; z = (math.round((z).toFloat / x0)).toShort; w = (math.round((w).toFloat / x0)).toShort; this }
    def /~~(x0: Double): this.type = { x = (math.round((x).toDouble / x0)).toShort; y = (math.round((y).toDouble / x0)).toShort; z = (math.round((z).toDouble / x0)).toShort; w = (math.round((w).toDouble / x0)).toShort; this }
    def /~(sg4: GVec4S): this.type = { x = (x / sg4.x).toShort; y = (y / sg4.y).toShort; z = (z / sg4.z).toShort; w = (w / sg4.w).toShort; this }
    def /~(x0: Short, y0: Short, z0: Short, w0: Short): this.type = { x = (x / x0).toShort; y = (y / y0).toShort; z = (z / z0).toShort; w = (w / w0).toShort; this }
    def /~~(ig4: GVec4I): this.type = { x = ((x).toInt / ig4.x).toShort; y = ((y).toInt / ig4.y).toShort; z = ((z).toInt / ig4.z).toShort; w = ((w).toInt / ig4.w).toShort; this }
    def /~~(lg4: GVec4L): this.type = { x = ((x).toLong / lg4.x).toShort; y = ((y).toLong / lg4.y).toShort; z = ((z).toLong / lg4.z).toShort; w = ((w).toLong / lg4.w).toShort; this }
    def /~~(fg4: GVec4F): this.type = { x = (math.round((x).toFloat / fg4.x)).toShort; y = (math.round((y).toFloat / fg4.y)).toShort; z = (math.round((z).toFloat / fg4.z)).toShort; w = (math.round((w).toFloat / fg4.w)).toShort; this }
    def /~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble / dg4.x)).toShort; y = (math.round((y).toDouble / dg4.y)).toShort; z = (math.round((z).toDouble / dg4.z)).toShort; w = (math.round((w).toDouble / dg4.w)).toShort; this }
    def maxEq(x0: Short): this.type = { x = (math.max(x,x0)).toShort; y = (math.max(y,x0)).toShort; z = (math.max(z,x0)).toShort; w = (math.max(w,x0)).toShort; this }
    def maxEqCast(x0: Int): this.type = { x = (math.max((x).toInt,x0)).toShort; y = (math.max((y).toInt,x0)).toShort; z = (math.max((z).toInt,x0)).toShort; w = (math.max((w).toInt,x0)).toShort; this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toLong,x0)).toShort; y = (math.max((y).toLong,x0)).toShort; z = (math.max((z).toLong,x0)).toShort; w = (math.max((w).toLong,x0)).toShort; this }
    def maxEqCast(x0: Float): this.type = { x = (math.round(math.max((x).toFloat,x0))).toShort; y = (math.round(math.max((y).toFloat,x0))).toShort; z = (math.round(math.max((z).toFloat,x0))).toShort; w = (math.round(math.max((w).toFloat,x0))).toShort; this }
    def maxEqCast(x0: Double): this.type = { x = (math.round(math.max((x).toDouble,x0))).toShort; y = (math.round(math.max((y).toDouble,x0))).toShort; z = (math.round(math.max((z).toDouble,x0))).toShort; w = (math.round(math.max((w).toDouble,x0))).toShort; this }
    def maxEq(sg4: GVec4S): this.type = { x = (math.max(x,sg4.x)).toShort; y = (math.max(y,sg4.y)).toShort; z = (math.max(z,sg4.z)).toShort; w = (math.max(w,sg4.w)).toShort; this }
    def maxEq(x0: Short, y0: Short, z0: Short, w0: Short): this.type = { x = (math.max(x,x0)).toShort; y = (math.max(y,y0)).toShort; z = (math.max(z,z0)).toShort; w = (math.max(w,w0)).toShort; this }
    def maxEqCast(ig4: GVec4I): this.type = { x = (math.max((x).toInt,ig4.x)).toShort; y = (math.max((y).toInt,ig4.y)).toShort; z = (math.max((z).toInt,ig4.z)).toShort; w = (math.max((w).toInt,ig4.w)).toShort; this }
    def maxEqCast(lg4: GVec4L): this.type = { x = (math.max((x).toLong,lg4.x)).toShort; y = (math.max((y).toLong,lg4.y)).toShort; z = (math.max((z).toLong,lg4.z)).toShort; w = (math.max((w).toLong,lg4.w)).toShort; this }
    def maxEqCast(fg4: GVec4F): this.type = { x = (math.round(math.max((x).toFloat,fg4.x))).toShort; y = (math.round(math.max((y).toFloat,fg4.y))).toShort; z = (math.round(math.max((z).toFloat,fg4.z))).toShort; w = (math.round(math.max((w).toFloat,fg4.w))).toShort; this }
    def maxEqCast(dg4: GVec4D): this.type = { x = (math.round(math.max((x).toDouble,dg4.x))).toShort; y = (math.round(math.max((y).toDouble,dg4.y))).toShort; z = (math.round(math.max((z).toDouble,dg4.z))).toShort; w = (math.round(math.max((w).toDouble,dg4.w))).toShort; this }
    def minEq(x0: Short): this.type = { x = (math.min(x,x0)).toShort; y = (math.min(y,x0)).toShort; z = (math.min(z,x0)).toShort; w = (math.min(w,x0)).toShort; this }
    def minEqCast(x0: Int): this.type = { x = (math.min((x).toInt,x0)).toShort; y = (math.min((y).toInt,x0)).toShort; z = (math.min((z).toInt,x0)).toShort; w = (math.min((w).toInt,x0)).toShort; this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toLong,x0)).toShort; y = (math.min((y).toLong,x0)).toShort; z = (math.min((z).toLong,x0)).toShort; w = (math.min((w).toLong,x0)).toShort; this }
    def minEqCast(x0: Float): this.type = { x = (math.round(math.min((x).toFloat,x0))).toShort; y = (math.round(math.min((y).toFloat,x0))).toShort; z = (math.round(math.min((z).toFloat,x0))).toShort; w = (math.round(math.min((w).toFloat,x0))).toShort; this }
    def minEqCast(x0: Double): this.type = { x = (math.round(math.min((x).toDouble,x0))).toShort; y = (math.round(math.min((y).toDouble,x0))).toShort; z = (math.round(math.min((z).toDouble,x0))).toShort; w = (math.round(math.min((w).toDouble,x0))).toShort; this }
    def minEq(sg4: GVec4S): this.type = { x = (math.min(x,sg4.x)).toShort; y = (math.min(y,sg4.y)).toShort; z = (math.min(z,sg4.z)).toShort; w = (math.min(w,sg4.w)).toShort; this }
    def minEq(x0: Short, y0: Short, z0: Short, w0: Short): this.type = { x = (math.min(x,x0)).toShort; y = (math.min(y,y0)).toShort; z = (math.min(z,z0)).toShort; w = (math.min(w,w0)).toShort; this }
    def minEqCast(ig4: GVec4I): this.type = { x = (math.min((x).toInt,ig4.x)).toShort; y = (math.min((y).toInt,ig4.y)).toShort; z = (math.min((z).toInt,ig4.z)).toShort; w = (math.min((w).toInt,ig4.w)).toShort; this }
    def minEqCast(lg4: GVec4L): this.type = { x = (math.min((x).toLong,lg4.x)).toShort; y = (math.min((y).toLong,lg4.y)).toShort; z = (math.min((z).toLong,lg4.z)).toShort; w = (math.min((w).toLong,lg4.w)).toShort; this }
    def minEqCast(fg4: GVec4F): this.type = { x = (math.round(math.min((x).toFloat,fg4.x))).toShort; y = (math.round(math.min((y).toFloat,fg4.y))).toShort; z = (math.round(math.min((z).toFloat,fg4.z))).toShort; w = (math.round(math.min((w).toFloat,fg4.w))).toShort; this }
    def minEqCast(dg4: GVec4D): this.type = { x = (math.round(math.min((x).toDouble,dg4.x))).toShort; y = (math.round(math.min((y).toDouble,dg4.y))).toShort; z = (math.round(math.min((z).toDouble,dg4.z))).toShort; w = (math.round(math.min((w).toDouble,dg4.w))).toShort; this }
    def operateEq(sg4: GVec4S)(fun: (Short,Short)=>Short) = { x = (fun(x,sg4.x)).toShort; y = (fun(y,sg4.y)).toShort; z = (fun(z,sg4.z)).toShort; w = (fun(w,sg4.w)).toShort; this }
    def operateEqCast(ig4: GVec4I)(fun: (Int,Int)=>Int) = { x = (fun((x).toInt,ig4.x)).toShort; y = (fun((y).toInt,ig4.y)).toShort; z = (fun((z).toInt,ig4.z)).toShort; w = (fun((w).toInt,ig4.w)).toShort; this }
    def operateEqCast(lg4: GVec4L)(fun: (Long,Long)=>Long) = { x = (fun((x).toLong,lg4.x)).toShort; y = (fun((y).toLong,lg4.y)).toShort; z = (fun((z).toLong,lg4.z)).toShort; w = (fun((w).toLong,lg4.w)).toShort; this }
    def operateEqCast(fg4: GVec4F)(fun: (Float,Float)=>Float) = { x = (math.round(fun((x).toFloat,fg4.x))).toShort; y = (math.round(fun((y).toFloat,fg4.y))).toShort; z = (math.round(fun((z).toFloat,fg4.z))).toShort; w = (math.round(fun((w).toFloat,fg4.w))).toShort; this }
    def operateEqCast(dg4: GVec4D)(fun: (Double,Double)=>Double) = { x = (math.round(fun((x).toDouble,dg4.x))).toShort; y = (math.round(fun((y).toDouble,dg4.y))).toShort; z = (math.round(fun((z).toDouble,dg4.z))).toShort; w = (math.round(fun((w).toDouble,dg4.w))).toShort; this }
    def **~(sg44: GMat4S) = {val x0 = x*sg44.xx+y*sg44.yx+z*sg44.zx+w*sg44.wx; val y0 = x*sg44.xy+y*sg44.yy+z*sg44.zy+w*sg44.wy; val z0 = x*sg44.xz+y*sg44.yz+z*sg44.zz+w*sg44.wz; val w0 = x*sg44.xw+y*sg44.yw+z*sg44.zw+w*sg44.ww; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; w = (w0).toShort; this }
    def **~:(sg44: GMat4S) = {val x0 = x*sg44.xx+y*sg44.xy+z*sg44.xz+w*sg44.xw; val y0 = x*sg44.yx+y*sg44.yy+z*sg44.yz+w*sg44.yw; val z0 = x*sg44.zx+y*sg44.zy+z*sg44.zz+w*sg44.zw; val w0 = x*sg44.wx+y*sg44.wy+z*sg44.wz+w*sg44.ww; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; w = (w0).toShort; this }
    def **~~(ig44: GMat4I) = {val x0 = (x).toInt*ig44.xx+(y).toInt*ig44.yx+(z).toInt*ig44.zx+(w).toInt*ig44.wx; val y0 = (x).toInt*ig44.xy+(y).toInt*ig44.yy+(z).toInt*ig44.zy+(w).toInt*ig44.wy; val z0 = (x).toInt*ig44.xz+(y).toInt*ig44.yz+(z).toInt*ig44.zz+(w).toInt*ig44.wz; val w0 = (x).toInt*ig44.xw+(y).toInt*ig44.yw+(z).toInt*ig44.zw+(w).toInt*ig44.ww; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; w = (w0).toShort; this }
    def **~~:(ig44: GMat4I) = {val x0 = (x).toInt*ig44.xx+(y).toInt*ig44.xy+(z).toInt*ig44.xz+(w).toInt*ig44.xw; val y0 = (x).toInt*ig44.yx+(y).toInt*ig44.yy+(z).toInt*ig44.yz+(w).toInt*ig44.yw; val z0 = (x).toInt*ig44.zx+(y).toInt*ig44.zy+(z).toInt*ig44.zz+(w).toInt*ig44.zw; val w0 = (x).toInt*ig44.wx+(y).toInt*ig44.wy+(z).toInt*ig44.wz+(w).toInt*ig44.ww; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; w = (w0).toShort; this }
    def **~~(lg44: GMat4L) = {val x0 = (x).toLong*lg44.xx+(y).toLong*lg44.yx+(z).toLong*lg44.zx+(w).toLong*lg44.wx; val y0 = (x).toLong*lg44.xy+(y).toLong*lg44.yy+(z).toLong*lg44.zy+(w).toLong*lg44.wy; val z0 = (x).toLong*lg44.xz+(y).toLong*lg44.yz+(z).toLong*lg44.zz+(w).toLong*lg44.wz; val w0 = (x).toLong*lg44.xw+(y).toLong*lg44.yw+(z).toLong*lg44.zw+(w).toLong*lg44.ww; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; w = (w0).toShort; this }
    def **~~:(lg44: GMat4L) = {val x0 = (x).toLong*lg44.xx+(y).toLong*lg44.xy+(z).toLong*lg44.xz+(w).toLong*lg44.xw; val y0 = (x).toLong*lg44.yx+(y).toLong*lg44.yy+(z).toLong*lg44.yz+(w).toLong*lg44.yw; val z0 = (x).toLong*lg44.zx+(y).toLong*lg44.zy+(z).toLong*lg44.zz+(w).toLong*lg44.zw; val w0 = (x).toLong*lg44.wx+(y).toLong*lg44.wy+(z).toLong*lg44.wz+(w).toLong*lg44.ww; x = (x0).toShort; y = (y0).toShort; z = (z0).toShort; w = (w0).toShort; this }
    def **~~(fg44: GMat4F) = {val x0 = (x).toFloat*fg44.xx+(y).toFloat*fg44.yx+(z).toFloat*fg44.zx+(w).toFloat*fg44.wx; val y0 = (x).toFloat*fg44.xy+(y).toFloat*fg44.yy+(z).toFloat*fg44.zy+(w).toFloat*fg44.wy; val z0 = (x).toFloat*fg44.xz+(y).toFloat*fg44.yz+(z).toFloat*fg44.zz+(w).toFloat*fg44.wz; val w0 = (x).toFloat*fg44.xw+(y).toFloat*fg44.yw+(z).toFloat*fg44.zw+(w).toFloat*fg44.ww; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; w = (math.round(w0)).toShort; this }
    def **~~:(fg44: GMat4F) = {val x0 = (x).toFloat*fg44.xx+(y).toFloat*fg44.xy+(z).toFloat*fg44.xz+(w).toFloat*fg44.xw; val y0 = (x).toFloat*fg44.yx+(y).toFloat*fg44.yy+(z).toFloat*fg44.yz+(w).toFloat*fg44.yw; val z0 = (x).toFloat*fg44.zx+(y).toFloat*fg44.zy+(z).toFloat*fg44.zz+(w).toFloat*fg44.zw; val w0 = (x).toFloat*fg44.wx+(y).toFloat*fg44.wy+(z).toFloat*fg44.wz+(w).toFloat*fg44.ww; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; w = (math.round(w0)).toShort; this }
    def **~~(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx; val y0 = (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy; val z0 = (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz; val w0 = (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; w = (math.round(w0)).toShort; this }
    def **~~:(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.xy+(z).toDouble*dg44.xz+(w).toDouble*dg44.xw; val y0 = (x).toDouble*dg44.yx+(y).toDouble*dg44.yy+(z).toDouble*dg44.yz+(w).toDouble*dg44.yw; val z0 = (x).toDouble*dg44.zx+(y).toDouble*dg44.zy+(z).toDouble*dg44.zz+(w).toDouble*dg44.zw; val w0 = (x).toDouble*dg44.wx+(y).toDouble*dg44.wy+(z).toDouble*dg44.wz+(w).toDouble*dg44.ww; x = (math.round(x0)).toShort; y = (math.round(y0)).toShort; z = (math.round(z0)).toShort; w = (math.round(w0)).toShort; this }
  } // class AVec4S

  object AVec4S {
    def apply(x0: Short, y0: Short, z0: Short, w0: Short): AVec4S = new MVec4S(x0, y0, z0, w0)
    def parse(str: String): AVec4S = IVec4S.parse(str).mut
    def zero: AVec4S = MVec4S.zero
    def xUnit: AVec4S = MVec4S.xUnit
    def yUnit: AVec4S = MVec4S.yUnit
    def zUnit: AVec4S = MVec4S.zUnit
    def wUnit: AVec4S = MVec4S.wUnit
  } // object AVec4S


  abstract class AVec4I extends GVec4I {
    def x_=(x0: Int): Unit
    def y_=(y0: Int): Unit
    def z_=(z0: Int): Unit
    def w_=(w0: Int): Unit
    override def clone(): AVec4I = new MVec4I(x, y, z, w)
    override def toS: AVec4S = new MVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def copy(x0: Int = x, y0: Int = y, z0: Int = z, w0: Int = w): AVec4I = new MVec4I(x0, y0, z0, w0)
    override def trim: AVec3I = new MVec3I(x, y, z)
    def mapEq(fun: Int => Int): this.type = {x = fun(x); y = fun(y); z = fun(z); w = fun(w); this }
    override def toL: AVec4L = new MVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: AVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: AVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def negEq: this.type = { x = -x; y = -y; z = -z; w = -w; this }
    def :~(x0: Int): this.type = { x = x0; y = x0; z = x0; w = x0; this }
    def :~~(x0: Long): this.type = { x = (x0).toInt; y = (x0).toInt; z = (x0).toInt; w = (x0).toInt; this }
    def :~~(x0: Float): this.type = { x = math.round(x0); y = math.round(x0); z = math.round(x0); w = math.round(x0); this }
    def :~~(x0: Double): this.type = { x = (math.round(x0)).toInt; y = (math.round(x0)).toInt; z = (math.round(x0)).toInt; w = (math.round(x0)).toInt; this }
    def :~(sg4: GVec4S): this.type = { x = (sg4.x).toInt; y = (sg4.y).toInt; z = (sg4.z).toInt; w = (sg4.w).toInt; this }
    def :~(ig4: GVec4I): this.type = { x = ig4.x; y = ig4.y; z = ig4.z; w = ig4.w; this }
    def :~(x0: Int, y0: Int, z0: Int, w0: Int): this.type = { x = x0; y = y0; z = z0; w = w0; this }
    def :~~(lg4: GVec4L): this.type = { x = (lg4.x).toInt; y = (lg4.y).toInt; z = (lg4.z).toInt; w = (lg4.w).toInt; this }
    def :~~(fg4: GVec4F): this.type = { x = math.round(fg4.x); y = math.round(fg4.y); z = math.round(fg4.z); w = math.round(fg4.w); this }
    def :~~(dg4: GVec4D): this.type = { x = (math.round(dg4.x)).toInt; y = (math.round(dg4.y)).toInt; z = (math.round(dg4.z)).toInt; w = (math.round(dg4.w)).toInt; this }
    def +~(x0: Int): this.type = { x = x + x0; y = y + x0; z = z + x0; w = w + x0; this }
    def +~~(x0: Long): this.type = { x = ((x).toLong + x0).toInt; y = ((y).toLong + x0).toInt; z = ((z).toLong + x0).toInt; w = ((w).toLong + x0).toInt; this }
    def +~~(x0: Float): this.type = { x = math.round((x).toFloat + x0); y = math.round((y).toFloat + x0); z = math.round((z).toFloat + x0); w = math.round((w).toFloat + x0); this }
    def +~~(x0: Double): this.type = { x = (math.round((x).toDouble + x0)).toInt; y = (math.round((y).toDouble + x0)).toInt; z = (math.round((z).toDouble + x0)).toInt; w = (math.round((w).toDouble + x0)).toInt; this }
    def +~(sg4: GVec4S): this.type = { x = x + (sg4.x).toInt; y = y + (sg4.y).toInt; z = z + (sg4.z).toInt; w = w + (sg4.w).toInt; this }
    def +~(ig4: GVec4I): this.type = { x = x + ig4.x; y = y + ig4.y; z = z + ig4.z; w = w + ig4.w; this }
    def +~(x0: Int, y0: Int, z0: Int, w0: Int): this.type = { x = x + x0; y = y + y0; z = z + z0; w = w + w0; this }
    def +~~(lg4: GVec4L): this.type = { x = ((x).toLong + lg4.x).toInt; y = ((y).toLong + lg4.y).toInt; z = ((z).toLong + lg4.z).toInt; w = ((w).toLong + lg4.w).toInt; this }
    def +~~(fg4: GVec4F): this.type = { x = math.round((x).toFloat + fg4.x); y = math.round((y).toFloat + fg4.y); z = math.round((z).toFloat + fg4.z); w = math.round((w).toFloat + fg4.w); this }
    def +~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble + dg4.x)).toInt; y = (math.round((y).toDouble + dg4.y)).toInt; z = (math.round((z).toDouble + dg4.z)).toInt; w = (math.round((w).toDouble + dg4.w)).toInt; this }
    def -~(x0: Int): this.type = { x = x - x0; y = y - x0; z = z - x0; w = w - x0; this }
    def -~~(x0: Long): this.type = { x = ((x).toLong - x0).toInt; y = ((y).toLong - x0).toInt; z = ((z).toLong - x0).toInt; w = ((w).toLong - x0).toInt; this }
    def -~~(x0: Float): this.type = { x = math.round((x).toFloat - x0); y = math.round((y).toFloat - x0); z = math.round((z).toFloat - x0); w = math.round((w).toFloat - x0); this }
    def -~~(x0: Double): this.type = { x = (math.round((x).toDouble - x0)).toInt; y = (math.round((y).toDouble - x0)).toInt; z = (math.round((z).toDouble - x0)).toInt; w = (math.round((w).toDouble - x0)).toInt; this }
    def -~(sg4: GVec4S): this.type = { x = x - (sg4.x).toInt; y = y - (sg4.y).toInt; z = z - (sg4.z).toInt; w = w - (sg4.w).toInt; this }
    def -~(ig4: GVec4I): this.type = { x = x - ig4.x; y = y - ig4.y; z = z - ig4.z; w = w - ig4.w; this }
    def -~(x0: Int, y0: Int, z0: Int, w0: Int): this.type = { x = x - x0; y = y - y0; z = z - z0; w = w - w0; this }
    def -~~(lg4: GVec4L): this.type = { x = ((x).toLong - lg4.x).toInt; y = ((y).toLong - lg4.y).toInt; z = ((z).toLong - lg4.z).toInt; w = ((w).toLong - lg4.w).toInt; this }
    def -~~(fg4: GVec4F): this.type = { x = math.round((x).toFloat - fg4.x); y = math.round((y).toFloat - fg4.y); z = math.round((z).toFloat - fg4.z); w = math.round((w).toFloat - fg4.w); this }
    def -~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble - dg4.x)).toInt; y = (math.round((y).toDouble - dg4.y)).toInt; z = (math.round((z).toDouble - dg4.z)).toInt; w = (math.round((w).toDouble - dg4.w)).toInt; this }
    def *~(x0: Int): this.type = { x = x * x0; y = y * x0; z = z * x0; w = w * x0; this }
    def *~~(x0: Long): this.type = { x = ((x).toLong * x0).toInt; y = ((y).toLong * x0).toInt; z = ((z).toLong * x0).toInt; w = ((w).toLong * x0).toInt; this }
    def *~~(x0: Float): this.type = { x = math.round((x).toFloat * x0); y = math.round((y).toFloat * x0); z = math.round((z).toFloat * x0); w = math.round((w).toFloat * x0); this }
    def *~~(x0: Double): this.type = { x = (math.round((x).toDouble * x0)).toInt; y = (math.round((y).toDouble * x0)).toInt; z = (math.round((z).toDouble * x0)).toInt; w = (math.round((w).toDouble * x0)).toInt; this }
    def *~(sg4: GVec4S): this.type = { x = x * (sg4.x).toInt; y = y * (sg4.y).toInt; z = z * (sg4.z).toInt; w = w * (sg4.w).toInt; this }
    def *~(ig4: GVec4I): this.type = { x = x * ig4.x; y = y * ig4.y; z = z * ig4.z; w = w * ig4.w; this }
    def *~(x0: Int, y0: Int, z0: Int, w0: Int): this.type = { x = x * x0; y = y * y0; z = z * z0; w = w * w0; this }
    def *~~(lg4: GVec4L): this.type = { x = ((x).toLong * lg4.x).toInt; y = ((y).toLong * lg4.y).toInt; z = ((z).toLong * lg4.z).toInt; w = ((w).toLong * lg4.w).toInt; this }
    def *~~(fg4: GVec4F): this.type = { x = math.round((x).toFloat * fg4.x); y = math.round((y).toFloat * fg4.y); z = math.round((z).toFloat * fg4.z); w = math.round((w).toFloat * fg4.w); this }
    def *~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble * dg4.x)).toInt; y = (math.round((y).toDouble * dg4.y)).toInt; z = (math.round((z).toDouble * dg4.z)).toInt; w = (math.round((w).toDouble * dg4.w)).toInt; this }
    def /~(x0: Int): this.type = { x = x / x0; y = y / x0; z = z / x0; w = w / x0; this }
    def /~~(x0: Long): this.type = { x = ((x).toLong / x0).toInt; y = ((y).toLong / x0).toInt; z = ((z).toLong / x0).toInt; w = ((w).toLong / x0).toInt; this }
    def /~~(x0: Float): this.type = { x = math.round((x).toFloat / x0); y = math.round((y).toFloat / x0); z = math.round((z).toFloat / x0); w = math.round((w).toFloat / x0); this }
    def /~~(x0: Double): this.type = { x = (math.round((x).toDouble / x0)).toInt; y = (math.round((y).toDouble / x0)).toInt; z = (math.round((z).toDouble / x0)).toInt; w = (math.round((w).toDouble / x0)).toInt; this }
    def /~(sg4: GVec4S): this.type = { x = x / (sg4.x).toInt; y = y / (sg4.y).toInt; z = z / (sg4.z).toInt; w = w / (sg4.w).toInt; this }
    def /~(ig4: GVec4I): this.type = { x = x / ig4.x; y = y / ig4.y; z = z / ig4.z; w = w / ig4.w; this }
    def /~(x0: Int, y0: Int, z0: Int, w0: Int): this.type = { x = x / x0; y = y / y0; z = z / z0; w = w / w0; this }
    def /~~(lg4: GVec4L): this.type = { x = ((x).toLong / lg4.x).toInt; y = ((y).toLong / lg4.y).toInt; z = ((z).toLong / lg4.z).toInt; w = ((w).toLong / lg4.w).toInt; this }
    def /~~(fg4: GVec4F): this.type = { x = math.round((x).toFloat / fg4.x); y = math.round((y).toFloat / fg4.y); z = math.round((z).toFloat / fg4.z); w = math.round((w).toFloat / fg4.w); this }
    def /~~(dg4: GVec4D): this.type = { x = (math.round((x).toDouble / dg4.x)).toInt; y = (math.round((y).toDouble / dg4.y)).toInt; z = (math.round((z).toDouble / dg4.z)).toInt; w = (math.round((w).toDouble / dg4.w)).toInt; this }
    def maxEq(x0: Int): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); w = math.max(w,x0); this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toLong,x0)).toInt; y = (math.max((y).toLong,x0)).toInt; z = (math.max((z).toLong,x0)).toInt; w = (math.max((w).toLong,x0)).toInt; this }
    def maxEqCast(x0: Float): this.type = { x = math.round(math.max((x).toFloat,x0)); y = math.round(math.max((y).toFloat,x0)); z = math.round(math.max((z).toFloat,x0)); w = math.round(math.max((w).toFloat,x0)); this }
    def maxEqCast(x0: Double): this.type = { x = (math.round(math.max((x).toDouble,x0))).toInt; y = (math.round(math.max((y).toDouble,x0))).toInt; z = (math.round(math.max((z).toDouble,x0))).toInt; w = (math.round(math.max((w).toDouble,x0))).toInt; this }
    def maxEq(sg4: GVec4S): this.type = { x = math.max(x,(sg4.x).toInt); y = math.max(y,(sg4.y).toInt); z = math.max(z,(sg4.z).toInt); w = math.max(w,(sg4.w).toInt); this }
    def maxEq(ig4: GVec4I): this.type = { x = math.max(x,ig4.x); y = math.max(y,ig4.y); z = math.max(z,ig4.z); w = math.max(w,ig4.w); this }
    def maxEq(x0: Int, y0: Int, z0: Int, w0: Int): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); w = math.max(w,w0); this }
    def maxEqCast(lg4: GVec4L): this.type = { x = (math.max((x).toLong,lg4.x)).toInt; y = (math.max((y).toLong,lg4.y)).toInt; z = (math.max((z).toLong,lg4.z)).toInt; w = (math.max((w).toLong,lg4.w)).toInt; this }
    def maxEqCast(fg4: GVec4F): this.type = { x = math.round(math.max((x).toFloat,fg4.x)); y = math.round(math.max((y).toFloat,fg4.y)); z = math.round(math.max((z).toFloat,fg4.z)); w = math.round(math.max((w).toFloat,fg4.w)); this }
    def maxEqCast(dg4: GVec4D): this.type = { x = (math.round(math.max((x).toDouble,dg4.x))).toInt; y = (math.round(math.max((y).toDouble,dg4.y))).toInt; z = (math.round(math.max((z).toDouble,dg4.z))).toInt; w = (math.round(math.max((w).toDouble,dg4.w))).toInt; this }
    def minEq(x0: Int): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); w = math.min(w,x0); this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toLong,x0)).toInt; y = (math.min((y).toLong,x0)).toInt; z = (math.min((z).toLong,x0)).toInt; w = (math.min((w).toLong,x0)).toInt; this }
    def minEqCast(x0: Float): this.type = { x = math.round(math.min((x).toFloat,x0)); y = math.round(math.min((y).toFloat,x0)); z = math.round(math.min((z).toFloat,x0)); w = math.round(math.min((w).toFloat,x0)); this }
    def minEqCast(x0: Double): this.type = { x = (math.round(math.min((x).toDouble,x0))).toInt; y = (math.round(math.min((y).toDouble,x0))).toInt; z = (math.round(math.min((z).toDouble,x0))).toInt; w = (math.round(math.min((w).toDouble,x0))).toInt; this }
    def minEq(sg4: GVec4S): this.type = { x = math.min(x,(sg4.x).toInt); y = math.min(y,(sg4.y).toInt); z = math.min(z,(sg4.z).toInt); w = math.min(w,(sg4.w).toInt); this }
    def minEq(ig4: GVec4I): this.type = { x = math.min(x,ig4.x); y = math.min(y,ig4.y); z = math.min(z,ig4.z); w = math.min(w,ig4.w); this }
    def minEq(x0: Int, y0: Int, z0: Int, w0: Int): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); w = math.min(w,w0); this }
    def minEqCast(lg4: GVec4L): this.type = { x = (math.min((x).toLong,lg4.x)).toInt; y = (math.min((y).toLong,lg4.y)).toInt; z = (math.min((z).toLong,lg4.z)).toInt; w = (math.min((w).toLong,lg4.w)).toInt; this }
    def minEqCast(fg4: GVec4F): this.type = { x = math.round(math.min((x).toFloat,fg4.x)); y = math.round(math.min((y).toFloat,fg4.y)); z = math.round(math.min((z).toFloat,fg4.z)); w = math.round(math.min((w).toFloat,fg4.w)); this }
    def minEqCast(dg4: GVec4D): this.type = { x = (math.round(math.min((x).toDouble,dg4.x))).toInt; y = (math.round(math.min((y).toDouble,dg4.y))).toInt; z = (math.round(math.min((z).toDouble,dg4.z))).toInt; w = (math.round(math.min((w).toDouble,dg4.w))).toInt; this }
    def operateEq(sg4: GVec4S)(fun: (Int,Int)=>Int) = { x = fun(x,(sg4.x).toInt); y = fun(y,(sg4.y).toInt); z = fun(z,(sg4.z).toInt); w = fun(w,(sg4.w).toInt); this }
    def operateEq(ig4: GVec4I)(fun: (Int,Int)=>Int) = { x = fun(x,ig4.x); y = fun(y,ig4.y); z = fun(z,ig4.z); w = fun(w,ig4.w); this }
    def operateEqCast(lg4: GVec4L)(fun: (Long,Long)=>Long) = { x = (fun((x).toLong,lg4.x)).toInt; y = (fun((y).toLong,lg4.y)).toInt; z = (fun((z).toLong,lg4.z)).toInt; w = (fun((w).toLong,lg4.w)).toInt; this }
    def operateEqCast(fg4: GVec4F)(fun: (Float,Float)=>Float) = { x = math.round(fun((x).toFloat,fg4.x)); y = math.round(fun((y).toFloat,fg4.y)); z = math.round(fun((z).toFloat,fg4.z)); w = math.round(fun((w).toFloat,fg4.w)); this }
    def operateEqCast(dg4: GVec4D)(fun: (Double,Double)=>Double) = { x = (math.round(fun((x).toDouble,dg4.x))).toInt; y = (math.round(fun((y).toDouble,dg4.y))).toInt; z = (math.round(fun((z).toDouble,dg4.z))).toInt; w = (math.round(fun((w).toDouble,dg4.w))).toInt; this }
    def **~(sg44: GMat4S) = {val x0 = x*(sg44.xx).toInt+y*(sg44.yx).toInt+z*(sg44.zx).toInt+w*(sg44.wx).toInt; val y0 = x*(sg44.xy).toInt+y*(sg44.yy).toInt+z*(sg44.zy).toInt+w*(sg44.wy).toInt; val z0 = x*(sg44.xz).toInt+y*(sg44.yz).toInt+z*(sg44.zz).toInt+w*(sg44.wz).toInt; val w0 = x*(sg44.xw).toInt+y*(sg44.yw).toInt+z*(sg44.zw).toInt+w*(sg44.ww).toInt; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(sg44: GMat4S) = {val x0 = x*(sg44.xx).toInt+y*(sg44.xy).toInt+z*(sg44.xz).toInt+w*(sg44.xw).toInt; val y0 = x*(sg44.yx).toInt+y*(sg44.yy).toInt+z*(sg44.yz).toInt+w*(sg44.yw).toInt; val z0 = x*(sg44.zx).toInt+y*(sg44.zy).toInt+z*(sg44.zz).toInt+w*(sg44.zw).toInt; val w0 = x*(sg44.wx).toInt+y*(sg44.wy).toInt+z*(sg44.wz).toInt+w*(sg44.ww).toInt; x = x0; y = y0; z = z0; w = w0; this }
    def **~(ig44: GMat4I) = {val x0 = x*ig44.xx+y*ig44.yx+z*ig44.zx+w*ig44.wx; val y0 = x*ig44.xy+y*ig44.yy+z*ig44.zy+w*ig44.wy; val z0 = x*ig44.xz+y*ig44.yz+z*ig44.zz+w*ig44.wz; val w0 = x*ig44.xw+y*ig44.yw+z*ig44.zw+w*ig44.ww; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(ig44: GMat4I) = {val x0 = x*ig44.xx+y*ig44.xy+z*ig44.xz+w*ig44.xw; val y0 = x*ig44.yx+y*ig44.yy+z*ig44.yz+w*ig44.yw; val z0 = x*ig44.zx+y*ig44.zy+z*ig44.zz+w*ig44.zw; val w0 = x*ig44.wx+y*ig44.wy+z*ig44.wz+w*ig44.ww; x = x0; y = y0; z = z0; w = w0; this }
    def **~~(lg44: GMat4L) = {val x0 = (x).toLong*lg44.xx+(y).toLong*lg44.yx+(z).toLong*lg44.zx+(w).toLong*lg44.wx; val y0 = (x).toLong*lg44.xy+(y).toLong*lg44.yy+(z).toLong*lg44.zy+(w).toLong*lg44.wy; val z0 = (x).toLong*lg44.xz+(y).toLong*lg44.yz+(z).toLong*lg44.zz+(w).toLong*lg44.wz; val w0 = (x).toLong*lg44.xw+(y).toLong*lg44.yw+(z).toLong*lg44.zw+(w).toLong*lg44.ww; x = (x0).toInt; y = (y0).toInt; z = (z0).toInt; w = (w0).toInt; this }
    def **~~:(lg44: GMat4L) = {val x0 = (x).toLong*lg44.xx+(y).toLong*lg44.xy+(z).toLong*lg44.xz+(w).toLong*lg44.xw; val y0 = (x).toLong*lg44.yx+(y).toLong*lg44.yy+(z).toLong*lg44.yz+(w).toLong*lg44.yw; val z0 = (x).toLong*lg44.zx+(y).toLong*lg44.zy+(z).toLong*lg44.zz+(w).toLong*lg44.zw; val w0 = (x).toLong*lg44.wx+(y).toLong*lg44.wy+(z).toLong*lg44.wz+(w).toLong*lg44.ww; x = (x0).toInt; y = (y0).toInt; z = (z0).toInt; w = (w0).toInt; this }
    def **~~(fg44: GMat4F) = {val x0 = (x).toFloat*fg44.xx+(y).toFloat*fg44.yx+(z).toFloat*fg44.zx+(w).toFloat*fg44.wx; val y0 = (x).toFloat*fg44.xy+(y).toFloat*fg44.yy+(z).toFloat*fg44.zy+(w).toFloat*fg44.wy; val z0 = (x).toFloat*fg44.xz+(y).toFloat*fg44.yz+(z).toFloat*fg44.zz+(w).toFloat*fg44.wz; val w0 = (x).toFloat*fg44.xw+(y).toFloat*fg44.yw+(z).toFloat*fg44.zw+(w).toFloat*fg44.ww; x = math.round(x0); y = math.round(y0); z = math.round(z0); w = math.round(w0); this }
    def **~~:(fg44: GMat4F) = {val x0 = (x).toFloat*fg44.xx+(y).toFloat*fg44.xy+(z).toFloat*fg44.xz+(w).toFloat*fg44.xw; val y0 = (x).toFloat*fg44.yx+(y).toFloat*fg44.yy+(z).toFloat*fg44.yz+(w).toFloat*fg44.yw; val z0 = (x).toFloat*fg44.zx+(y).toFloat*fg44.zy+(z).toFloat*fg44.zz+(w).toFloat*fg44.zw; val w0 = (x).toFloat*fg44.wx+(y).toFloat*fg44.wy+(z).toFloat*fg44.wz+(w).toFloat*fg44.ww; x = math.round(x0); y = math.round(y0); z = math.round(z0); w = math.round(w0); this }
    def **~~(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx; val y0 = (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy; val z0 = (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz; val w0 = (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww; x = (math.round(x0)).toInt; y = (math.round(y0)).toInt; z = (math.round(z0)).toInt; w = (math.round(w0)).toInt; this }
    def **~~:(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.xy+(z).toDouble*dg44.xz+(w).toDouble*dg44.xw; val y0 = (x).toDouble*dg44.yx+(y).toDouble*dg44.yy+(z).toDouble*dg44.yz+(w).toDouble*dg44.yw; val z0 = (x).toDouble*dg44.zx+(y).toDouble*dg44.zy+(z).toDouble*dg44.zz+(w).toDouble*dg44.zw; val w0 = (x).toDouble*dg44.wx+(y).toDouble*dg44.wy+(z).toDouble*dg44.wz+(w).toDouble*dg44.ww; x = (math.round(x0)).toInt; y = (math.round(y0)).toInt; z = (math.round(z0)).toInt; w = (math.round(w0)).toInt; this }
  } // class AVec4I

  object AVec4I {
    def apply(x0: Int, y0: Int, z0: Int, w0: Int): AVec4I = new MVec4I(x0, y0, z0, w0)
    def parse(str: String): AVec4I = IVec4I.parse(str).mut
    def zero: AVec4I = MVec4I.zero
    def xUnit: AVec4I = MVec4I.xUnit
    def yUnit: AVec4I = MVec4I.yUnit
    def zUnit: AVec4I = MVec4I.zUnit
    def wUnit: AVec4I = MVec4I.wUnit
  } // object AVec4I


  abstract class AVec4L extends GVec4L {
    def x_=(x0: Long): Unit
    def y_=(y0: Long): Unit
    def z_=(z0: Long): Unit
    def w_=(w0: Long): Unit
    override def clone(): AVec4L = new MVec4L(x, y, z, w)
    override def toS: AVec4S = new MVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def toI: AVec4I = new MVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def copy(x0: Long = x, y0: Long = y, z0: Long = z, w0: Long = w): AVec4L = new MVec4L(x0, y0, z0, w0)
    override def trim: AVec3L = new MVec3L(x, y, z)
    def mapEq(fun: Long => Long): this.type = {x = fun(x); y = fun(y); z = fun(z); w = fun(w); this }
    override def toF: AVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: AVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def negEq: this.type = { x = -x; y = -y; z = -z; w = -w; this }
    def :~(x0: Long): this.type = { x = x0; y = x0; z = x0; w = x0; this }
    def :~~(x0: Double): this.type = { x = math.round(x0); y = math.round(x0); z = math.round(x0); w = math.round(x0); this }
    def :~(sg4: GVec4S): this.type = { x = (sg4.x).toLong; y = (sg4.y).toLong; z = (sg4.z).toLong; w = (sg4.w).toLong; this }
    def :~(ig4: GVec4I): this.type = { x = (ig4.x).toLong; y = (ig4.y).toLong; z = (ig4.z).toLong; w = (ig4.w).toLong; this }
    def :~(lg4: GVec4L): this.type = { x = lg4.x; y = lg4.y; z = lg4.z; w = lg4.w; this }
    def :~(x0: Long, y0: Long, z0: Long, w0: Long): this.type = { x = x0; y = y0; z = z0; w = w0; this }
    def :~~(fg4: GVec4F): this.type = { x = math.round((fg4.x).toDouble); y = math.round((fg4.y).toDouble); z = math.round((fg4.z).toDouble); w = math.round((fg4.w).toDouble); this }
    def :~~(dg4: GVec4D): this.type = { x = math.round(dg4.x); y = math.round(dg4.y); z = math.round(dg4.z); w = math.round(dg4.w); this }
    def +~(x0: Long): this.type = { x = x + x0; y = y + x0; z = z + x0; w = w + x0; this }
    def +~~(x0: Double): this.type = { x = math.round((x).toDouble + x0); y = math.round((y).toDouble + x0); z = math.round((z).toDouble + x0); w = math.round((w).toDouble + x0); this }
    def +~(sg4: GVec4S): this.type = { x = x + (sg4.x).toLong; y = y + (sg4.y).toLong; z = z + (sg4.z).toLong; w = w + (sg4.w).toLong; this }
    def +~(ig4: GVec4I): this.type = { x = x + (ig4.x).toLong; y = y + (ig4.y).toLong; z = z + (ig4.z).toLong; w = w + (ig4.w).toLong; this }
    def +~(lg4: GVec4L): this.type = { x = x + lg4.x; y = y + lg4.y; z = z + lg4.z; w = w + lg4.w; this }
    def +~(x0: Long, y0: Long, z0: Long, w0: Long): this.type = { x = x + x0; y = y + y0; z = z + z0; w = w + w0; this }
    def +~~(fg4: GVec4F): this.type = { x = math.round((x).toDouble + (fg4.x).toDouble); y = math.round((y).toDouble + (fg4.y).toDouble); z = math.round((z).toDouble + (fg4.z).toDouble); w = math.round((w).toDouble + (fg4.w).toDouble); this }
    def +~~(dg4: GVec4D): this.type = { x = math.round((x).toDouble + dg4.x); y = math.round((y).toDouble + dg4.y); z = math.round((z).toDouble + dg4.z); w = math.round((w).toDouble + dg4.w); this }
    def -~(x0: Long): this.type = { x = x - x0; y = y - x0; z = z - x0; w = w - x0; this }
    def -~~(x0: Double): this.type = { x = math.round((x).toDouble - x0); y = math.round((y).toDouble - x0); z = math.round((z).toDouble - x0); w = math.round((w).toDouble - x0); this }
    def -~(sg4: GVec4S): this.type = { x = x - (sg4.x).toLong; y = y - (sg4.y).toLong; z = z - (sg4.z).toLong; w = w - (sg4.w).toLong; this }
    def -~(ig4: GVec4I): this.type = { x = x - (ig4.x).toLong; y = y - (ig4.y).toLong; z = z - (ig4.z).toLong; w = w - (ig4.w).toLong; this }
    def -~(lg4: GVec4L): this.type = { x = x - lg4.x; y = y - lg4.y; z = z - lg4.z; w = w - lg4.w; this }
    def -~(x0: Long, y0: Long, z0: Long, w0: Long): this.type = { x = x - x0; y = y - y0; z = z - z0; w = w - w0; this }
    def -~~(fg4: GVec4F): this.type = { x = math.round((x).toDouble - (fg4.x).toDouble); y = math.round((y).toDouble - (fg4.y).toDouble); z = math.round((z).toDouble - (fg4.z).toDouble); w = math.round((w).toDouble - (fg4.w).toDouble); this }
    def -~~(dg4: GVec4D): this.type = { x = math.round((x).toDouble - dg4.x); y = math.round((y).toDouble - dg4.y); z = math.round((z).toDouble - dg4.z); w = math.round((w).toDouble - dg4.w); this }
    def *~(x0: Long): this.type = { x = x * x0; y = y * x0; z = z * x0; w = w * x0; this }
    def *~~(x0: Double): this.type = { x = math.round((x).toDouble * x0); y = math.round((y).toDouble * x0); z = math.round((z).toDouble * x0); w = math.round((w).toDouble * x0); this }
    def *~(sg4: GVec4S): this.type = { x = x * (sg4.x).toLong; y = y * (sg4.y).toLong; z = z * (sg4.z).toLong; w = w * (sg4.w).toLong; this }
    def *~(ig4: GVec4I): this.type = { x = x * (ig4.x).toLong; y = y * (ig4.y).toLong; z = z * (ig4.z).toLong; w = w * (ig4.w).toLong; this }
    def *~(lg4: GVec4L): this.type = { x = x * lg4.x; y = y * lg4.y; z = z * lg4.z; w = w * lg4.w; this }
    def *~(x0: Long, y0: Long, z0: Long, w0: Long): this.type = { x = x * x0; y = y * y0; z = z * z0; w = w * w0; this }
    def *~~(fg4: GVec4F): this.type = { x = math.round((x).toDouble * (fg4.x).toDouble); y = math.round((y).toDouble * (fg4.y).toDouble); z = math.round((z).toDouble * (fg4.z).toDouble); w = math.round((w).toDouble * (fg4.w).toDouble); this }
    def *~~(dg4: GVec4D): this.type = { x = math.round((x).toDouble * dg4.x); y = math.round((y).toDouble * dg4.y); z = math.round((z).toDouble * dg4.z); w = math.round((w).toDouble * dg4.w); this }
    def /~(x0: Long): this.type = { x = x / x0; y = y / x0; z = z / x0; w = w / x0; this }
    def /~~(x0: Double): this.type = { x = math.round((x).toDouble / x0); y = math.round((y).toDouble / x0); z = math.round((z).toDouble / x0); w = math.round((w).toDouble / x0); this }
    def /~(sg4: GVec4S): this.type = { x = x / (sg4.x).toLong; y = y / (sg4.y).toLong; z = z / (sg4.z).toLong; w = w / (sg4.w).toLong; this }
    def /~(ig4: GVec4I): this.type = { x = x / (ig4.x).toLong; y = y / (ig4.y).toLong; z = z / (ig4.z).toLong; w = w / (ig4.w).toLong; this }
    def /~(lg4: GVec4L): this.type = { x = x / lg4.x; y = y / lg4.y; z = z / lg4.z; w = w / lg4.w; this }
    def /~(x0: Long, y0: Long, z0: Long, w0: Long): this.type = { x = x / x0; y = y / y0; z = z / z0; w = w / w0; this }
    def /~~(fg4: GVec4F): this.type = { x = math.round((x).toDouble / (fg4.x).toDouble); y = math.round((y).toDouble / (fg4.y).toDouble); z = math.round((z).toDouble / (fg4.z).toDouble); w = math.round((w).toDouble / (fg4.w).toDouble); this }
    def /~~(dg4: GVec4D): this.type = { x = math.round((x).toDouble / dg4.x); y = math.round((y).toDouble / dg4.y); z = math.round((z).toDouble / dg4.z); w = math.round((w).toDouble / dg4.w); this }
    def maxEq(x0: Long): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); w = math.max(w,x0); this }
    def maxEqCast(x0: Double): this.type = { x = math.round(math.max((x).toDouble,x0)); y = math.round(math.max((y).toDouble,x0)); z = math.round(math.max((z).toDouble,x0)); w = math.round(math.max((w).toDouble,x0)); this }
    def maxEq(sg4: GVec4S): this.type = { x = math.max(x,(sg4.x).toLong); y = math.max(y,(sg4.y).toLong); z = math.max(z,(sg4.z).toLong); w = math.max(w,(sg4.w).toLong); this }
    def maxEq(ig4: GVec4I): this.type = { x = math.max(x,(ig4.x).toLong); y = math.max(y,(ig4.y).toLong); z = math.max(z,(ig4.z).toLong); w = math.max(w,(ig4.w).toLong); this }
    def maxEq(lg4: GVec4L): this.type = { x = math.max(x,lg4.x); y = math.max(y,lg4.y); z = math.max(z,lg4.z); w = math.max(w,lg4.w); this }
    def maxEq(x0: Long, y0: Long, z0: Long, w0: Long): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); w = math.max(w,w0); this }
    def maxEqCast(fg4: GVec4F): this.type = { x = math.round(math.max((x).toDouble,(fg4.x).toDouble)); y = math.round(math.max((y).toDouble,(fg4.y).toDouble)); z = math.round(math.max((z).toDouble,(fg4.z).toDouble)); w = math.round(math.max((w).toDouble,(fg4.w).toDouble)); this }
    def maxEqCast(dg4: GVec4D): this.type = { x = math.round(math.max((x).toDouble,dg4.x)); y = math.round(math.max((y).toDouble,dg4.y)); z = math.round(math.max((z).toDouble,dg4.z)); w = math.round(math.max((w).toDouble,dg4.w)); this }
    def minEq(x0: Long): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); w = math.min(w,x0); this }
    def minEqCast(x0: Double): this.type = { x = math.round(math.min((x).toDouble,x0)); y = math.round(math.min((y).toDouble,x0)); z = math.round(math.min((z).toDouble,x0)); w = math.round(math.min((w).toDouble,x0)); this }
    def minEq(sg4: GVec4S): this.type = { x = math.min(x,(sg4.x).toLong); y = math.min(y,(sg4.y).toLong); z = math.min(z,(sg4.z).toLong); w = math.min(w,(sg4.w).toLong); this }
    def minEq(ig4: GVec4I): this.type = { x = math.min(x,(ig4.x).toLong); y = math.min(y,(ig4.y).toLong); z = math.min(z,(ig4.z).toLong); w = math.min(w,(ig4.w).toLong); this }
    def minEq(lg4: GVec4L): this.type = { x = math.min(x,lg4.x); y = math.min(y,lg4.y); z = math.min(z,lg4.z); w = math.min(w,lg4.w); this }
    def minEq(x0: Long, y0: Long, z0: Long, w0: Long): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); w = math.min(w,w0); this }
    def minEqCast(fg4: GVec4F): this.type = { x = math.round(math.min((x).toDouble,(fg4.x).toDouble)); y = math.round(math.min((y).toDouble,(fg4.y).toDouble)); z = math.round(math.min((z).toDouble,(fg4.z).toDouble)); w = math.round(math.min((w).toDouble,(fg4.w).toDouble)); this }
    def minEqCast(dg4: GVec4D): this.type = { x = math.round(math.min((x).toDouble,dg4.x)); y = math.round(math.min((y).toDouble,dg4.y)); z = math.round(math.min((z).toDouble,dg4.z)); w = math.round(math.min((w).toDouble,dg4.w)); this }
    def operateEq(sg4: GVec4S)(fun: (Long,Long)=>Long) = { x = fun(x,(sg4.x).toLong); y = fun(y,(sg4.y).toLong); z = fun(z,(sg4.z).toLong); w = fun(w,(sg4.w).toLong); this }
    def operateEq(ig4: GVec4I)(fun: (Long,Long)=>Long) = { x = fun(x,(ig4.x).toLong); y = fun(y,(ig4.y).toLong); z = fun(z,(ig4.z).toLong); w = fun(w,(ig4.w).toLong); this }
    def operateEq(lg4: GVec4L)(fun: (Long,Long)=>Long) = { x = fun(x,lg4.x); y = fun(y,lg4.y); z = fun(z,lg4.z); w = fun(w,lg4.w); this }
    def operateEqCast(fg4: GVec4F)(fun: (Double,Double)=>Double) = { x = math.round(fun((x).toDouble,(fg4.x).toDouble)); y = math.round(fun((y).toDouble,(fg4.y).toDouble)); z = math.round(fun((z).toDouble,(fg4.z).toDouble)); w = math.round(fun((w).toDouble,(fg4.w).toDouble)); this }
    def operateEqCast(dg4: GVec4D)(fun: (Double,Double)=>Double) = { x = math.round(fun((x).toDouble,dg4.x)); y = math.round(fun((y).toDouble,dg4.y)); z = math.round(fun((z).toDouble,dg4.z)); w = math.round(fun((w).toDouble,dg4.w)); this }
    def **~(sg44: GMat4S) = {val x0 = x*(sg44.xx).toLong+y*(sg44.yx).toLong+z*(sg44.zx).toLong+w*(sg44.wx).toLong; val y0 = x*(sg44.xy).toLong+y*(sg44.yy).toLong+z*(sg44.zy).toLong+w*(sg44.wy).toLong; val z0 = x*(sg44.xz).toLong+y*(sg44.yz).toLong+z*(sg44.zz).toLong+w*(sg44.wz).toLong; val w0 = x*(sg44.xw).toLong+y*(sg44.yw).toLong+z*(sg44.zw).toLong+w*(sg44.ww).toLong; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(sg44: GMat4S) = {val x0 = x*(sg44.xx).toLong+y*(sg44.xy).toLong+z*(sg44.xz).toLong+w*(sg44.xw).toLong; val y0 = x*(sg44.yx).toLong+y*(sg44.yy).toLong+z*(sg44.yz).toLong+w*(sg44.yw).toLong; val z0 = x*(sg44.zx).toLong+y*(sg44.zy).toLong+z*(sg44.zz).toLong+w*(sg44.zw).toLong; val w0 = x*(sg44.wx).toLong+y*(sg44.wy).toLong+z*(sg44.wz).toLong+w*(sg44.ww).toLong; x = x0; y = y0; z = z0; w = w0; this }
    def **~(ig44: GMat4I) = {val x0 = x*(ig44.xx).toLong+y*(ig44.yx).toLong+z*(ig44.zx).toLong+w*(ig44.wx).toLong; val y0 = x*(ig44.xy).toLong+y*(ig44.yy).toLong+z*(ig44.zy).toLong+w*(ig44.wy).toLong; val z0 = x*(ig44.xz).toLong+y*(ig44.yz).toLong+z*(ig44.zz).toLong+w*(ig44.wz).toLong; val w0 = x*(ig44.xw).toLong+y*(ig44.yw).toLong+z*(ig44.zw).toLong+w*(ig44.ww).toLong; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(ig44: GMat4I) = {val x0 = x*(ig44.xx).toLong+y*(ig44.xy).toLong+z*(ig44.xz).toLong+w*(ig44.xw).toLong; val y0 = x*(ig44.yx).toLong+y*(ig44.yy).toLong+z*(ig44.yz).toLong+w*(ig44.yw).toLong; val z0 = x*(ig44.zx).toLong+y*(ig44.zy).toLong+z*(ig44.zz).toLong+w*(ig44.zw).toLong; val w0 = x*(ig44.wx).toLong+y*(ig44.wy).toLong+z*(ig44.wz).toLong+w*(ig44.ww).toLong; x = x0; y = y0; z = z0; w = w0; this }
    def **~(lg44: GMat4L) = {val x0 = x*lg44.xx+y*lg44.yx+z*lg44.zx+w*lg44.wx; val y0 = x*lg44.xy+y*lg44.yy+z*lg44.zy+w*lg44.wy; val z0 = x*lg44.xz+y*lg44.yz+z*lg44.zz+w*lg44.wz; val w0 = x*lg44.xw+y*lg44.yw+z*lg44.zw+w*lg44.ww; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(lg44: GMat4L) = {val x0 = x*lg44.xx+y*lg44.xy+z*lg44.xz+w*lg44.xw; val y0 = x*lg44.yx+y*lg44.yy+z*lg44.yz+w*lg44.yw; val z0 = x*lg44.zx+y*lg44.zy+z*lg44.zz+w*lg44.zw; val w0 = x*lg44.wx+y*lg44.wy+z*lg44.wz+w*lg44.ww; x = x0; y = y0; z = z0; w = w0; this }
    def **~~(fg44: GMat4F) = {val x0 = (x).toDouble*(fg44.xx).toDouble+(y).toDouble*(fg44.yx).toDouble+(z).toDouble*(fg44.zx).toDouble+(w).toDouble*(fg44.wx).toDouble; val y0 = (x).toDouble*(fg44.xy).toDouble+(y).toDouble*(fg44.yy).toDouble+(z).toDouble*(fg44.zy).toDouble+(w).toDouble*(fg44.wy).toDouble; val z0 = (x).toDouble*(fg44.xz).toDouble+(y).toDouble*(fg44.yz).toDouble+(z).toDouble*(fg44.zz).toDouble+(w).toDouble*(fg44.wz).toDouble; val w0 = (x).toDouble*(fg44.xw).toDouble+(y).toDouble*(fg44.yw).toDouble+(z).toDouble*(fg44.zw).toDouble+(w).toDouble*(fg44.ww).toDouble; x = math.round(x0); y = math.round(y0); z = math.round(z0); w = math.round(w0); this }
    def **~~:(fg44: GMat4F) = {val x0 = (x).toDouble*(fg44.xx).toDouble+(y).toDouble*(fg44.xy).toDouble+(z).toDouble*(fg44.xz).toDouble+(w).toDouble*(fg44.xw).toDouble; val y0 = (x).toDouble*(fg44.yx).toDouble+(y).toDouble*(fg44.yy).toDouble+(z).toDouble*(fg44.yz).toDouble+(w).toDouble*(fg44.yw).toDouble; val z0 = (x).toDouble*(fg44.zx).toDouble+(y).toDouble*(fg44.zy).toDouble+(z).toDouble*(fg44.zz).toDouble+(w).toDouble*(fg44.zw).toDouble; val w0 = (x).toDouble*(fg44.wx).toDouble+(y).toDouble*(fg44.wy).toDouble+(z).toDouble*(fg44.wz).toDouble+(w).toDouble*(fg44.ww).toDouble; x = math.round(x0); y = math.round(y0); z = math.round(z0); w = math.round(w0); this }
    def **~~(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx; val y0 = (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy; val z0 = (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz; val w0 = (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww; x = math.round(x0); y = math.round(y0); z = math.round(z0); w = math.round(w0); this }
    def **~~:(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.xy+(z).toDouble*dg44.xz+(w).toDouble*dg44.xw; val y0 = (x).toDouble*dg44.yx+(y).toDouble*dg44.yy+(z).toDouble*dg44.yz+(w).toDouble*dg44.yw; val z0 = (x).toDouble*dg44.zx+(y).toDouble*dg44.zy+(z).toDouble*dg44.zz+(w).toDouble*dg44.zw; val w0 = (x).toDouble*dg44.wx+(y).toDouble*dg44.wy+(z).toDouble*dg44.wz+(w).toDouble*dg44.ww; x = math.round(x0); y = math.round(y0); z = math.round(z0); w = math.round(w0); this }
  } // class AVec4L

  object AVec4L {
    def apply(x0: Long, y0: Long, z0: Long, w0: Long): AVec4L = new MVec4L(x0, y0, z0, w0)
    def parse(str: String): AVec4L = IVec4L.parse(str).mut
    def zero: AVec4L = MVec4L.zero
    def xUnit: AVec4L = MVec4L.xUnit
    def yUnit: AVec4L = MVec4L.yUnit
    def zUnit: AVec4L = MVec4L.zUnit
    def wUnit: AVec4L = MVec4L.wUnit
  } // object AVec4L


  abstract class AVec4F extends GVec4F {
    def x_=(x0: Float): Unit
    def y_=(y0: Float): Unit
    def z_=(z0: Float): Unit
    def w_=(w0: Float): Unit
    override def clone(): AVec4F = new MVec4F(x, y, z, w)
    override def toS: AVec4S = new MVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: AVec4I = new MVec4I(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toL: AVec4L = new MVec4L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble), math.round((w).toDouble))
    override def copy(x0: Float = x, y0: Float = y, z0: Float = z, w0: Float = w): AVec4F = new MVec4F(x0, y0, z0, w0)
    override def trim: AVec3F = new MVec3F(x, y, z)
    def mapEq(fun: Float => Float): this.type = {x = fun(x); y = fun(y); z = fun(z); w = fun(w); this }
    override def toD: AVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
    def negEq: this.type = { x = -x; y = -y; z = -z; w = -w; this }
    def normEq: this.type = { val k0 = 1/this.len; x = x*k0; y = y*k0; z = z*k0; w = w*k0; this }
    def :~~(x0: Long): this.type = { x = (x0).toFloat; y = (x0).toFloat; z = (x0).toFloat; w = (x0).toFloat; this }
    def :~(x0: Float): this.type = { x = x0; y = x0; z = x0; w = x0; this }
    def :~~(x0: Double): this.type = { x = (x0).toFloat; y = (x0).toFloat; z = (x0).toFloat; w = (x0).toFloat; this }
    def :~(sg4: GVec4S): this.type = { x = (sg4.x).toFloat; y = (sg4.y).toFloat; z = (sg4.z).toFloat; w = (sg4.w).toFloat; this }
    def :~(ig4: GVec4I): this.type = { x = (ig4.x).toFloat; y = (ig4.y).toFloat; z = (ig4.z).toFloat; w = (ig4.w).toFloat; this }
    def :~~(lg4: GVec4L): this.type = { x = ((lg4.x).toDouble).toFloat; y = ((lg4.y).toDouble).toFloat; z = ((lg4.z).toDouble).toFloat; w = ((lg4.w).toDouble).toFloat; this }
    def :~(fg4: GVec4F): this.type = { x = fg4.x; y = fg4.y; z = fg4.z; w = fg4.w; this }
    def :~(x0: Float, y0: Float, z0: Float, w0: Float): this.type = { x = x0; y = y0; z = z0; w = w0; this }
    def :~~(dg4: GVec4D): this.type = { x = (dg4.x).toFloat; y = (dg4.y).toFloat; z = (dg4.z).toFloat; w = (dg4.w).toFloat; this }
    def +~~(x0: Long): this.type = { x = ((x).toDouble + (x0).toDouble).toFloat; y = ((y).toDouble + (x0).toDouble).toFloat; z = ((z).toDouble + (x0).toDouble).toFloat; w = ((w).toDouble + (x0).toDouble).toFloat; this }
    def +~(x0: Float): this.type = { x = x + x0; y = y + x0; z = z + x0; w = w + x0; this }
    def +~~(x0: Double): this.type = { x = ((x).toDouble + x0).toFloat; y = ((y).toDouble + x0).toFloat; z = ((z).toDouble + x0).toFloat; w = ((w).toDouble + x0).toFloat; this }
    def +~(sg4: GVec4S): this.type = { x = x + (sg4.x).toFloat; y = y + (sg4.y).toFloat; z = z + (sg4.z).toFloat; w = w + (sg4.w).toFloat; this }
    def +~(ig4: GVec4I): this.type = { x = x + (ig4.x).toFloat; y = y + (ig4.y).toFloat; z = z + (ig4.z).toFloat; w = w + (ig4.w).toFloat; this }
    def +~~(lg4: GVec4L): this.type = { x = ((x).toDouble + (lg4.x).toDouble).toFloat; y = ((y).toDouble + (lg4.y).toDouble).toFloat; z = ((z).toDouble + (lg4.z).toDouble).toFloat; w = ((w).toDouble + (lg4.w).toDouble).toFloat; this }
    def +~(fg4: GVec4F): this.type = { x = x + fg4.x; y = y + fg4.y; z = z + fg4.z; w = w + fg4.w; this }
    def +~(x0: Float, y0: Float, z0: Float, w0: Float): this.type = { x = x + x0; y = y + y0; z = z + z0; w = w + w0; this }
    def +~~(dg4: GVec4D): this.type = { x = ((x).toDouble + dg4.x).toFloat; y = ((y).toDouble + dg4.y).toFloat; z = ((z).toDouble + dg4.z).toFloat; w = ((w).toDouble + dg4.w).toFloat; this }
    def -~~(x0: Long): this.type = { x = ((x).toDouble - (x0).toDouble).toFloat; y = ((y).toDouble - (x0).toDouble).toFloat; z = ((z).toDouble - (x0).toDouble).toFloat; w = ((w).toDouble - (x0).toDouble).toFloat; this }
    def -~(x0: Float): this.type = { x = x - x0; y = y - x0; z = z - x0; w = w - x0; this }
    def -~~(x0: Double): this.type = { x = ((x).toDouble - x0).toFloat; y = ((y).toDouble - x0).toFloat; z = ((z).toDouble - x0).toFloat; w = ((w).toDouble - x0).toFloat; this }
    def -~(sg4: GVec4S): this.type = { x = x - (sg4.x).toFloat; y = y - (sg4.y).toFloat; z = z - (sg4.z).toFloat; w = w - (sg4.w).toFloat; this }
    def -~(ig4: GVec4I): this.type = { x = x - (ig4.x).toFloat; y = y - (ig4.y).toFloat; z = z - (ig4.z).toFloat; w = w - (ig4.w).toFloat; this }
    def -~~(lg4: GVec4L): this.type = { x = ((x).toDouble - (lg4.x).toDouble).toFloat; y = ((y).toDouble - (lg4.y).toDouble).toFloat; z = ((z).toDouble - (lg4.z).toDouble).toFloat; w = ((w).toDouble - (lg4.w).toDouble).toFloat; this }
    def -~(fg4: GVec4F): this.type = { x = x - fg4.x; y = y - fg4.y; z = z - fg4.z; w = w - fg4.w; this }
    def -~(x0: Float, y0: Float, z0: Float, w0: Float): this.type = { x = x - x0; y = y - y0; z = z - z0; w = w - w0; this }
    def -~~(dg4: GVec4D): this.type = { x = ((x).toDouble - dg4.x).toFloat; y = ((y).toDouble - dg4.y).toFloat; z = ((z).toDouble - dg4.z).toFloat; w = ((w).toDouble - dg4.w).toFloat; this }
    def *~~(x0: Long): this.type = { x = ((x).toDouble * (x0).toDouble).toFloat; y = ((y).toDouble * (x0).toDouble).toFloat; z = ((z).toDouble * (x0).toDouble).toFloat; w = ((w).toDouble * (x0).toDouble).toFloat; this }
    def *~(x0: Float): this.type = { x = x * x0; y = y * x0; z = z * x0; w = w * x0; this }
    def *~~(x0: Double): this.type = { x = ((x).toDouble * x0).toFloat; y = ((y).toDouble * x0).toFloat; z = ((z).toDouble * x0).toFloat; w = ((w).toDouble * x0).toFloat; this }
    def *~(sg4: GVec4S): this.type = { x = x * (sg4.x).toFloat; y = y * (sg4.y).toFloat; z = z * (sg4.z).toFloat; w = w * (sg4.w).toFloat; this }
    def *~(ig4: GVec4I): this.type = { x = x * (ig4.x).toFloat; y = y * (ig4.y).toFloat; z = z * (ig4.z).toFloat; w = w * (ig4.w).toFloat; this }
    def *~~(lg4: GVec4L): this.type = { x = ((x).toDouble * (lg4.x).toDouble).toFloat; y = ((y).toDouble * (lg4.y).toDouble).toFloat; z = ((z).toDouble * (lg4.z).toDouble).toFloat; w = ((w).toDouble * (lg4.w).toDouble).toFloat; this }
    def *~(fg4: GVec4F): this.type = { x = x * fg4.x; y = y * fg4.y; z = z * fg4.z; w = w * fg4.w; this }
    def *~(x0: Float, y0: Float, z0: Float, w0: Float): this.type = { x = x * x0; y = y * y0; z = z * z0; w = w * w0; this }
    def *~~(dg4: GVec4D): this.type = { x = ((x).toDouble * dg4.x).toFloat; y = ((y).toDouble * dg4.y).toFloat; z = ((z).toDouble * dg4.z).toFloat; w = ((w).toDouble * dg4.w).toFloat; this }
    def /~~(x0: Long): this.type = { x = ((x).toDouble / (x0).toDouble).toFloat; y = ((y).toDouble / (x0).toDouble).toFloat; z = ((z).toDouble / (x0).toDouble).toFloat; w = ((w).toDouble / (x0).toDouble).toFloat; this }
    def /~(x0: Float): this.type = { x = x / x0; y = y / x0; z = z / x0; w = w / x0; this }
    def /~~(x0: Double): this.type = { x = ((x).toDouble / x0).toFloat; y = ((y).toDouble / x0).toFloat; z = ((z).toDouble / x0).toFloat; w = ((w).toDouble / x0).toFloat; this }
    def /~(sg4: GVec4S): this.type = { x = x / (sg4.x).toFloat; y = y / (sg4.y).toFloat; z = z / (sg4.z).toFloat; w = w / (sg4.w).toFloat; this }
    def /~(ig4: GVec4I): this.type = { x = x / (ig4.x).toFloat; y = y / (ig4.y).toFloat; z = z / (ig4.z).toFloat; w = w / (ig4.w).toFloat; this }
    def /~~(lg4: GVec4L): this.type = { x = ((x).toDouble / (lg4.x).toDouble).toFloat; y = ((y).toDouble / (lg4.y).toDouble).toFloat; z = ((z).toDouble / (lg4.z).toDouble).toFloat; w = ((w).toDouble / (lg4.w).toDouble).toFloat; this }
    def /~(fg4: GVec4F): this.type = { x = x / fg4.x; y = y / fg4.y; z = z / fg4.z; w = w / fg4.w; this }
    def /~(x0: Float, y0: Float, z0: Float, w0: Float): this.type = { x = x / x0; y = y / y0; z = z / z0; w = w / w0; this }
    def /~~(dg4: GVec4D): this.type = { x = ((x).toDouble / dg4.x).toFloat; y = ((y).toDouble / dg4.y).toFloat; z = ((z).toDouble / dg4.z).toFloat; w = ((w).toDouble / dg4.w).toFloat; this }
    def maxEqCast(x0: Long): this.type = { x = (math.max((x).toDouble,(x0).toDouble)).toFloat; y = (math.max((y).toDouble,(x0).toDouble)).toFloat; z = (math.max((z).toDouble,(x0).toDouble)).toFloat; w = (math.max((w).toDouble,(x0).toDouble)).toFloat; this }
    def maxEq(x0: Float): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); w = math.max(w,x0); this }
    def maxEqCast(x0: Double): this.type = { x = (math.max((x).toDouble,x0)).toFloat; y = (math.max((y).toDouble,x0)).toFloat; z = (math.max((z).toDouble,x0)).toFloat; w = (math.max((w).toDouble,x0)).toFloat; this }
    def maxEq(sg4: GVec4S): this.type = { x = math.max(x,(sg4.x).toFloat); y = math.max(y,(sg4.y).toFloat); z = math.max(z,(sg4.z).toFloat); w = math.max(w,(sg4.w).toFloat); this }
    def maxEq(ig4: GVec4I): this.type = { x = math.max(x,(ig4.x).toFloat); y = math.max(y,(ig4.y).toFloat); z = math.max(z,(ig4.z).toFloat); w = math.max(w,(ig4.w).toFloat); this }
    def maxEqCast(lg4: GVec4L): this.type = { x = (math.max((x).toDouble,(lg4.x).toDouble)).toFloat; y = (math.max((y).toDouble,(lg4.y).toDouble)).toFloat; z = (math.max((z).toDouble,(lg4.z).toDouble)).toFloat; w = (math.max((w).toDouble,(lg4.w).toDouble)).toFloat; this }
    def maxEq(fg4: GVec4F): this.type = { x = math.max(x,fg4.x); y = math.max(y,fg4.y); z = math.max(z,fg4.z); w = math.max(w,fg4.w); this }
    def maxEq(x0: Float, y0: Float, z0: Float, w0: Float): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); w = math.max(w,w0); this }
    def maxEqCast(dg4: GVec4D): this.type = { x = (math.max((x).toDouble,dg4.x)).toFloat; y = (math.max((y).toDouble,dg4.y)).toFloat; z = (math.max((z).toDouble,dg4.z)).toFloat; w = (math.max((w).toDouble,dg4.w)).toFloat; this }
    def minEqCast(x0: Long): this.type = { x = (math.min((x).toDouble,(x0).toDouble)).toFloat; y = (math.min((y).toDouble,(x0).toDouble)).toFloat; z = (math.min((z).toDouble,(x0).toDouble)).toFloat; w = (math.min((w).toDouble,(x0).toDouble)).toFloat; this }
    def minEq(x0: Float): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); w = math.min(w,x0); this }
    def minEqCast(x0: Double): this.type = { x = (math.min((x).toDouble,x0)).toFloat; y = (math.min((y).toDouble,x0)).toFloat; z = (math.min((z).toDouble,x0)).toFloat; w = (math.min((w).toDouble,x0)).toFloat; this }
    def minEq(sg4: GVec4S): this.type = { x = math.min(x,(sg4.x).toFloat); y = math.min(y,(sg4.y).toFloat); z = math.min(z,(sg4.z).toFloat); w = math.min(w,(sg4.w).toFloat); this }
    def minEq(ig4: GVec4I): this.type = { x = math.min(x,(ig4.x).toFloat); y = math.min(y,(ig4.y).toFloat); z = math.min(z,(ig4.z).toFloat); w = math.min(w,(ig4.w).toFloat); this }
    def minEqCast(lg4: GVec4L): this.type = { x = (math.min((x).toDouble,(lg4.x).toDouble)).toFloat; y = (math.min((y).toDouble,(lg4.y).toDouble)).toFloat; z = (math.min((z).toDouble,(lg4.z).toDouble)).toFloat; w = (math.min((w).toDouble,(lg4.w).toDouble)).toFloat; this }
    def minEq(fg4: GVec4F): this.type = { x = math.min(x,fg4.x); y = math.min(y,fg4.y); z = math.min(z,fg4.z); w = math.min(w,fg4.w); this }
    def minEq(x0: Float, y0: Float, z0: Float, w0: Float): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); w = math.min(w,w0); this }
    def minEqCast(dg4: GVec4D): this.type = { x = (math.min((x).toDouble,dg4.x)).toFloat; y = (math.min((y).toDouble,dg4.y)).toFloat; z = (math.min((z).toDouble,dg4.z)).toFloat; w = (math.min((w).toDouble,dg4.w)).toFloat; this }
    def operateEq(sg4: GVec4S)(fun: (Float,Float)=>Float) = { x = fun(x,(sg4.x).toFloat); y = fun(y,(sg4.y).toFloat); z = fun(z,(sg4.z).toFloat); w = fun(w,(sg4.w).toFloat); this }
    def operateEq(ig4: GVec4I)(fun: (Float,Float)=>Float) = { x = fun(x,(ig4.x).toFloat); y = fun(y,(ig4.y).toFloat); z = fun(z,(ig4.z).toFloat); w = fun(w,(ig4.w).toFloat); this }
    def operateEqCast(lg4: GVec4L)(fun: (Double,Double)=>Double) = { x = (fun((x).toDouble,(lg4.x).toDouble)).toFloat; y = (fun((y).toDouble,(lg4.y).toDouble)).toFloat; z = (fun((z).toDouble,(lg4.z).toDouble)).toFloat; w = (fun((w).toDouble,(lg4.w).toDouble)).toFloat; this }
    def operateEq(fg4: GVec4F)(fun: (Float,Float)=>Float) = { x = fun(x,fg4.x); y = fun(y,fg4.y); z = fun(z,fg4.z); w = fun(w,fg4.w); this }
    def operateEqCast(dg4: GVec4D)(fun: (Double,Double)=>Double) = { x = (fun((x).toDouble,dg4.x)).toFloat; y = (fun((y).toDouble,dg4.y)).toFloat; z = (fun((z).toDouble,dg4.z)).toFloat; w = (fun((w).toDouble,dg4.w)).toFloat; this }
    def **~(sg44: GMat4S) = {val x0 = x*(sg44.xx).toFloat+y*(sg44.yx).toFloat+z*(sg44.zx).toFloat+w*(sg44.wx).toFloat; val y0 = x*(sg44.xy).toFloat+y*(sg44.yy).toFloat+z*(sg44.zy).toFloat+w*(sg44.wy).toFloat; val z0 = x*(sg44.xz).toFloat+y*(sg44.yz).toFloat+z*(sg44.zz).toFloat+w*(sg44.wz).toFloat; val w0 = x*(sg44.xw).toFloat+y*(sg44.yw).toFloat+z*(sg44.zw).toFloat+w*(sg44.ww).toFloat; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(sg44: GMat4S) = {val x0 = x*(sg44.xx).toFloat+y*(sg44.xy).toFloat+z*(sg44.xz).toFloat+w*(sg44.xw).toFloat; val y0 = x*(sg44.yx).toFloat+y*(sg44.yy).toFloat+z*(sg44.yz).toFloat+w*(sg44.yw).toFloat; val z0 = x*(sg44.zx).toFloat+y*(sg44.zy).toFloat+z*(sg44.zz).toFloat+w*(sg44.zw).toFloat; val w0 = x*(sg44.wx).toFloat+y*(sg44.wy).toFloat+z*(sg44.wz).toFloat+w*(sg44.ww).toFloat; x = x0; y = y0; z = z0; w = w0; this }
    def **~(ig44: GMat4I) = {val x0 = x*(ig44.xx).toFloat+y*(ig44.yx).toFloat+z*(ig44.zx).toFloat+w*(ig44.wx).toFloat; val y0 = x*(ig44.xy).toFloat+y*(ig44.yy).toFloat+z*(ig44.zy).toFloat+w*(ig44.wy).toFloat; val z0 = x*(ig44.xz).toFloat+y*(ig44.yz).toFloat+z*(ig44.zz).toFloat+w*(ig44.wz).toFloat; val w0 = x*(ig44.xw).toFloat+y*(ig44.yw).toFloat+z*(ig44.zw).toFloat+w*(ig44.ww).toFloat; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(ig44: GMat4I) = {val x0 = x*(ig44.xx).toFloat+y*(ig44.xy).toFloat+z*(ig44.xz).toFloat+w*(ig44.xw).toFloat; val y0 = x*(ig44.yx).toFloat+y*(ig44.yy).toFloat+z*(ig44.yz).toFloat+w*(ig44.yw).toFloat; val z0 = x*(ig44.zx).toFloat+y*(ig44.zy).toFloat+z*(ig44.zz).toFloat+w*(ig44.zw).toFloat; val w0 = x*(ig44.wx).toFloat+y*(ig44.wy).toFloat+z*(ig44.wz).toFloat+w*(ig44.ww).toFloat; x = x0; y = y0; z = z0; w = w0; this }
    def **~~(lg44: GMat4L) = {val x0 = (x).toDouble*(lg44.xx).toDouble+(y).toDouble*(lg44.yx).toDouble+(z).toDouble*(lg44.zx).toDouble+(w).toDouble*(lg44.wx).toDouble; val y0 = (x).toDouble*(lg44.xy).toDouble+(y).toDouble*(lg44.yy).toDouble+(z).toDouble*(lg44.zy).toDouble+(w).toDouble*(lg44.wy).toDouble; val z0 = (x).toDouble*(lg44.xz).toDouble+(y).toDouble*(lg44.yz).toDouble+(z).toDouble*(lg44.zz).toDouble+(w).toDouble*(lg44.wz).toDouble; val w0 = (x).toDouble*(lg44.xw).toDouble+(y).toDouble*(lg44.yw).toDouble+(z).toDouble*(lg44.zw).toDouble+(w).toDouble*(lg44.ww).toDouble; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; w = (w0).toFloat; this }
    def **~~:(lg44: GMat4L) = {val x0 = (x).toDouble*(lg44.xx).toDouble+(y).toDouble*(lg44.xy).toDouble+(z).toDouble*(lg44.xz).toDouble+(w).toDouble*(lg44.xw).toDouble; val y0 = (x).toDouble*(lg44.yx).toDouble+(y).toDouble*(lg44.yy).toDouble+(z).toDouble*(lg44.yz).toDouble+(w).toDouble*(lg44.yw).toDouble; val z0 = (x).toDouble*(lg44.zx).toDouble+(y).toDouble*(lg44.zy).toDouble+(z).toDouble*(lg44.zz).toDouble+(w).toDouble*(lg44.zw).toDouble; val w0 = (x).toDouble*(lg44.wx).toDouble+(y).toDouble*(lg44.wy).toDouble+(z).toDouble*(lg44.wz).toDouble+(w).toDouble*(lg44.ww).toDouble; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; w = (w0).toFloat; this }
    def **~(fg44: GMat4F) = {val x0 = x*fg44.xx+y*fg44.yx+z*fg44.zx+w*fg44.wx; val y0 = x*fg44.xy+y*fg44.yy+z*fg44.zy+w*fg44.wy; val z0 = x*fg44.xz+y*fg44.yz+z*fg44.zz+w*fg44.wz; val w0 = x*fg44.xw+y*fg44.yw+z*fg44.zw+w*fg44.ww; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(fg44: GMat4F) = {val x0 = x*fg44.xx+y*fg44.xy+z*fg44.xz+w*fg44.xw; val y0 = x*fg44.yx+y*fg44.yy+z*fg44.yz+w*fg44.yw; val z0 = x*fg44.zx+y*fg44.zy+z*fg44.zz+w*fg44.zw; val w0 = x*fg44.wx+y*fg44.wy+z*fg44.wz+w*fg44.ww; x = x0; y = y0; z = z0; w = w0; this }
    def **~~(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.yx+(z).toDouble*dg44.zx+(w).toDouble*dg44.wx; val y0 = (x).toDouble*dg44.xy+(y).toDouble*dg44.yy+(z).toDouble*dg44.zy+(w).toDouble*dg44.wy; val z0 = (x).toDouble*dg44.xz+(y).toDouble*dg44.yz+(z).toDouble*dg44.zz+(w).toDouble*dg44.wz; val w0 = (x).toDouble*dg44.xw+(y).toDouble*dg44.yw+(z).toDouble*dg44.zw+(w).toDouble*dg44.ww; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; w = (w0).toFloat; this }
    def **~~:(dg44: GMat4D) = {val x0 = (x).toDouble*dg44.xx+(y).toDouble*dg44.xy+(z).toDouble*dg44.xz+(w).toDouble*dg44.xw; val y0 = (x).toDouble*dg44.yx+(y).toDouble*dg44.yy+(z).toDouble*dg44.yz+(w).toDouble*dg44.yw; val z0 = (x).toDouble*dg44.zx+(y).toDouble*dg44.zy+(z).toDouble*dg44.zz+(w).toDouble*dg44.zw; val w0 = (x).toDouble*dg44.wx+(y).toDouble*dg44.wy+(z).toDouble*dg44.wz+(w).toDouble*dg44.ww; x = (x0).toFloat; y = (y0).toFloat; z = (z0).toFloat; w = (w0).toFloat; this }
  } // class AVec4F

  object AVec4F {
    def apply(x0: Float, y0: Float, z0: Float, w0: Float): AVec4F = new MVec4F(x0, y0, z0, w0)
    def parse(str: String): AVec4F = IVec4F.parse(str).mut
    def zero: AVec4F = MVec4F.zero
    def xUnit: AVec4F = MVec4F.xUnit
    def yUnit: AVec4F = MVec4F.yUnit
    def zUnit: AVec4F = MVec4F.zUnit
    def wUnit: AVec4F = MVec4F.wUnit
  } // object AVec4F


  abstract class AVec4D extends GVec4D {
    def x_=(x0: Double): Unit
    def y_=(y0: Double): Unit
    def z_=(z0: Double): Unit
    def w_=(w0: Double): Unit
    override def clone(): AVec4D = new MVec4D(x, y, z, w)
    override def toS: AVec4S = new MVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: AVec4I = new MVec4I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt, (math.round(w)).toInt)
    override def toL: AVec4L = new MVec4L(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toF: AVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def copy(x0: Double = x, y0: Double = y, z0: Double = z, w0: Double = w): AVec4D = new MVec4D(x0, y0, z0, w0)
    override def trim: AVec3D = new MVec3D(x, y, z)
    def mapEq(fun: Double => Double): this.type = {x = fun(x); y = fun(y); z = fun(z); w = fun(w); this }
    def negEq: this.type = { x = -x; y = -y; z = -z; w = -w; this }
    def normEq: this.type = { val k0 = 1/this.len; x = x*k0; y = y*k0; z = z*k0; w = w*k0; this }
    def :~(x0: Double): this.type = { x = x0; y = x0; z = x0; w = x0; this }
    def :~(sg4: GVec4S): this.type = { x = (sg4.x).toDouble; y = (sg4.y).toDouble; z = (sg4.z).toDouble; w = (sg4.w).toDouble; this }
    def :~(ig4: GVec4I): this.type = { x = (ig4.x).toDouble; y = (ig4.y).toDouble; z = (ig4.z).toDouble; w = (ig4.w).toDouble; this }
    def :~(lg4: GVec4L): this.type = { x = (lg4.x).toDouble; y = (lg4.y).toDouble; z = (lg4.z).toDouble; w = (lg4.w).toDouble; this }
    def :~(fg4: GVec4F): this.type = { x = (fg4.x).toDouble; y = (fg4.y).toDouble; z = (fg4.z).toDouble; w = (fg4.w).toDouble; this }
    def :~(dg4: GVec4D): this.type = { x = dg4.x; y = dg4.y; z = dg4.z; w = dg4.w; this }
    def :~(x0: Double, y0: Double, z0: Double, w0: Double): this.type = { x = x0; y = y0; z = z0; w = w0; this }
    def +~(x0: Double): this.type = { x = x + x0; y = y + x0; z = z + x0; w = w + x0; this }
    def +~(sg4: GVec4S): this.type = { x = x + (sg4.x).toDouble; y = y + (sg4.y).toDouble; z = z + (sg4.z).toDouble; w = w + (sg4.w).toDouble; this }
    def +~(ig4: GVec4I): this.type = { x = x + (ig4.x).toDouble; y = y + (ig4.y).toDouble; z = z + (ig4.z).toDouble; w = w + (ig4.w).toDouble; this }
    def +~(lg4: GVec4L): this.type = { x = x + (lg4.x).toDouble; y = y + (lg4.y).toDouble; z = z + (lg4.z).toDouble; w = w + (lg4.w).toDouble; this }
    def +~(fg4: GVec4F): this.type = { x = x + (fg4.x).toDouble; y = y + (fg4.y).toDouble; z = z + (fg4.z).toDouble; w = w + (fg4.w).toDouble; this }
    def +~(dg4: GVec4D): this.type = { x = x + dg4.x; y = y + dg4.y; z = z + dg4.z; w = w + dg4.w; this }
    def +~(x0: Double, y0: Double, z0: Double, w0: Double): this.type = { x = x + x0; y = y + y0; z = z + z0; w = w + w0; this }
    def -~(x0: Double): this.type = { x = x - x0; y = y - x0; z = z - x0; w = w - x0; this }
    def -~(sg4: GVec4S): this.type = { x = x - (sg4.x).toDouble; y = y - (sg4.y).toDouble; z = z - (sg4.z).toDouble; w = w - (sg4.w).toDouble; this }
    def -~(ig4: GVec4I): this.type = { x = x - (ig4.x).toDouble; y = y - (ig4.y).toDouble; z = z - (ig4.z).toDouble; w = w - (ig4.w).toDouble; this }
    def -~(lg4: GVec4L): this.type = { x = x - (lg4.x).toDouble; y = y - (lg4.y).toDouble; z = z - (lg4.z).toDouble; w = w - (lg4.w).toDouble; this }
    def -~(fg4: GVec4F): this.type = { x = x - (fg4.x).toDouble; y = y - (fg4.y).toDouble; z = z - (fg4.z).toDouble; w = w - (fg4.w).toDouble; this }
    def -~(dg4: GVec4D): this.type = { x = x - dg4.x; y = y - dg4.y; z = z - dg4.z; w = w - dg4.w; this }
    def -~(x0: Double, y0: Double, z0: Double, w0: Double): this.type = { x = x - x0; y = y - y0; z = z - z0; w = w - w0; this }
    def *~(x0: Double): this.type = { x = x * x0; y = y * x0; z = z * x0; w = w * x0; this }
    def *~(sg4: GVec4S): this.type = { x = x * (sg4.x).toDouble; y = y * (sg4.y).toDouble; z = z * (sg4.z).toDouble; w = w * (sg4.w).toDouble; this }
    def *~(ig4: GVec4I): this.type = { x = x * (ig4.x).toDouble; y = y * (ig4.y).toDouble; z = z * (ig4.z).toDouble; w = w * (ig4.w).toDouble; this }
    def *~(lg4: GVec4L): this.type = { x = x * (lg4.x).toDouble; y = y * (lg4.y).toDouble; z = z * (lg4.z).toDouble; w = w * (lg4.w).toDouble; this }
    def *~(fg4: GVec4F): this.type = { x = x * (fg4.x).toDouble; y = y * (fg4.y).toDouble; z = z * (fg4.z).toDouble; w = w * (fg4.w).toDouble; this }
    def *~(dg4: GVec4D): this.type = { x = x * dg4.x; y = y * dg4.y; z = z * dg4.z; w = w * dg4.w; this }
    def *~(x0: Double, y0: Double, z0: Double, w0: Double): this.type = { x = x * x0; y = y * y0; z = z * z0; w = w * w0; this }
    def /~(x0: Double): this.type = { x = x / x0; y = y / x0; z = z / x0; w = w / x0; this }
    def /~(sg4: GVec4S): this.type = { x = x / (sg4.x).toDouble; y = y / (sg4.y).toDouble; z = z / (sg4.z).toDouble; w = w / (sg4.w).toDouble; this }
    def /~(ig4: GVec4I): this.type = { x = x / (ig4.x).toDouble; y = y / (ig4.y).toDouble; z = z / (ig4.z).toDouble; w = w / (ig4.w).toDouble; this }
    def /~(lg4: GVec4L): this.type = { x = x / (lg4.x).toDouble; y = y / (lg4.y).toDouble; z = z / (lg4.z).toDouble; w = w / (lg4.w).toDouble; this }
    def /~(fg4: GVec4F): this.type = { x = x / (fg4.x).toDouble; y = y / (fg4.y).toDouble; z = z / (fg4.z).toDouble; w = w / (fg4.w).toDouble; this }
    def /~(dg4: GVec4D): this.type = { x = x / dg4.x; y = y / dg4.y; z = z / dg4.z; w = w / dg4.w; this }
    def /~(x0: Double, y0: Double, z0: Double, w0: Double): this.type = { x = x / x0; y = y / y0; z = z / z0; w = w / w0; this }
    def maxEq(x0: Double): this.type = { x = math.max(x,x0); y = math.max(y,x0); z = math.max(z,x0); w = math.max(w,x0); this }
    def maxEq(sg4: GVec4S): this.type = { x = math.max(x,(sg4.x).toDouble); y = math.max(y,(sg4.y).toDouble); z = math.max(z,(sg4.z).toDouble); w = math.max(w,(sg4.w).toDouble); this }
    def maxEq(ig4: GVec4I): this.type = { x = math.max(x,(ig4.x).toDouble); y = math.max(y,(ig4.y).toDouble); z = math.max(z,(ig4.z).toDouble); w = math.max(w,(ig4.w).toDouble); this }
    def maxEq(lg4: GVec4L): this.type = { x = math.max(x,(lg4.x).toDouble); y = math.max(y,(lg4.y).toDouble); z = math.max(z,(lg4.z).toDouble); w = math.max(w,(lg4.w).toDouble); this }
    def maxEq(fg4: GVec4F): this.type = { x = math.max(x,(fg4.x).toDouble); y = math.max(y,(fg4.y).toDouble); z = math.max(z,(fg4.z).toDouble); w = math.max(w,(fg4.w).toDouble); this }
    def maxEq(dg4: GVec4D): this.type = { x = math.max(x,dg4.x); y = math.max(y,dg4.y); z = math.max(z,dg4.z); w = math.max(w,dg4.w); this }
    def maxEq(x0: Double, y0: Double, z0: Double, w0: Double): this.type = { x = math.max(x,x0); y = math.max(y,y0); z = math.max(z,z0); w = math.max(w,w0); this }
    def minEq(x0: Double): this.type = { x = math.min(x,x0); y = math.min(y,x0); z = math.min(z,x0); w = math.min(w,x0); this }
    def minEq(sg4: GVec4S): this.type = { x = math.min(x,(sg4.x).toDouble); y = math.min(y,(sg4.y).toDouble); z = math.min(z,(sg4.z).toDouble); w = math.min(w,(sg4.w).toDouble); this }
    def minEq(ig4: GVec4I): this.type = { x = math.min(x,(ig4.x).toDouble); y = math.min(y,(ig4.y).toDouble); z = math.min(z,(ig4.z).toDouble); w = math.min(w,(ig4.w).toDouble); this }
    def minEq(lg4: GVec4L): this.type = { x = math.min(x,(lg4.x).toDouble); y = math.min(y,(lg4.y).toDouble); z = math.min(z,(lg4.z).toDouble); w = math.min(w,(lg4.w).toDouble); this }
    def minEq(fg4: GVec4F): this.type = { x = math.min(x,(fg4.x).toDouble); y = math.min(y,(fg4.y).toDouble); z = math.min(z,(fg4.z).toDouble); w = math.min(w,(fg4.w).toDouble); this }
    def minEq(dg4: GVec4D): this.type = { x = math.min(x,dg4.x); y = math.min(y,dg4.y); z = math.min(z,dg4.z); w = math.min(w,dg4.w); this }
    def minEq(x0: Double, y0: Double, z0: Double, w0: Double): this.type = { x = math.min(x,x0); y = math.min(y,y0); z = math.min(z,z0); w = math.min(w,w0); this }
    def operateEq(sg4: GVec4S)(fun: (Double,Double)=>Double) = { x = fun(x,(sg4.x).toDouble); y = fun(y,(sg4.y).toDouble); z = fun(z,(sg4.z).toDouble); w = fun(w,(sg4.w).toDouble); this }
    def operateEq(ig4: GVec4I)(fun: (Double,Double)=>Double) = { x = fun(x,(ig4.x).toDouble); y = fun(y,(ig4.y).toDouble); z = fun(z,(ig4.z).toDouble); w = fun(w,(ig4.w).toDouble); this }
    def operateEq(lg4: GVec4L)(fun: (Double,Double)=>Double) = { x = fun(x,(lg4.x).toDouble); y = fun(y,(lg4.y).toDouble); z = fun(z,(lg4.z).toDouble); w = fun(w,(lg4.w).toDouble); this }
    def operateEq(fg4: GVec4F)(fun: (Double,Double)=>Double) = { x = fun(x,(fg4.x).toDouble); y = fun(y,(fg4.y).toDouble); z = fun(z,(fg4.z).toDouble); w = fun(w,(fg4.w).toDouble); this }
    def operateEq(dg4: GVec4D)(fun: (Double,Double)=>Double) = { x = fun(x,dg4.x); y = fun(y,dg4.y); z = fun(z,dg4.z); w = fun(w,dg4.w); this }
    def **~(sg44: GMat4S) = {val x0 = x*(sg44.xx).toDouble+y*(sg44.yx).toDouble+z*(sg44.zx).toDouble+w*(sg44.wx).toDouble; val y0 = x*(sg44.xy).toDouble+y*(sg44.yy).toDouble+z*(sg44.zy).toDouble+w*(sg44.wy).toDouble; val z0 = x*(sg44.xz).toDouble+y*(sg44.yz).toDouble+z*(sg44.zz).toDouble+w*(sg44.wz).toDouble; val w0 = x*(sg44.xw).toDouble+y*(sg44.yw).toDouble+z*(sg44.zw).toDouble+w*(sg44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(sg44: GMat4S) = {val x0 = x*(sg44.xx).toDouble+y*(sg44.xy).toDouble+z*(sg44.xz).toDouble+w*(sg44.xw).toDouble; val y0 = x*(sg44.yx).toDouble+y*(sg44.yy).toDouble+z*(sg44.yz).toDouble+w*(sg44.yw).toDouble; val z0 = x*(sg44.zx).toDouble+y*(sg44.zy).toDouble+z*(sg44.zz).toDouble+w*(sg44.zw).toDouble; val w0 = x*(sg44.wx).toDouble+y*(sg44.wy).toDouble+z*(sg44.wz).toDouble+w*(sg44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~(ig44: GMat4I) = {val x0 = x*(ig44.xx).toDouble+y*(ig44.yx).toDouble+z*(ig44.zx).toDouble+w*(ig44.wx).toDouble; val y0 = x*(ig44.xy).toDouble+y*(ig44.yy).toDouble+z*(ig44.zy).toDouble+w*(ig44.wy).toDouble; val z0 = x*(ig44.xz).toDouble+y*(ig44.yz).toDouble+z*(ig44.zz).toDouble+w*(ig44.wz).toDouble; val w0 = x*(ig44.xw).toDouble+y*(ig44.yw).toDouble+z*(ig44.zw).toDouble+w*(ig44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(ig44: GMat4I) = {val x0 = x*(ig44.xx).toDouble+y*(ig44.xy).toDouble+z*(ig44.xz).toDouble+w*(ig44.xw).toDouble; val y0 = x*(ig44.yx).toDouble+y*(ig44.yy).toDouble+z*(ig44.yz).toDouble+w*(ig44.yw).toDouble; val z0 = x*(ig44.zx).toDouble+y*(ig44.zy).toDouble+z*(ig44.zz).toDouble+w*(ig44.zw).toDouble; val w0 = x*(ig44.wx).toDouble+y*(ig44.wy).toDouble+z*(ig44.wz).toDouble+w*(ig44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~(lg44: GMat4L) = {val x0 = x*(lg44.xx).toDouble+y*(lg44.yx).toDouble+z*(lg44.zx).toDouble+w*(lg44.wx).toDouble; val y0 = x*(lg44.xy).toDouble+y*(lg44.yy).toDouble+z*(lg44.zy).toDouble+w*(lg44.wy).toDouble; val z0 = x*(lg44.xz).toDouble+y*(lg44.yz).toDouble+z*(lg44.zz).toDouble+w*(lg44.wz).toDouble; val w0 = x*(lg44.xw).toDouble+y*(lg44.yw).toDouble+z*(lg44.zw).toDouble+w*(lg44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(lg44: GMat4L) = {val x0 = x*(lg44.xx).toDouble+y*(lg44.xy).toDouble+z*(lg44.xz).toDouble+w*(lg44.xw).toDouble; val y0 = x*(lg44.yx).toDouble+y*(lg44.yy).toDouble+z*(lg44.yz).toDouble+w*(lg44.yw).toDouble; val z0 = x*(lg44.zx).toDouble+y*(lg44.zy).toDouble+z*(lg44.zz).toDouble+w*(lg44.zw).toDouble; val w0 = x*(lg44.wx).toDouble+y*(lg44.wy).toDouble+z*(lg44.wz).toDouble+w*(lg44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~(fg44: GMat4F) = {val x0 = x*(fg44.xx).toDouble+y*(fg44.yx).toDouble+z*(fg44.zx).toDouble+w*(fg44.wx).toDouble; val y0 = x*(fg44.xy).toDouble+y*(fg44.yy).toDouble+z*(fg44.zy).toDouble+w*(fg44.wy).toDouble; val z0 = x*(fg44.xz).toDouble+y*(fg44.yz).toDouble+z*(fg44.zz).toDouble+w*(fg44.wz).toDouble; val w0 = x*(fg44.xw).toDouble+y*(fg44.yw).toDouble+z*(fg44.zw).toDouble+w*(fg44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(fg44: GMat4F) = {val x0 = x*(fg44.xx).toDouble+y*(fg44.xy).toDouble+z*(fg44.xz).toDouble+w*(fg44.xw).toDouble; val y0 = x*(fg44.yx).toDouble+y*(fg44.yy).toDouble+z*(fg44.yz).toDouble+w*(fg44.yw).toDouble; val z0 = x*(fg44.zx).toDouble+y*(fg44.zy).toDouble+z*(fg44.zz).toDouble+w*(fg44.zw).toDouble; val w0 = x*(fg44.wx).toDouble+y*(fg44.wy).toDouble+z*(fg44.wz).toDouble+w*(fg44.ww).toDouble; x = x0; y = y0; z = z0; w = w0; this }
    def **~(dg44: GMat4D) = {val x0 = x*dg44.xx+y*dg44.yx+z*dg44.zx+w*dg44.wx; val y0 = x*dg44.xy+y*dg44.yy+z*dg44.zy+w*dg44.wy; val z0 = x*dg44.xz+y*dg44.yz+z*dg44.zz+w*dg44.wz; val w0 = x*dg44.xw+y*dg44.yw+z*dg44.zw+w*dg44.ww; x = x0; y = y0; z = z0; w = w0; this }
    def **~:(dg44: GMat4D) = {val x0 = x*dg44.xx+y*dg44.xy+z*dg44.xz+w*dg44.xw; val y0 = x*dg44.yx+y*dg44.yy+z*dg44.yz+w*dg44.yw; val z0 = x*dg44.zx+y*dg44.zy+z*dg44.zz+w*dg44.zw; val w0 = x*dg44.wx+y*dg44.wy+z*dg44.wz+w*dg44.ww; x = x0; y = y0; z = z0; w = w0; this }
  } // class AVec4D

  object AVec4D {
    def apply(x0: Double, y0: Double, z0: Double, w0: Double): AVec4D = new MVec4D(x0, y0, z0, w0)
    def parse(str: String): AVec4D = IVec4D.parse(str).mut
    def zero: AVec4D = MVec4D.zero
    def xUnit: AVec4D = MVec4D.xUnit
    def yUnit: AVec4D = MVec4D.yUnit
    def zUnit: AVec4D = MVec4D.zUnit
    def wUnit: AVec4D = MVec4D.wUnit
  } // object AVec4D


  final class MVec4S(var x: Short, var y: Short, var z: Short, var w: Short) extends AVec4S {
    override def clone(): MVec4S = new MVec4S(x, y, z, w)
    override def copy(x0: Short = x, y0: Short = y, z0: Short = z, w0: Short = w): MVec4S = new MVec4S(x0, y0, z0, w0)
    override def trim: MVec3S = new MVec3S(x, y, z)
    override def toI: MVec4I = new MVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def toL: MVec4L = new MVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class MVec4S

  object MVec4S {
    def apply(x0: Short, y0: Short, z0: Short, w0: Short): MVec4S = new MVec4S(x0, y0, z0, w0)
    def parse(str: String): MVec4S = IVec4S.parse(str).mut
    def zero = new MVec4S(0, 0, 0, 0)
    def xUnit = new MVec4S(1, 0, 0, 0)
    def yUnit = new MVec4S(0, 1, 0, 0)
    def zUnit = new MVec4S(0, 0, 1, 0)
    def wUnit = new MVec4S(0, 0, 0, 1)
  } // object MVec4S


  final class MVec4I(var x: Int, var y: Int, var z: Int, var w: Int) extends AVec4I {
    override def clone(): MVec4I = new MVec4I(x, y, z, w)
    override def toS: MVec4S = new MVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def copy(x0: Int = x, y0: Int = y, z0: Int = z, w0: Int = w): MVec4I = new MVec4I(x0, y0, z0, w0)
    override def trim: MVec3I = new MVec3I(x, y, z)
    override def toL: MVec4L = new MVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class MVec4I

  object MVec4I {
    def apply(x0: Int, y0: Int, z0: Int, w0: Int): MVec4I = new MVec4I(x0, y0, z0, w0)
    def parse(str: String): MVec4I = IVec4I.parse(str).mut
    def zero = new MVec4I(0, 0, 0, 0)
    def xUnit = new MVec4I(1, 0, 0, 0)
    def yUnit = new MVec4I(0, 1, 0, 0)
    def zUnit = new MVec4I(0, 0, 1, 0)
    def wUnit = new MVec4I(0, 0, 0, 1)
  } // object MVec4I


  final class MVec4L(var x: Long, var y: Long, var z: Long, var w: Long) extends AVec4L {
    override def clone(): MVec4L = new MVec4L(x, y, z, w)
    override def toS: MVec4S = new MVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def toI: MVec4I = new MVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def copy(x0: Long = x, y0: Long = y, z0: Long = z, w0: Long = w): MVec4L = new MVec4L(x0, y0, z0, w0)
    override def trim: MVec3L = new MVec3L(x, y, z)
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class MVec4L

  object MVec4L {
    def apply(x0: Long, y0: Long, z0: Long, w0: Long): MVec4L = new MVec4L(x0, y0, z0, w0)
    def parse(str: String): MVec4L = IVec4L.parse(str).mut
    def zero = new MVec4L(0, 0, 0, 0)
    def xUnit = new MVec4L(1, 0, 0, 0)
    def yUnit = new MVec4L(0, 1, 0, 0)
    def zUnit = new MVec4L(0, 0, 1, 0)
    def wUnit = new MVec4L(0, 0, 0, 1)
  } // object MVec4L


  final class MVec4F(var x: Float, var y: Float, var z: Float, var w: Float) extends AVec4F {
    override def clone(): MVec4F = new MVec4F(x, y, z, w)
    override def toS: MVec4S = new MVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: MVec4I = new MVec4I(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toL: MVec4L = new MVec4L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble), math.round((w).toDouble))
    override def copy(x0: Float = x, y0: Float = y, z0: Float = z, w0: Float = w): MVec4F = new MVec4F(x0, y0, z0, w0)
    override def trim: MVec3F = new MVec3F(x, y, z)
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class MVec4F

  object MVec4F {
    def apply(x0: Float, y0: Float, z0: Float, w0: Float): MVec4F = new MVec4F(x0, y0, z0, w0)
    def parse(str: String): MVec4F = IVec4F.parse(str).mut
    def zero = new MVec4F(0, 0, 0, 0)
    def xUnit = new MVec4F(1, 0, 0, 0)
    def yUnit = new MVec4F(0, 1, 0, 0)
    def zUnit = new MVec4F(0, 0, 1, 0)
    def wUnit = new MVec4F(0, 0, 0, 1)
  } // object MVec4F


  final class MVec4D(var x: Double, var y: Double, var z: Double, var w: Double) extends AVec4D {
    override def clone(): MVec4D = new MVec4D(x, y, z, w)
    override def toS: MVec4S = new MVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: MVec4I = new MVec4I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt, (math.round(w)).toInt)
    override def toL: MVec4L = new MVec4L(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def copy(x0: Double = x, y0: Double = y, z0: Double = z, w0: Double = w): MVec4D = new MVec4D(x0, y0, z0, w0)
    override def trim: MVec3D = new MVec3D(x, y, z)
  } // class MVec4D

  object MVec4D {
    def apply(x0: Double, y0: Double, z0: Double, w0: Double): MVec4D = new MVec4D(x0, y0, z0, w0)
    def parse(str: String): MVec4D = IVec4D.parse(str).mut
    def zero = new MVec4D(0, 0, 0, 0)
    def xUnit = new MVec4D(1, 0, 0, 0)
    def yUnit = new MVec4D(0, 1, 0, 0)
    def zUnit = new MVec4D(0, 0, 1, 0)
    def wUnit = new MVec4D(0, 0, 0, 1)
  } // object MVec4D


  class BVec4S(data: Array[Short]) extends AVec4S with Iterator[BVec4S] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Short) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Short) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Short) { data(index+2) = z0 }
    def w = data(index+3)
    def w_=(w0: Short) { data(index+3) = w0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+" ; "+w+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BVec4S(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toI: MVec4I = new MVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def toL: MVec4L = new MVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class BVec4S

  object BVec4S {
    def apply(a0: Array[Short]) = new BVec4S(a0)
    def apply(i0: Int) = new BVec4S(new Array[Short](i0*4))
  } // object BVec4S


  class BVec4I(data: Array[Int]) extends AVec4I with Iterator[BVec4I] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Int) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Int) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Int) { data(index+2) = z0 }
    def w = data(index+3)
    def w_=(w0: Int) { data(index+3) = w0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+" ; "+w+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BVec4I(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec4S = new MVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def toL: MVec4L = new MVec4L((x).toLong, (y).toLong, (z).toLong, (w).toLong)
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class BVec4I

  object BVec4I {
    def apply(a0: Array[Int]) = new BVec4I(a0)
    def apply(i0: Int) = new BVec4I(new Array[Int](i0*4))
  } // object BVec4I


  class BVec4L(data: Array[Long]) extends AVec4L with Iterator[BVec4L] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Long) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Long) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Long) { data(index+2) = z0 }
    def w = data(index+3)
    def w_=(w0: Long) { data(index+3) = w0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+" ; "+w+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BVec4L(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec4S = new MVec4S((x).toShort, (y).toShort, (z).toShort, (w).toShort)
    override def toI: MVec4I = new MVec4I((x).toInt, (y).toInt, (z).toInt, (w).toInt)
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class BVec4L

  object BVec4L {
    def apply(a0: Array[Long]) = new BVec4L(a0)
    def apply(i0: Int) = new BVec4L(new Array[Long](i0*4))
  } // object BVec4L


  class BVec4F(data: Array[Float]) extends AVec4F with Iterator[BVec4F] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Float) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Float) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Float) { data(index+2) = z0 }
    def w = data(index+3)
    def w_=(w0: Float) { data(index+3) = w0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+" ; "+w+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BVec4F(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec4S = new MVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: MVec4I = new MVec4I(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toL: MVec4L = new MVec4L(math.round((x).toDouble), math.round((y).toDouble), math.round((z).toDouble), math.round((w).toDouble))
    override def toD: MVec4D = new MVec4D((x).toDouble, (y).toDouble, (z).toDouble, (w).toDouble)
  } // class BVec4F

  object BVec4F {
    def apply(a0: Array[Float]) = new BVec4F(a0)
    def apply(i0: Int) = new BVec4F(new Array[Float](i0*4))
  } // object BVec4F


  class BVec4D(data: Array[Double]) extends AVec4D with Iterator[BVec4D] {
    var index = 0
    private var fresh = true
    def x = data(index+0)
    def x_=(x0: Double) { data(index+0) = x0 }
    def y = data(index+1)
    def y_=(y0: Double) { data(index+1) = y0 }
    def z = data(index+2)
    def z_=(z0: Double) { data(index+2) = z0 }
    def w = data(index+3)
    def w_=(w0: Double) { data(index+3) = w0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+x+" ; "+y+" ; "+z+" ; "+w+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BVec4D(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MVec4S = new MVec4S((math.round(x)).toShort, (math.round(y)).toShort, (math.round(z)).toShort, (math.round(w)).toShort)
    override def toI: MVec4I = new MVec4I((math.round(x)).toInt, (math.round(y)).toInt, (math.round(z)).toInt, (math.round(w)).toInt)
    override def toL: MVec4L = new MVec4L(math.round(x), math.round(y), math.round(z), math.round(w))
    override def toF: MVec4F = new MVec4F((x).toFloat, (y).toFloat, (z).toFloat, (w).toFloat)
  } // class BVec4D

  object BVec4D {
    def apply(a0: Array[Double]) = new BVec4D(a0)
    def apply(i0: Int) = new BVec4D(new Array[Double](i0*4))
  } // object BVec4D


}



package matrix {
  import scalar._
  import vector._
  abstract class GMat2S extends Cloneable {
    def xx: Short
    def xy: Short
    def yx: Short
    def yy: Short
    override def toString = "["+xx+", "+xy+" ; "+yx+", "+yy+"]"
    override def hashCode = (((yy)*16777619 ^ yx)*16777619 ^ xy)*16777619 ^ xx
    override def equals(any: Any) = any match { case sg22: GMat2S => {xx==sg22.xx && xy==sg22.xy && yx==sg22.yx && yy==sg22.yy }; case ig22: GMat2I => {xx==ig22.xx && xy==ig22.xy && yx==ig22.yx && yy==ig22.yy }; case lg22: GMat2L => {xx==lg22.xx && xy==lg22.xy && yx==lg22.yx && yy==lg22.yy }; case fg22: GMat2F => {xx==fg22.xx && xy==fg22.xy && yx==fg22.yx && yy==fg22.yy }; case dg22: GMat2D => {xx==dg22.xx && xy==dg22.xy && yx==dg22.yx && yy==dg22.yy }; case _ => false }
    override def clone(): GMat2S = new IMat2S(xx, xy, yx, yy)
    def copy(xx0: Short = xx, xy0: Short = xy, yx0: Short = yx, yy0: Short = yy): GMat2S = new IMat2S(xx0, xy0, yx0, yy0)
    def pad(padding: Short = 1): GMat3S = new IMat3S(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def toI: GMat2I = new IMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    def toL: GMat2L = new IMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    def toF: GMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    def toD: GMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def imm = new IMat2S(xx, xy, yx, yy)
    def mut = new MMat2S(xx, xy, yx, yy)
    def unary_-() = new IMat2S((-xx).toShort, (-xy).toShort, (-yx).toShort, (-yy).toShort)
    def +(x0: Short) = new IMat2S((xx + x0).toShort, (xy + x0).toShort, (yx + x0).toShort, (yy + x0).toShort)
    def +(x0: Int) = new IMat2I((xx).toInt + x0, (xy).toInt + x0, (yx).toInt + x0, (yy).toInt + x0)
    def +(x0: Long) = new IMat2L((xx).toLong + x0, (xy).toLong + x0, (yx).toLong + x0, (yy).toLong + x0)
    def +(x0: Float) = new IMat2F((xx).toFloat + x0, (xy).toFloat + x0, (yx).toFloat + x0, (yy).toFloat + x0)
    def +(x0: Double) = new IMat2D((xx).toDouble + x0, (xy).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0)
    def +(sg22: GMat2S) = new IMat2S((xx + sg22.xx).toShort, (xy + sg22.xy).toShort, (yx + sg22.yx).toShort, (yy + sg22.yy).toShort)
    def +(xx0: Short, xy0: Short, yx0: Short, yy0: Short) = new IMat2S((xx + xx0).toShort, (xy + xy0).toShort, (yx + yx0).toShort, (yy + yy0).toShort)
    def +(ig22: GMat2I) = new IMat2I((xx).toInt + ig22.xx, (xy).toInt + ig22.xy, (yx).toInt + ig22.yx, (yy).toInt + ig22.yy)
    def +(lg22: GMat2L) = new IMat2L((xx).toLong + lg22.xx, (xy).toLong + lg22.xy, (yx).toLong + lg22.yx, (yy).toLong + lg22.yy)
    def +(fg22: GMat2F) = new IMat2F((xx).toFloat + fg22.xx, (xy).toFloat + fg22.xy, (yx).toFloat + fg22.yx, (yy).toFloat + fg22.yy)
    def +(dg22: GMat2D) = new IMat2D((xx).toDouble + dg22.xx, (xy).toDouble + dg22.xy, (yx).toDouble + dg22.yx, (yy).toDouble + dg22.yy)
    def -(x0: Short) = new IMat2S((xx - x0).toShort, (xy - x0).toShort, (yx - x0).toShort, (yy - x0).toShort)
    def -(x0: Int) = new IMat2I((xx).toInt - x0, (xy).toInt - x0, (yx).toInt - x0, (yy).toInt - x0)
    def -(x0: Long) = new IMat2L((xx).toLong - x0, (xy).toLong - x0, (yx).toLong - x0, (yy).toLong - x0)
    def -(x0: Float) = new IMat2F((xx).toFloat - x0, (xy).toFloat - x0, (yx).toFloat - x0, (yy).toFloat - x0)
    def -(x0: Double) = new IMat2D((xx).toDouble - x0, (xy).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0)
    def -(sg22: GMat2S) = new IMat2S((xx - sg22.xx).toShort, (xy - sg22.xy).toShort, (yx - sg22.yx).toShort, (yy - sg22.yy).toShort)
    def -(xx0: Short, xy0: Short, yx0: Short, yy0: Short) = new IMat2S((xx - xx0).toShort, (xy - xy0).toShort, (yx - yx0).toShort, (yy - yy0).toShort)
    def -(ig22: GMat2I) = new IMat2I((xx).toInt - ig22.xx, (xy).toInt - ig22.xy, (yx).toInt - ig22.yx, (yy).toInt - ig22.yy)
    def -(lg22: GMat2L) = new IMat2L((xx).toLong - lg22.xx, (xy).toLong - lg22.xy, (yx).toLong - lg22.yx, (yy).toLong - lg22.yy)
    def -(fg22: GMat2F) = new IMat2F((xx).toFloat - fg22.xx, (xy).toFloat - fg22.xy, (yx).toFloat - fg22.yx, (yy).toFloat - fg22.yy)
    def -(dg22: GMat2D) = new IMat2D((xx).toDouble - dg22.xx, (xy).toDouble - dg22.xy, (yx).toDouble - dg22.yx, (yy).toDouble - dg22.yy)
    def *(x0: Short) = new IMat2S((xx * x0).toShort, (xy * x0).toShort, (yx * x0).toShort, (yy * x0).toShort)
    def *(x0: Int) = new IMat2I((xx).toInt * x0, (xy).toInt * x0, (yx).toInt * x0, (yy).toInt * x0)
    def *(x0: Long) = new IMat2L((xx).toLong * x0, (xy).toLong * x0, (yx).toLong * x0, (yy).toLong * x0)
    def *(x0: Float) = new IMat2F((xx).toFloat * x0, (xy).toFloat * x0, (yx).toFloat * x0, (yy).toFloat * x0)
    def *(x0: Double) = new IMat2D((xx).toDouble * x0, (xy).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0)
    def *(sg22: GMat2S) = new IMat2S((xx * sg22.xx).toShort, (xy * sg22.xy).toShort, (yx * sg22.yx).toShort, (yy * sg22.yy).toShort)
    def *(xx0: Short, xy0: Short, yx0: Short, yy0: Short) = new IMat2S((xx * xx0).toShort, (xy * xy0).toShort, (yx * yx0).toShort, (yy * yy0).toShort)
    def *(ig22: GMat2I) = new IMat2I((xx).toInt * ig22.xx, (xy).toInt * ig22.xy, (yx).toInt * ig22.yx, (yy).toInt * ig22.yy)
    def *(lg22: GMat2L) = new IMat2L((xx).toLong * lg22.xx, (xy).toLong * lg22.xy, (yx).toLong * lg22.yx, (yy).toLong * lg22.yy)
    def *(fg22: GMat2F) = new IMat2F((xx).toFloat * fg22.xx, (xy).toFloat * fg22.xy, (yx).toFloat * fg22.yx, (yy).toFloat * fg22.yy)
    def *(dg22: GMat2D) = new IMat2D((xx).toDouble * dg22.xx, (xy).toDouble * dg22.xy, (yx).toDouble * dg22.yx, (yy).toDouble * dg22.yy)
    def /(x0: Short) = new IMat2S((xx / x0).toShort, (xy / x0).toShort, (yx / x0).toShort, (yy / x0).toShort)
    def /(x0: Int) = new IMat2I((xx).toInt / x0, (xy).toInt / x0, (yx).toInt / x0, (yy).toInt / x0)
    def /(x0: Long) = new IMat2L((xx).toLong / x0, (xy).toLong / x0, (yx).toLong / x0, (yy).toLong / x0)
    def /(x0: Float) = new IMat2F((xx).toFloat / x0, (xy).toFloat / x0, (yx).toFloat / x0, (yy).toFloat / x0)
    def /(x0: Double) = new IMat2D((xx).toDouble / x0, (xy).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0)
    def /(sg22: GMat2S) = new IMat2S((xx / sg22.xx).toShort, (xy / sg22.xy).toShort, (yx / sg22.yx).toShort, (yy / sg22.yy).toShort)
    def /(xx0: Short, xy0: Short, yx0: Short, yy0: Short) = new IMat2S((xx / xx0).toShort, (xy / xy0).toShort, (yx / yx0).toShort, (yy / yy0).toShort)
    def /(ig22: GMat2I) = new IMat2I((xx).toInt / ig22.xx, (xy).toInt / ig22.xy, (yx).toInt / ig22.yx, (yy).toInt / ig22.yy)
    def /(lg22: GMat2L) = new IMat2L((xx).toLong / lg22.xx, (xy).toLong / lg22.xy, (yx).toLong / lg22.yx, (yy).toLong / lg22.yy)
    def /(fg22: GMat2F) = new IMat2F((xx).toFloat / fg22.xx, (xy).toFloat / fg22.xy, (yx).toFloat / fg22.yx, (yy).toFloat / fg22.yy)
    def /(dg22: GMat2D) = new IMat2D((xx).toDouble / dg22.xx, (xy).toDouble / dg22.xy, (yx).toDouble / dg22.yx, (yy).toDouble / dg22.yy)
    def max(x0: Short) = new IMat2S((math.max(xx,x0)).toShort, (math.max(xy,x0)).toShort, (math.max(yx,x0)).toShort, (math.max(yy,x0)).toShort)
    def max(x0: Int) = new IMat2I(math.max((xx).toInt,x0), math.max((xy).toInt,x0), math.max((yx).toInt,x0), math.max((yy).toInt,x0))
    def max(x0: Long) = new IMat2L(math.max((xx).toLong,x0), math.max((xy).toLong,x0), math.max((yx).toLong,x0), math.max((yy).toLong,x0))
    def max(x0: Float) = new IMat2F(math.max((xx).toFloat,x0), math.max((xy).toFloat,x0), math.max((yx).toFloat,x0), math.max((yy).toFloat,x0))
    def max(x0: Double) = new IMat2D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0))
    def max(sg22: GMat2S) = new IMat2S((math.max(xx,sg22.xx)).toShort, (math.max(xy,sg22.xy)).toShort, (math.max(yx,sg22.yx)).toShort, (math.max(yy,sg22.yy)).toShort)
    def max(xx0: Short, xy0: Short, yx0: Short, yy0: Short) = new IMat2S((math.max(xx,xx0)).toShort, (math.max(xy,xy0)).toShort, (math.max(yx,yx0)).toShort, (math.max(yy,yy0)).toShort)
    def max(ig22: GMat2I) = new IMat2I(math.max((xx).toInt,ig22.xx), math.max((xy).toInt,ig22.xy), math.max((yx).toInt,ig22.yx), math.max((yy).toInt,ig22.yy))
    def max(lg22: GMat2L) = new IMat2L(math.max((xx).toLong,lg22.xx), math.max((xy).toLong,lg22.xy), math.max((yx).toLong,lg22.yx), math.max((yy).toLong,lg22.yy))
    def max(fg22: GMat2F) = new IMat2F(math.max((xx).toFloat,fg22.xx), math.max((xy).toFloat,fg22.xy), math.max((yx).toFloat,fg22.yx), math.max((yy).toFloat,fg22.yy))
    def max(dg22: GMat2D) = new IMat2D(math.max((xx).toDouble,dg22.xx), math.max((xy).toDouble,dg22.xy), math.max((yx).toDouble,dg22.yx), math.max((yy).toDouble,dg22.yy))
    def min(x0: Short) = new IMat2S((math.min(xx,x0)).toShort, (math.min(xy,x0)).toShort, (math.min(yx,x0)).toShort, (math.min(yy,x0)).toShort)
    def min(x0: Int) = new IMat2I(math.min((xx).toInt,x0), math.min((xy).toInt,x0), math.min((yx).toInt,x0), math.min((yy).toInt,x0))
    def min(x0: Long) = new IMat2L(math.min((xx).toLong,x0), math.min((xy).toLong,x0), math.min((yx).toLong,x0), math.min((yy).toLong,x0))
    def min(x0: Float) = new IMat2F(math.min((xx).toFloat,x0), math.min((xy).toFloat,x0), math.min((yx).toFloat,x0), math.min((yy).toFloat,x0))
    def min(x0: Double) = new IMat2D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0))
    def min(sg22: GMat2S) = new IMat2S((math.min(xx,sg22.xx)).toShort, (math.min(xy,sg22.xy)).toShort, (math.min(yx,sg22.yx)).toShort, (math.min(yy,sg22.yy)).toShort)
    def min(xx0: Short, xy0: Short, yx0: Short, yy0: Short) = new IMat2S((math.min(xx,xx0)).toShort, (math.min(xy,xy0)).toShort, (math.min(yx,yx0)).toShort, (math.min(yy,yy0)).toShort)
    def min(ig22: GMat2I) = new IMat2I(math.min((xx).toInt,ig22.xx), math.min((xy).toInt,ig22.xy), math.min((yx).toInt,ig22.yx), math.min((yy).toInt,ig22.yy))
    def min(lg22: GMat2L) = new IMat2L(math.min((xx).toLong,lg22.xx), math.min((xy).toLong,lg22.xy), math.min((yx).toLong,lg22.yx), math.min((yy).toLong,lg22.yy))
    def min(fg22: GMat2F) = new IMat2F(math.min((xx).toFloat,fg22.xx), math.min((xy).toFloat,fg22.xy), math.min((yx).toFloat,fg22.yx), math.min((yy).toFloat,fg22.yy))
    def min(dg22: GMat2D) = new IMat2D(math.min((xx).toDouble,dg22.xx), math.min((xy).toDouble,dg22.xy), math.min((yx).toDouble,dg22.yx), math.min((yy).toDouble,dg22.yy))
    def operate(sg22: GMat2S)(fun: (Short,Short)=>Short) = new IMat2S((fun(xx,sg22.xx)).toShort, (fun(xy,sg22.xy)).toShort, (fun(yx,sg22.yx)).toShort, (fun(yy,sg22.yy)).toShort)
    def operate(ig22: GMat2I)(fun: (Int,Int)=>Int) = new IMat2I(fun((xx).toInt,ig22.xx), fun((xy).toInt,ig22.xy), fun((yx).toInt,ig22.yx), fun((yy).toInt,ig22.yy))
    def operate(lg22: GMat2L)(fun: (Long,Long)=>Long) = new IMat2L(fun((xx).toLong,lg22.xx), fun((xy).toLong,lg22.xy), fun((yx).toLong,lg22.yx), fun((yy).toLong,lg22.yy))
    def operate(fg22: GMat2F)(fun: (Float,Float)=>Float) = new IMat2F(fun((xx).toFloat,fg22.xx), fun((xy).toFloat,fg22.xy), fun((yx).toFloat,fg22.yx), fun((yy).toFloat,fg22.yy))
    def operate(dg22: GMat2D)(fun: (Double,Double)=>Double) = new IMat2D(fun((xx).toDouble,dg22.xx), fun((xy).toDouble,dg22.xy), fun((yx).toDouble,dg22.yx), fun((yy).toDouble,dg22.yy))
    def ===(sg22: GMat2S) = xx==sg22.xx && xy==sg22.xy && yx==sg22.yx && yy==sg22.yy
    def ===(xx0: Short, xy0: Short, yx0: Short, yy0: Short) = xx==xx0 && xy==xy0 && yx==yx0 && yy==yy0
    def det = (xx*yy - xy*yx).toShort
    def trace = new IVec2S(xx, yy)
    def xRow = new IVec2S(xx, xy)
    def xCol = new IVec2S(xx, yx)
    def yRow = new IVec2S(yx, yy)
    def yCol = new IVec2S(xy, yy)
    def t = new IMat2S(xx, yx, xy, yy)
    def **(sg2: GVec2S) = new IVec2S((xx*sg2.x+xy*sg2.y).toShort, (yx*sg2.x+yy*sg2.y).toShort)
    def **(ig2: GVec2I) = new IVec2I((xx).toInt*ig2.x+(xy).toInt*ig2.y, (yx).toInt*ig2.x+(yy).toInt*ig2.y)
    def **(lg2: GVec2L) = new IVec2L((xx).toLong*lg2.x+(xy).toLong*lg2.y, (yx).toLong*lg2.x+(yy).toLong*lg2.y)
    def **(fg2: GVec2F) = new IVec2F((xx).toFloat*fg2.x+(xy).toFloat*fg2.y, (yx).toFloat*fg2.x+(yy).toFloat*fg2.y)
    def **(dg2: GVec2D) = new IVec2D((xx).toDouble*dg2.x+(xy).toDouble*dg2.y, (yx).toDouble*dg2.x+(yy).toDouble*dg2.y)
    def **(sg22: GMat2S) = new IMat2S((xx*sg22.xx+xy*sg22.yx).toShort, (xx*sg22.xy+xy*sg22.yy).toShort, (yx*sg22.xx+yy*sg22.yx).toShort, (yx*sg22.xy+yy*sg22.yy).toShort)
    def **(ig22: GMat2I) = new IMat2I((xx).toInt*ig22.xx+(xy).toInt*ig22.yx, (xx).toInt*ig22.xy+(xy).toInt*ig22.yy, (yx).toInt*ig22.xx+(yy).toInt*ig22.yx, (yx).toInt*ig22.xy+(yy).toInt*ig22.yy)
    def **(lg22: GMat2L) = new IMat2L((xx).toLong*lg22.xx+(xy).toLong*lg22.yx, (xx).toLong*lg22.xy+(xy).toLong*lg22.yy, (yx).toLong*lg22.xx+(yy).toLong*lg22.yx, (yx).toLong*lg22.xy+(yy).toLong*lg22.yy)
    def **(fg22: GMat2F) = new IMat2F((xx).toFloat*fg22.xx+(xy).toFloat*fg22.yx, (xx).toFloat*fg22.xy+(xy).toFloat*fg22.yy, (yx).toFloat*fg22.xx+(yy).toFloat*fg22.yx, (yx).toFloat*fg22.xy+(yy).toFloat*fg22.yy)
    def **(dg22: GMat2D) = new IMat2D((xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx, (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy, (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx, (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy)
  } // class GMat2S

  object GMat2S {
    def apply(xx0: Short, xy0: Short, yx0: Short, yy0: Short): GMat2S = new IMat2S(xx0, xy0, yx0, yy0)
    def parse(str: String): GMat2S = IMat2S.parse(str)
    val identity: GMat2S = IMat2S.identity
    val zero: GMat2S = IMat2S.zero
    def traced(sg2: GVec2S) = new IMat2S(sg2.x, 0, 0, sg2.y)
  } // object GMat2S


  abstract class GMat2I extends Cloneable {
    def xx: Int
    def xy: Int
    def yx: Int
    def yy: Int
    override def toString = "["+xx+", "+xy+" ; "+yx+", "+yy+"]"
    override def hashCode = (((yy)*16777619 ^ yx)*16777619 ^ xy)*16777619 ^ xx
    override def equals(any: Any) = any match { case sg22: GMat2S => {xx==sg22.xx && xy==sg22.xy && yx==sg22.yx && yy==sg22.yy }; case ig22: GMat2I => {xx==ig22.xx && xy==ig22.xy && yx==ig22.yx && yy==ig22.yy }; case lg22: GMat2L => {xx==lg22.xx && xy==lg22.xy && yx==lg22.yx && yy==lg22.yy }; case fg22: GMat2F => {xx==fg22.xx && xy==fg22.xy && yx==fg22.yx && yy==fg22.yy }; case dg22: GMat2D => {xx==dg22.xx && xy==dg22.xy && yx==dg22.yx && yy==dg22.yy }; case _ => false }
    override def clone(): GMat2I = new IMat2I(xx, xy, yx, yy)
    def toS: GMat2S = new IMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    def copy(xx0: Int = xx, xy0: Int = xy, yx0: Int = yx, yy0: Int = yy): GMat2I = new IMat2I(xx0, xy0, yx0, yy0)
    def pad(padding: Int = 1): GMat3I = new IMat3I(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapI(fun: Int => Int) = new IMat2I(fun(xx), fun(xy), fun(yx), fun(yy))
    def toL: GMat2L = new IMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    def mapL(fun: Int => Long) = new IMat2L((fun(xx)).toLong, (fun(xy)).toLong, (fun(yx)).toLong, (fun(yy)).toLong)
    def toF: GMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    def mapF(fun: Int => Float) = new IMat2F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat)
    def toD: GMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def mapD(fun: Int => Double) = new IMat2D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble)
    def imm = new IMat2I(xx, xy, yx, yy)
    def mut = new MMat2I(xx, xy, yx, yy)
    def unary_-() = new IMat2I(-xx, -xy, -yx, -yy)
    def +(x0: Int) = new IMat2I(xx + x0, xy + x0, yx + x0, yy + x0)
    def +(x0: Long) = new IMat2L((xx).toLong + x0, (xy).toLong + x0, (yx).toLong + x0, (yy).toLong + x0)
    def +(x0: Float) = new IMat2F((xx).toFloat + x0, (xy).toFloat + x0, (yx).toFloat + x0, (yy).toFloat + x0)
    def +(x0: Double) = new IMat2D((xx).toDouble + x0, (xy).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0)
    def +(sg22: GMat2S) = new IMat2I(xx + (sg22.xx).toInt, xy + (sg22.xy).toInt, yx + (sg22.yx).toInt, yy + (sg22.yy).toInt)
    def +(ig22: GMat2I) = new IMat2I(xx + ig22.xx, xy + ig22.xy, yx + ig22.yx, yy + ig22.yy)
    def +(xx0: Int, xy0: Int, yx0: Int, yy0: Int) = new IMat2I(xx + xx0, xy + xy0, yx + yx0, yy + yy0)
    def +(lg22: GMat2L) = new IMat2L((xx).toLong + lg22.xx, (xy).toLong + lg22.xy, (yx).toLong + lg22.yx, (yy).toLong + lg22.yy)
    def +(fg22: GMat2F) = new IMat2F((xx).toFloat + fg22.xx, (xy).toFloat + fg22.xy, (yx).toFloat + fg22.yx, (yy).toFloat + fg22.yy)
    def +(dg22: GMat2D) = new IMat2D((xx).toDouble + dg22.xx, (xy).toDouble + dg22.xy, (yx).toDouble + dg22.yx, (yy).toDouble + dg22.yy)
    def -(x0: Int) = new IMat2I(xx - x0, xy - x0, yx - x0, yy - x0)
    def -(x0: Long) = new IMat2L((xx).toLong - x0, (xy).toLong - x0, (yx).toLong - x0, (yy).toLong - x0)
    def -(x0: Float) = new IMat2F((xx).toFloat - x0, (xy).toFloat - x0, (yx).toFloat - x0, (yy).toFloat - x0)
    def -(x0: Double) = new IMat2D((xx).toDouble - x0, (xy).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0)
    def -(sg22: GMat2S) = new IMat2I(xx - (sg22.xx).toInt, xy - (sg22.xy).toInt, yx - (sg22.yx).toInt, yy - (sg22.yy).toInt)
    def -(ig22: GMat2I) = new IMat2I(xx - ig22.xx, xy - ig22.xy, yx - ig22.yx, yy - ig22.yy)
    def -(xx0: Int, xy0: Int, yx0: Int, yy0: Int) = new IMat2I(xx - xx0, xy - xy0, yx - yx0, yy - yy0)
    def -(lg22: GMat2L) = new IMat2L((xx).toLong - lg22.xx, (xy).toLong - lg22.xy, (yx).toLong - lg22.yx, (yy).toLong - lg22.yy)
    def -(fg22: GMat2F) = new IMat2F((xx).toFloat - fg22.xx, (xy).toFloat - fg22.xy, (yx).toFloat - fg22.yx, (yy).toFloat - fg22.yy)
    def -(dg22: GMat2D) = new IMat2D((xx).toDouble - dg22.xx, (xy).toDouble - dg22.xy, (yx).toDouble - dg22.yx, (yy).toDouble - dg22.yy)
    def *(x0: Int) = new IMat2I(xx * x0, xy * x0, yx * x0, yy * x0)
    def *(x0: Long) = new IMat2L((xx).toLong * x0, (xy).toLong * x0, (yx).toLong * x0, (yy).toLong * x0)
    def *(x0: Float) = new IMat2F((xx).toFloat * x0, (xy).toFloat * x0, (yx).toFloat * x0, (yy).toFloat * x0)
    def *(x0: Double) = new IMat2D((xx).toDouble * x0, (xy).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0)
    def *(sg22: GMat2S) = new IMat2I(xx * (sg22.xx).toInt, xy * (sg22.xy).toInt, yx * (sg22.yx).toInt, yy * (sg22.yy).toInt)
    def *(ig22: GMat2I) = new IMat2I(xx * ig22.xx, xy * ig22.xy, yx * ig22.yx, yy * ig22.yy)
    def *(xx0: Int, xy0: Int, yx0: Int, yy0: Int) = new IMat2I(xx * xx0, xy * xy0, yx * yx0, yy * yy0)
    def *(lg22: GMat2L) = new IMat2L((xx).toLong * lg22.xx, (xy).toLong * lg22.xy, (yx).toLong * lg22.yx, (yy).toLong * lg22.yy)
    def *(fg22: GMat2F) = new IMat2F((xx).toFloat * fg22.xx, (xy).toFloat * fg22.xy, (yx).toFloat * fg22.yx, (yy).toFloat * fg22.yy)
    def *(dg22: GMat2D) = new IMat2D((xx).toDouble * dg22.xx, (xy).toDouble * dg22.xy, (yx).toDouble * dg22.yx, (yy).toDouble * dg22.yy)
    def /(x0: Int) = new IMat2I(xx / x0, xy / x0, yx / x0, yy / x0)
    def /(x0: Long) = new IMat2L((xx).toLong / x0, (xy).toLong / x0, (yx).toLong / x0, (yy).toLong / x0)
    def /(x0: Float) = new IMat2F((xx).toFloat / x0, (xy).toFloat / x0, (yx).toFloat / x0, (yy).toFloat / x0)
    def /(x0: Double) = new IMat2D((xx).toDouble / x0, (xy).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0)
    def /(sg22: GMat2S) = new IMat2I(xx / (sg22.xx).toInt, xy / (sg22.xy).toInt, yx / (sg22.yx).toInt, yy / (sg22.yy).toInt)
    def /(ig22: GMat2I) = new IMat2I(xx / ig22.xx, xy / ig22.xy, yx / ig22.yx, yy / ig22.yy)
    def /(xx0: Int, xy0: Int, yx0: Int, yy0: Int) = new IMat2I(xx / xx0, xy / xy0, yx / yx0, yy / yy0)
    def /(lg22: GMat2L) = new IMat2L((xx).toLong / lg22.xx, (xy).toLong / lg22.xy, (yx).toLong / lg22.yx, (yy).toLong / lg22.yy)
    def /(fg22: GMat2F) = new IMat2F((xx).toFloat / fg22.xx, (xy).toFloat / fg22.xy, (yx).toFloat / fg22.yx, (yy).toFloat / fg22.yy)
    def /(dg22: GMat2D) = new IMat2D((xx).toDouble / dg22.xx, (xy).toDouble / dg22.xy, (yx).toDouble / dg22.yx, (yy).toDouble / dg22.yy)
    def max(x0: Int) = new IMat2I(math.max(xx,x0), math.max(xy,x0), math.max(yx,x0), math.max(yy,x0))
    def max(x0: Long) = new IMat2L(math.max((xx).toLong,x0), math.max((xy).toLong,x0), math.max((yx).toLong,x0), math.max((yy).toLong,x0))
    def max(x0: Float) = new IMat2F(math.max((xx).toFloat,x0), math.max((xy).toFloat,x0), math.max((yx).toFloat,x0), math.max((yy).toFloat,x0))
    def max(x0: Double) = new IMat2D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0))
    def max(sg22: GMat2S) = new IMat2I(math.max(xx,(sg22.xx).toInt), math.max(xy,(sg22.xy).toInt), math.max(yx,(sg22.yx).toInt), math.max(yy,(sg22.yy).toInt))
    def max(ig22: GMat2I) = new IMat2I(math.max(xx,ig22.xx), math.max(xy,ig22.xy), math.max(yx,ig22.yx), math.max(yy,ig22.yy))
    def max(xx0: Int, xy0: Int, yx0: Int, yy0: Int) = new IMat2I(math.max(xx,xx0), math.max(xy,xy0), math.max(yx,yx0), math.max(yy,yy0))
    def max(lg22: GMat2L) = new IMat2L(math.max((xx).toLong,lg22.xx), math.max((xy).toLong,lg22.xy), math.max((yx).toLong,lg22.yx), math.max((yy).toLong,lg22.yy))
    def max(fg22: GMat2F) = new IMat2F(math.max((xx).toFloat,fg22.xx), math.max((xy).toFloat,fg22.xy), math.max((yx).toFloat,fg22.yx), math.max((yy).toFloat,fg22.yy))
    def max(dg22: GMat2D) = new IMat2D(math.max((xx).toDouble,dg22.xx), math.max((xy).toDouble,dg22.xy), math.max((yx).toDouble,dg22.yx), math.max((yy).toDouble,dg22.yy))
    def min(x0: Int) = new IMat2I(math.min(xx,x0), math.min(xy,x0), math.min(yx,x0), math.min(yy,x0))
    def min(x0: Long) = new IMat2L(math.min((xx).toLong,x0), math.min((xy).toLong,x0), math.min((yx).toLong,x0), math.min((yy).toLong,x0))
    def min(x0: Float) = new IMat2F(math.min((xx).toFloat,x0), math.min((xy).toFloat,x0), math.min((yx).toFloat,x0), math.min((yy).toFloat,x0))
    def min(x0: Double) = new IMat2D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0))
    def min(sg22: GMat2S) = new IMat2I(math.min(xx,(sg22.xx).toInt), math.min(xy,(sg22.xy).toInt), math.min(yx,(sg22.yx).toInt), math.min(yy,(sg22.yy).toInt))
    def min(ig22: GMat2I) = new IMat2I(math.min(xx,ig22.xx), math.min(xy,ig22.xy), math.min(yx,ig22.yx), math.min(yy,ig22.yy))
    def min(xx0: Int, xy0: Int, yx0: Int, yy0: Int) = new IMat2I(math.min(xx,xx0), math.min(xy,xy0), math.min(yx,yx0), math.min(yy,yy0))
    def min(lg22: GMat2L) = new IMat2L(math.min((xx).toLong,lg22.xx), math.min((xy).toLong,lg22.xy), math.min((yx).toLong,lg22.yx), math.min((yy).toLong,lg22.yy))
    def min(fg22: GMat2F) = new IMat2F(math.min((xx).toFloat,fg22.xx), math.min((xy).toFloat,fg22.xy), math.min((yx).toFloat,fg22.yx), math.min((yy).toFloat,fg22.yy))
    def min(dg22: GMat2D) = new IMat2D(math.min((xx).toDouble,dg22.xx), math.min((xy).toDouble,dg22.xy), math.min((yx).toDouble,dg22.yx), math.min((yy).toDouble,dg22.yy))
    def operate(sg22: GMat2S)(fun: (Int,Int)=>Int) = new IMat2I(fun(xx,(sg22.xx).toInt), fun(xy,(sg22.xy).toInt), fun(yx,(sg22.yx).toInt), fun(yy,(sg22.yy).toInt))
    def operate(ig22: GMat2I)(fun: (Int,Int)=>Int) = new IMat2I(fun(xx,ig22.xx), fun(xy,ig22.xy), fun(yx,ig22.yx), fun(yy,ig22.yy))
    def operate(lg22: GMat2L)(fun: (Long,Long)=>Long) = new IMat2L(fun((xx).toLong,lg22.xx), fun((xy).toLong,lg22.xy), fun((yx).toLong,lg22.yx), fun((yy).toLong,lg22.yy))
    def operate(fg22: GMat2F)(fun: (Float,Float)=>Float) = new IMat2F(fun((xx).toFloat,fg22.xx), fun((xy).toFloat,fg22.xy), fun((yx).toFloat,fg22.yx), fun((yy).toFloat,fg22.yy))
    def operate(dg22: GMat2D)(fun: (Double,Double)=>Double) = new IMat2D(fun((xx).toDouble,dg22.xx), fun((xy).toDouble,dg22.xy), fun((yx).toDouble,dg22.yx), fun((yy).toDouble,dg22.yy))
    def fold(zero: Int)(fun: (Int,Int)=>Int) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Long)(fun: (Long,Int)=>Long) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Float)(fun: (Float,Int)=>Float) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Double)(fun: (Double,Int)=>Double) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def reduce(fun: (Int,Int)=>Int) = fun(fun(fun(xx,xy),yx),yy)
    def ===(ig22: GMat2I) = xx==ig22.xx && xy==ig22.xy && yx==ig22.yx && yy==ig22.yy
    def ===(xx0: Int, xy0: Int, yx0: Int, yy0: Int) = xx==xx0 && xy==xy0 && yx==yx0 && yy==yy0
    def det = xx*yy - xy*yx
    def trace = new IVec2I(xx, yy)
    def xRow = new IVec2I(xx, xy)
    def xCol = new IVec2I(xx, yx)
    def yRow = new IVec2I(yx, yy)
    def yCol = new IVec2I(xy, yy)
    def t = new IMat2I(xx, yx, xy, yy)
    def **(sg2: GVec2S) = new IVec2I(xx*(sg2.x).toInt+xy*(sg2.y).toInt, yx*(sg2.x).toInt+yy*(sg2.y).toInt)
    def **(ig2: GVec2I) = new IVec2I(xx*ig2.x+xy*ig2.y, yx*ig2.x+yy*ig2.y)
    def **(lg2: GVec2L) = new IVec2L((xx).toLong*lg2.x+(xy).toLong*lg2.y, (yx).toLong*lg2.x+(yy).toLong*lg2.y)
    def **(fg2: GVec2F) = new IVec2F((xx).toFloat*fg2.x+(xy).toFloat*fg2.y, (yx).toFloat*fg2.x+(yy).toFloat*fg2.y)
    def **(dg2: GVec2D) = new IVec2D((xx).toDouble*dg2.x+(xy).toDouble*dg2.y, (yx).toDouble*dg2.x+(yy).toDouble*dg2.y)
    def **(sg22: GMat2S) = new IMat2I(xx*(sg22.xx).toInt+xy*(sg22.yx).toInt, xx*(sg22.xy).toInt+xy*(sg22.yy).toInt, yx*(sg22.xx).toInt+yy*(sg22.yx).toInt, yx*(sg22.xy).toInt+yy*(sg22.yy).toInt)
    def **(ig22: GMat2I) = new IMat2I(xx*ig22.xx+xy*ig22.yx, xx*ig22.xy+xy*ig22.yy, yx*ig22.xx+yy*ig22.yx, yx*ig22.xy+yy*ig22.yy)
    def **(lg22: GMat2L) = new IMat2L((xx).toLong*lg22.xx+(xy).toLong*lg22.yx, (xx).toLong*lg22.xy+(xy).toLong*lg22.yy, (yx).toLong*lg22.xx+(yy).toLong*lg22.yx, (yx).toLong*lg22.xy+(yy).toLong*lg22.yy)
    def **(fg22: GMat2F) = new IMat2F((xx).toFloat*fg22.xx+(xy).toFloat*fg22.yx, (xx).toFloat*fg22.xy+(xy).toFloat*fg22.yy, (yx).toFloat*fg22.xx+(yy).toFloat*fg22.yx, (yx).toFloat*fg22.xy+(yy).toFloat*fg22.yy)
    def **(dg22: GMat2D) = new IMat2D((xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx, (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy, (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx, (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy)
  } // class GMat2I

  object GMat2I {
    def apply(xx0: Int, xy0: Int, yx0: Int, yy0: Int): GMat2I = new IMat2I(xx0, xy0, yx0, yy0)
    def parse(str: String): GMat2I = IMat2I.parse(str)
    val identity: GMat2I = IMat2I.identity
    val zero: GMat2I = IMat2I.zero
    def traced(ig2: GVec2I) = new IMat2I(ig2.x, 0, 0, ig2.y)
  } // object GMat2I


  abstract class GMat2L extends Cloneable {
    def xx: Long
    def xy: Long
    def yx: Long
    def yy: Long
    override def toString = "["+xx+", "+xy+" ; "+yx+", "+yy+"]"
    override def hashCode = (((yy.##)*16777619 ^ yx.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg22: GMat2S => {xx==sg22.xx && xy==sg22.xy && yx==sg22.yx && yy==sg22.yy }; case ig22: GMat2I => {xx==ig22.xx && xy==ig22.xy && yx==ig22.yx && yy==ig22.yy }; case lg22: GMat2L => {xx==lg22.xx && xy==lg22.xy && yx==lg22.yx && yy==lg22.yy }; case fg22: GMat2F => {xx==fg22.xx && xy==fg22.xy && yx==fg22.yx && yy==fg22.yy }; case dg22: GMat2D => {xx==dg22.xx && xy==dg22.xy && yx==dg22.yx && yy==dg22.yy }; case _ => false }
    override def clone(): GMat2L = new IMat2L(xx, xy, yx, yy)
    def toS: GMat2S = new IMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    def toI: GMat2I = new IMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    def mapI(fun: Long => Int) = new IMat2I((fun(xx)).toInt, (fun(xy)).toInt, (fun(yx)).toInt, (fun(yy)).toInt)
    def copy(xx0: Long = xx, xy0: Long = xy, yx0: Long = yx, yy0: Long = yy): GMat2L = new IMat2L(xx0, xy0, yx0, yy0)
    def pad(padding: Long = 1): GMat3L = new IMat3L(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapL(fun: Long => Long) = new IMat2L(fun(xx), fun(xy), fun(yx), fun(yy))
    def toF: GMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    def mapF(fun: Long => Float) = new IMat2F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat)
    def toD: GMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def mapD(fun: Long => Double) = new IMat2D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble)
    def imm = new IMat2L(xx, xy, yx, yy)
    def mut = new MMat2L(xx, xy, yx, yy)
    def unary_-() = new IMat2L(-xx, -xy, -yx, -yy)
    def +(x0: Long) = new IMat2L(xx + x0, xy + x0, yx + x0, yy + x0)
    def +(x0: Double) = new IMat2D((xx).toDouble + x0, (xy).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0)
    def +(sg22: GMat2S) = new IMat2L(xx + (sg22.xx).toLong, xy + (sg22.xy).toLong, yx + (sg22.yx).toLong, yy + (sg22.yy).toLong)
    def +(ig22: GMat2I) = new IMat2L(xx + (ig22.xx).toLong, xy + (ig22.xy).toLong, yx + (ig22.yx).toLong, yy + (ig22.yy).toLong)
    def +(lg22: GMat2L) = new IMat2L(xx + lg22.xx, xy + lg22.xy, yx + lg22.yx, yy + lg22.yy)
    def +(xx0: Long, xy0: Long, yx0: Long, yy0: Long) = new IMat2L(xx + xx0, xy + xy0, yx + yx0, yy + yy0)
    def +(fg22: GMat2F) = new IMat2D((xx).toDouble + (fg22.xx).toDouble, (xy).toDouble + (fg22.xy).toDouble, (yx).toDouble + (fg22.yx).toDouble, (yy).toDouble + (fg22.yy).toDouble)
    def +(dg22: GMat2D) = new IMat2D((xx).toDouble + dg22.xx, (xy).toDouble + dg22.xy, (yx).toDouble + dg22.yx, (yy).toDouble + dg22.yy)
    def -(x0: Long) = new IMat2L(xx - x0, xy - x0, yx - x0, yy - x0)
    def -(x0: Double) = new IMat2D((xx).toDouble - x0, (xy).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0)
    def -(sg22: GMat2S) = new IMat2L(xx - (sg22.xx).toLong, xy - (sg22.xy).toLong, yx - (sg22.yx).toLong, yy - (sg22.yy).toLong)
    def -(ig22: GMat2I) = new IMat2L(xx - (ig22.xx).toLong, xy - (ig22.xy).toLong, yx - (ig22.yx).toLong, yy - (ig22.yy).toLong)
    def -(lg22: GMat2L) = new IMat2L(xx - lg22.xx, xy - lg22.xy, yx - lg22.yx, yy - lg22.yy)
    def -(xx0: Long, xy0: Long, yx0: Long, yy0: Long) = new IMat2L(xx - xx0, xy - xy0, yx - yx0, yy - yy0)
    def -(fg22: GMat2F) = new IMat2D((xx).toDouble - (fg22.xx).toDouble, (xy).toDouble - (fg22.xy).toDouble, (yx).toDouble - (fg22.yx).toDouble, (yy).toDouble - (fg22.yy).toDouble)
    def -(dg22: GMat2D) = new IMat2D((xx).toDouble - dg22.xx, (xy).toDouble - dg22.xy, (yx).toDouble - dg22.yx, (yy).toDouble - dg22.yy)
    def *(x0: Long) = new IMat2L(xx * x0, xy * x0, yx * x0, yy * x0)
    def *(x0: Double) = new IMat2D((xx).toDouble * x0, (xy).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0)
    def *(sg22: GMat2S) = new IMat2L(xx * (sg22.xx).toLong, xy * (sg22.xy).toLong, yx * (sg22.yx).toLong, yy * (sg22.yy).toLong)
    def *(ig22: GMat2I) = new IMat2L(xx * (ig22.xx).toLong, xy * (ig22.xy).toLong, yx * (ig22.yx).toLong, yy * (ig22.yy).toLong)
    def *(lg22: GMat2L) = new IMat2L(xx * lg22.xx, xy * lg22.xy, yx * lg22.yx, yy * lg22.yy)
    def *(xx0: Long, xy0: Long, yx0: Long, yy0: Long) = new IMat2L(xx * xx0, xy * xy0, yx * yx0, yy * yy0)
    def *(fg22: GMat2F) = new IMat2D((xx).toDouble * (fg22.xx).toDouble, (xy).toDouble * (fg22.xy).toDouble, (yx).toDouble * (fg22.yx).toDouble, (yy).toDouble * (fg22.yy).toDouble)
    def *(dg22: GMat2D) = new IMat2D((xx).toDouble * dg22.xx, (xy).toDouble * dg22.xy, (yx).toDouble * dg22.yx, (yy).toDouble * dg22.yy)
    def /(x0: Long) = new IMat2L(xx / x0, xy / x0, yx / x0, yy / x0)
    def /(x0: Double) = new IMat2D((xx).toDouble / x0, (xy).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0)
    def /(sg22: GMat2S) = new IMat2L(xx / (sg22.xx).toLong, xy / (sg22.xy).toLong, yx / (sg22.yx).toLong, yy / (sg22.yy).toLong)
    def /(ig22: GMat2I) = new IMat2L(xx / (ig22.xx).toLong, xy / (ig22.xy).toLong, yx / (ig22.yx).toLong, yy / (ig22.yy).toLong)
    def /(lg22: GMat2L) = new IMat2L(xx / lg22.xx, xy / lg22.xy, yx / lg22.yx, yy / lg22.yy)
    def /(xx0: Long, xy0: Long, yx0: Long, yy0: Long) = new IMat2L(xx / xx0, xy / xy0, yx / yx0, yy / yy0)
    def /(fg22: GMat2F) = new IMat2D((xx).toDouble / (fg22.xx).toDouble, (xy).toDouble / (fg22.xy).toDouble, (yx).toDouble / (fg22.yx).toDouble, (yy).toDouble / (fg22.yy).toDouble)
    def /(dg22: GMat2D) = new IMat2D((xx).toDouble / dg22.xx, (xy).toDouble / dg22.xy, (yx).toDouble / dg22.yx, (yy).toDouble / dg22.yy)
    def max(x0: Long) = new IMat2L(math.max(xx,x0), math.max(xy,x0), math.max(yx,x0), math.max(yy,x0))
    def max(x0: Double) = new IMat2D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0))
    def max(sg22: GMat2S) = new IMat2L(math.max(xx,(sg22.xx).toLong), math.max(xy,(sg22.xy).toLong), math.max(yx,(sg22.yx).toLong), math.max(yy,(sg22.yy).toLong))
    def max(ig22: GMat2I) = new IMat2L(math.max(xx,(ig22.xx).toLong), math.max(xy,(ig22.xy).toLong), math.max(yx,(ig22.yx).toLong), math.max(yy,(ig22.yy).toLong))
    def max(lg22: GMat2L) = new IMat2L(math.max(xx,lg22.xx), math.max(xy,lg22.xy), math.max(yx,lg22.yx), math.max(yy,lg22.yy))
    def max(xx0: Long, xy0: Long, yx0: Long, yy0: Long) = new IMat2L(math.max(xx,xx0), math.max(xy,xy0), math.max(yx,yx0), math.max(yy,yy0))
    def max(fg22: GMat2F) = new IMat2D(math.max((xx).toDouble,(fg22.xx).toDouble), math.max((xy).toDouble,(fg22.xy).toDouble), math.max((yx).toDouble,(fg22.yx).toDouble), math.max((yy).toDouble,(fg22.yy).toDouble))
    def max(dg22: GMat2D) = new IMat2D(math.max((xx).toDouble,dg22.xx), math.max((xy).toDouble,dg22.xy), math.max((yx).toDouble,dg22.yx), math.max((yy).toDouble,dg22.yy))
    def min(x0: Long) = new IMat2L(math.min(xx,x0), math.min(xy,x0), math.min(yx,x0), math.min(yy,x0))
    def min(x0: Double) = new IMat2D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0))
    def min(sg22: GMat2S) = new IMat2L(math.min(xx,(sg22.xx).toLong), math.min(xy,(sg22.xy).toLong), math.min(yx,(sg22.yx).toLong), math.min(yy,(sg22.yy).toLong))
    def min(ig22: GMat2I) = new IMat2L(math.min(xx,(ig22.xx).toLong), math.min(xy,(ig22.xy).toLong), math.min(yx,(ig22.yx).toLong), math.min(yy,(ig22.yy).toLong))
    def min(lg22: GMat2L) = new IMat2L(math.min(xx,lg22.xx), math.min(xy,lg22.xy), math.min(yx,lg22.yx), math.min(yy,lg22.yy))
    def min(xx0: Long, xy0: Long, yx0: Long, yy0: Long) = new IMat2L(math.min(xx,xx0), math.min(xy,xy0), math.min(yx,yx0), math.min(yy,yy0))
    def min(fg22: GMat2F) = new IMat2D(math.min((xx).toDouble,(fg22.xx).toDouble), math.min((xy).toDouble,(fg22.xy).toDouble), math.min((yx).toDouble,(fg22.yx).toDouble), math.min((yy).toDouble,(fg22.yy).toDouble))
    def min(dg22: GMat2D) = new IMat2D(math.min((xx).toDouble,dg22.xx), math.min((xy).toDouble,dg22.xy), math.min((yx).toDouble,dg22.yx), math.min((yy).toDouble,dg22.yy))
    def operate(sg22: GMat2S)(fun: (Long,Long)=>Long) = new IMat2L(fun(xx,(sg22.xx).toLong), fun(xy,(sg22.xy).toLong), fun(yx,(sg22.yx).toLong), fun(yy,(sg22.yy).toLong))
    def operate(ig22: GMat2I)(fun: (Long,Long)=>Long) = new IMat2L(fun(xx,(ig22.xx).toLong), fun(xy,(ig22.xy).toLong), fun(yx,(ig22.yx).toLong), fun(yy,(ig22.yy).toLong))
    def operate(lg22: GMat2L)(fun: (Long,Long)=>Long) = new IMat2L(fun(xx,lg22.xx), fun(xy,lg22.xy), fun(yx,lg22.yx), fun(yy,lg22.yy))
    def operate(fg22: GMat2F)(fun: (Double,Double)=>Double) = new IMat2D(fun((xx).toDouble,(fg22.xx).toDouble), fun((xy).toDouble,(fg22.xy).toDouble), fun((yx).toDouble,(fg22.yx).toDouble), fun((yy).toDouble,(fg22.yy).toDouble))
    def operate(dg22: GMat2D)(fun: (Double,Double)=>Double) = new IMat2D(fun((xx).toDouble,dg22.xx), fun((xy).toDouble,dg22.xy), fun((yx).toDouble,dg22.yx), fun((yy).toDouble,dg22.yy))
    def fold(zero: Int)(fun: (Int,Long)=>Int) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Long)(fun: (Long,Long)=>Long) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Float)(fun: (Float,Long)=>Float) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Double)(fun: (Double,Long)=>Double) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def reduce(fun: (Long,Long)=>Long) = fun(fun(fun(xx,xy),yx),yy)
    def ===(lg22: GMat2L) = xx==lg22.xx && xy==lg22.xy && yx==lg22.yx && yy==lg22.yy
    def ===(xx0: Long, xy0: Long, yx0: Long, yy0: Long) = xx==xx0 && xy==xy0 && yx==yx0 && yy==yy0
    def det = xx*yy - xy*yx
    def trace = new IVec2L(xx, yy)
    def xRow = new IVec2L(xx, xy)
    def xCol = new IVec2L(xx, yx)
    def yRow = new IVec2L(yx, yy)
    def yCol = new IVec2L(xy, yy)
    def t = new IMat2L(xx, yx, xy, yy)
    def **(sg2: GVec2S) = new IVec2L(xx*(sg2.x).toLong+xy*(sg2.y).toLong, yx*(sg2.x).toLong+yy*(sg2.y).toLong)
    def **(ig2: GVec2I) = new IVec2L(xx*(ig2.x).toLong+xy*(ig2.y).toLong, yx*(ig2.x).toLong+yy*(ig2.y).toLong)
    def **(lg2: GVec2L) = new IVec2L(xx*lg2.x+xy*lg2.y, yx*lg2.x+yy*lg2.y)
    def **(fg2: GVec2F) = new IVec2D((xx).toDouble*(fg2.x).toDouble+(xy).toDouble*(fg2.y).toDouble, (yx).toDouble*(fg2.x).toDouble+(yy).toDouble*(fg2.y).toDouble)
    def **(dg2: GVec2D) = new IVec2D((xx).toDouble*dg2.x+(xy).toDouble*dg2.y, (yx).toDouble*dg2.x+(yy).toDouble*dg2.y)
    def **(sg22: GMat2S) = new IMat2L(xx*(sg22.xx).toLong+xy*(sg22.yx).toLong, xx*(sg22.xy).toLong+xy*(sg22.yy).toLong, yx*(sg22.xx).toLong+yy*(sg22.yx).toLong, yx*(sg22.xy).toLong+yy*(sg22.yy).toLong)
    def **(ig22: GMat2I) = new IMat2L(xx*(ig22.xx).toLong+xy*(ig22.yx).toLong, xx*(ig22.xy).toLong+xy*(ig22.yy).toLong, yx*(ig22.xx).toLong+yy*(ig22.yx).toLong, yx*(ig22.xy).toLong+yy*(ig22.yy).toLong)
    def **(lg22: GMat2L) = new IMat2L(xx*lg22.xx+xy*lg22.yx, xx*lg22.xy+xy*lg22.yy, yx*lg22.xx+yy*lg22.yx, yx*lg22.xy+yy*lg22.yy)
    def **(fg22: GMat2F) = new IMat2D((xx).toDouble*(fg22.xx).toDouble+(xy).toDouble*(fg22.yx).toDouble, (xx).toDouble*(fg22.xy).toDouble+(xy).toDouble*(fg22.yy).toDouble, (yx).toDouble*(fg22.xx).toDouble+(yy).toDouble*(fg22.yx).toDouble, (yx).toDouble*(fg22.xy).toDouble+(yy).toDouble*(fg22.yy).toDouble)
    def **(dg22: GMat2D) = new IMat2D((xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx, (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy, (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx, (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy)
  } // class GMat2L

  object GMat2L {
    def apply(xx0: Long, xy0: Long, yx0: Long, yy0: Long): GMat2L = new IMat2L(xx0, xy0, yx0, yy0)
    def parse(str: String): GMat2L = IMat2L.parse(str)
    val identity: GMat2L = IMat2L.identity
    val zero: GMat2L = IMat2L.zero
    def traced(lg2: GVec2L) = new IMat2L(lg2.x, 0, 0, lg2.y)
  } // object GMat2L


  abstract class GMat2F extends Cloneable {
    def xx: Float
    def xy: Float
    def yx: Float
    def yy: Float
    override def toString = "["+xx+", "+xy+" ; "+yx+", "+yy+"]"
    override def hashCode = (((yy.##)*16777619 ^ yx.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg22: GMat2S => {xx==sg22.xx && xy==sg22.xy && yx==sg22.yx && yy==sg22.yy }; case ig22: GMat2I => {xx==ig22.xx && xy==ig22.xy && yx==ig22.yx && yy==ig22.yy }; case lg22: GMat2L => {xx==lg22.xx && xy==lg22.xy && yx==lg22.yx && yy==lg22.yy }; case fg22: GMat2F => {xx==fg22.xx && xy==fg22.xy && yx==fg22.yx && yy==fg22.yy }; case dg22: GMat2D => {xx==dg22.xx && xy==dg22.xy && yx==dg22.yx && yy==dg22.yy }; case _ => false }
    override def clone(): GMat2F = new IMat2F(xx, xy, yx, yy)
    def toS: GMat2S = new IMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    def toI: GMat2I = new IMat2I(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    def mapI(fun: Float => Int) = new IMat2I(math.round(fun(xx)), math.round(fun(xy)), math.round(fun(yx)), math.round(fun(yy)))
    def toL: GMat2L = new IMat2L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((yx).toDouble), math.round((yy).toDouble))
    def mapL(fun: Float => Long) = new IMat2L(math.round((fun(xx)).toDouble), math.round((fun(xy)).toDouble), math.round((fun(yx)).toDouble), math.round((fun(yy)).toDouble))
    def copy(xx0: Float = xx, xy0: Float = xy, yx0: Float = yx, yy0: Float = yy): GMat2F = new IMat2F(xx0, xy0, yx0, yy0)
    def pad(padding: Float = 1): GMat3F = new IMat3F(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapF(fun: Float => Float) = new IMat2F(fun(xx), fun(xy), fun(yx), fun(yy))
    def toD: GMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def mapD(fun: Float => Double) = new IMat2D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble)
    def imm = new IMat2F(xx, xy, yx, yy)
    def mut = new MMat2F(xx, xy, yx, yy)
    def unary_-() = new IMat2F(-xx, -xy, -yx, -yy)
    def +(x0: Long) = new IMat2D((xx).toDouble + (x0).toDouble, (xy).toDouble + (x0).toDouble, (yx).toDouble + (x0).toDouble, (yy).toDouble + (x0).toDouble)
    def +(x0: Float) = new IMat2F(xx + x0, xy + x0, yx + x0, yy + x0)
    def +(x0: Double) = new IMat2D((xx).toDouble + x0, (xy).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0)
    def +(sg22: GMat2S) = new IMat2F(xx + (sg22.xx).toFloat, xy + (sg22.xy).toFloat, yx + (sg22.yx).toFloat, yy + (sg22.yy).toFloat)
    def +(ig22: GMat2I) = new IMat2F(xx + (ig22.xx).toFloat, xy + (ig22.xy).toFloat, yx + (ig22.yx).toFloat, yy + (ig22.yy).toFloat)
    def +(lg22: GMat2L) = new IMat2D((xx).toDouble + (lg22.xx).toDouble, (xy).toDouble + (lg22.xy).toDouble, (yx).toDouble + (lg22.yx).toDouble, (yy).toDouble + (lg22.yy).toDouble)
    def +(fg22: GMat2F) = new IMat2F(xx + fg22.xx, xy + fg22.xy, yx + fg22.yx, yy + fg22.yy)
    def +(xx0: Float, xy0: Float, yx0: Float, yy0: Float) = new IMat2F(xx + xx0, xy + xy0, yx + yx0, yy + yy0)
    def +(dg22: GMat2D) = new IMat2D((xx).toDouble + dg22.xx, (xy).toDouble + dg22.xy, (yx).toDouble + dg22.yx, (yy).toDouble + dg22.yy)
    def -(x0: Long) = new IMat2D((xx).toDouble - (x0).toDouble, (xy).toDouble - (x0).toDouble, (yx).toDouble - (x0).toDouble, (yy).toDouble - (x0).toDouble)
    def -(x0: Float) = new IMat2F(xx - x0, xy - x0, yx - x0, yy - x0)
    def -(x0: Double) = new IMat2D((xx).toDouble - x0, (xy).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0)
    def -(sg22: GMat2S) = new IMat2F(xx - (sg22.xx).toFloat, xy - (sg22.xy).toFloat, yx - (sg22.yx).toFloat, yy - (sg22.yy).toFloat)
    def -(ig22: GMat2I) = new IMat2F(xx - (ig22.xx).toFloat, xy - (ig22.xy).toFloat, yx - (ig22.yx).toFloat, yy - (ig22.yy).toFloat)
    def -(lg22: GMat2L) = new IMat2D((xx).toDouble - (lg22.xx).toDouble, (xy).toDouble - (lg22.xy).toDouble, (yx).toDouble - (lg22.yx).toDouble, (yy).toDouble - (lg22.yy).toDouble)
    def -(fg22: GMat2F) = new IMat2F(xx - fg22.xx, xy - fg22.xy, yx - fg22.yx, yy - fg22.yy)
    def -(xx0: Float, xy0: Float, yx0: Float, yy0: Float) = new IMat2F(xx - xx0, xy - xy0, yx - yx0, yy - yy0)
    def -(dg22: GMat2D) = new IMat2D((xx).toDouble - dg22.xx, (xy).toDouble - dg22.xy, (yx).toDouble - dg22.yx, (yy).toDouble - dg22.yy)
    def *(x0: Long) = new IMat2D((xx).toDouble * (x0).toDouble, (xy).toDouble * (x0).toDouble, (yx).toDouble * (x0).toDouble, (yy).toDouble * (x0).toDouble)
    def *(x0: Float) = new IMat2F(xx * x0, xy * x0, yx * x0, yy * x0)
    def *(x0: Double) = new IMat2D((xx).toDouble * x0, (xy).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0)
    def *(sg22: GMat2S) = new IMat2F(xx * (sg22.xx).toFloat, xy * (sg22.xy).toFloat, yx * (sg22.yx).toFloat, yy * (sg22.yy).toFloat)
    def *(ig22: GMat2I) = new IMat2F(xx * (ig22.xx).toFloat, xy * (ig22.xy).toFloat, yx * (ig22.yx).toFloat, yy * (ig22.yy).toFloat)
    def *(lg22: GMat2L) = new IMat2D((xx).toDouble * (lg22.xx).toDouble, (xy).toDouble * (lg22.xy).toDouble, (yx).toDouble * (lg22.yx).toDouble, (yy).toDouble * (lg22.yy).toDouble)
    def *(fg22: GMat2F) = new IMat2F(xx * fg22.xx, xy * fg22.xy, yx * fg22.yx, yy * fg22.yy)
    def *(xx0: Float, xy0: Float, yx0: Float, yy0: Float) = new IMat2F(xx * xx0, xy * xy0, yx * yx0, yy * yy0)
    def *(dg22: GMat2D) = new IMat2D((xx).toDouble * dg22.xx, (xy).toDouble * dg22.xy, (yx).toDouble * dg22.yx, (yy).toDouble * dg22.yy)
    def /(x0: Long) = new IMat2D((xx).toDouble / (x0).toDouble, (xy).toDouble / (x0).toDouble, (yx).toDouble / (x0).toDouble, (yy).toDouble / (x0).toDouble)
    def /(x0: Float) = new IMat2F(xx / x0, xy / x0, yx / x0, yy / x0)
    def /(x0: Double) = new IMat2D((xx).toDouble / x0, (xy).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0)
    def /(sg22: GMat2S) = new IMat2F(xx / (sg22.xx).toFloat, xy / (sg22.xy).toFloat, yx / (sg22.yx).toFloat, yy / (sg22.yy).toFloat)
    def /(ig22: GMat2I) = new IMat2F(xx / (ig22.xx).toFloat, xy / (ig22.xy).toFloat, yx / (ig22.yx).toFloat, yy / (ig22.yy).toFloat)
    def /(lg22: GMat2L) = new IMat2D((xx).toDouble / (lg22.xx).toDouble, (xy).toDouble / (lg22.xy).toDouble, (yx).toDouble / (lg22.yx).toDouble, (yy).toDouble / (lg22.yy).toDouble)
    def /(fg22: GMat2F) = new IMat2F(xx / fg22.xx, xy / fg22.xy, yx / fg22.yx, yy / fg22.yy)
    def /(xx0: Float, xy0: Float, yx0: Float, yy0: Float) = new IMat2F(xx / xx0, xy / xy0, yx / yx0, yy / yy0)
    def /(dg22: GMat2D) = new IMat2D((xx).toDouble / dg22.xx, (xy).toDouble / dg22.xy, (yx).toDouble / dg22.yx, (yy).toDouble / dg22.yy)
    def max(x0: Long) = new IMat2D(math.max((xx).toDouble,(x0).toDouble), math.max((xy).toDouble,(x0).toDouble), math.max((yx).toDouble,(x0).toDouble), math.max((yy).toDouble,(x0).toDouble))
    def max(x0: Float) = new IMat2F(math.max(xx,x0), math.max(xy,x0), math.max(yx,x0), math.max(yy,x0))
    def max(x0: Double) = new IMat2D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0))
    def max(sg22: GMat2S) = new IMat2F(math.max(xx,(sg22.xx).toFloat), math.max(xy,(sg22.xy).toFloat), math.max(yx,(sg22.yx).toFloat), math.max(yy,(sg22.yy).toFloat))
    def max(ig22: GMat2I) = new IMat2F(math.max(xx,(ig22.xx).toFloat), math.max(xy,(ig22.xy).toFloat), math.max(yx,(ig22.yx).toFloat), math.max(yy,(ig22.yy).toFloat))
    def max(lg22: GMat2L) = new IMat2D(math.max((xx).toDouble,(lg22.xx).toDouble), math.max((xy).toDouble,(lg22.xy).toDouble), math.max((yx).toDouble,(lg22.yx).toDouble), math.max((yy).toDouble,(lg22.yy).toDouble))
    def max(fg22: GMat2F) = new IMat2F(math.max(xx,fg22.xx), math.max(xy,fg22.xy), math.max(yx,fg22.yx), math.max(yy,fg22.yy))
    def max(xx0: Float, xy0: Float, yx0: Float, yy0: Float) = new IMat2F(math.max(xx,xx0), math.max(xy,xy0), math.max(yx,yx0), math.max(yy,yy0))
    def max(dg22: GMat2D) = new IMat2D(math.max((xx).toDouble,dg22.xx), math.max((xy).toDouble,dg22.xy), math.max((yx).toDouble,dg22.yx), math.max((yy).toDouble,dg22.yy))
    def min(x0: Long) = new IMat2D(math.min((xx).toDouble,(x0).toDouble), math.min((xy).toDouble,(x0).toDouble), math.min((yx).toDouble,(x0).toDouble), math.min((yy).toDouble,(x0).toDouble))
    def min(x0: Float) = new IMat2F(math.min(xx,x0), math.min(xy,x0), math.min(yx,x0), math.min(yy,x0))
    def min(x0: Double) = new IMat2D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0))
    def min(sg22: GMat2S) = new IMat2F(math.min(xx,(sg22.xx).toFloat), math.min(xy,(sg22.xy).toFloat), math.min(yx,(sg22.yx).toFloat), math.min(yy,(sg22.yy).toFloat))
    def min(ig22: GMat2I) = new IMat2F(math.min(xx,(ig22.xx).toFloat), math.min(xy,(ig22.xy).toFloat), math.min(yx,(ig22.yx).toFloat), math.min(yy,(ig22.yy).toFloat))
    def min(lg22: GMat2L) = new IMat2D(math.min((xx).toDouble,(lg22.xx).toDouble), math.min((xy).toDouble,(lg22.xy).toDouble), math.min((yx).toDouble,(lg22.yx).toDouble), math.min((yy).toDouble,(lg22.yy).toDouble))
    def min(fg22: GMat2F) = new IMat2F(math.min(xx,fg22.xx), math.min(xy,fg22.xy), math.min(yx,fg22.yx), math.min(yy,fg22.yy))
    def min(xx0: Float, xy0: Float, yx0: Float, yy0: Float) = new IMat2F(math.min(xx,xx0), math.min(xy,xy0), math.min(yx,yx0), math.min(yy,yy0))
    def min(dg22: GMat2D) = new IMat2D(math.min((xx).toDouble,dg22.xx), math.min((xy).toDouble,dg22.xy), math.min((yx).toDouble,dg22.yx), math.min((yy).toDouble,dg22.yy))
    def operate(sg22: GMat2S)(fun: (Float,Float)=>Float) = new IMat2F(fun(xx,(sg22.xx).toFloat), fun(xy,(sg22.xy).toFloat), fun(yx,(sg22.yx).toFloat), fun(yy,(sg22.yy).toFloat))
    def operate(ig22: GMat2I)(fun: (Float,Float)=>Float) = new IMat2F(fun(xx,(ig22.xx).toFloat), fun(xy,(ig22.xy).toFloat), fun(yx,(ig22.yx).toFloat), fun(yy,(ig22.yy).toFloat))
    def operate(lg22: GMat2L)(fun: (Double,Double)=>Double) = new IMat2D(fun((xx).toDouble,(lg22.xx).toDouble), fun((xy).toDouble,(lg22.xy).toDouble), fun((yx).toDouble,(lg22.yx).toDouble), fun((yy).toDouble,(lg22.yy).toDouble))
    def operate(fg22: GMat2F)(fun: (Float,Float)=>Float) = new IMat2F(fun(xx,fg22.xx), fun(xy,fg22.xy), fun(yx,fg22.yx), fun(yy,fg22.yy))
    def operate(dg22: GMat2D)(fun: (Double,Double)=>Double) = new IMat2D(fun((xx).toDouble,dg22.xx), fun((xy).toDouble,dg22.xy), fun((yx).toDouble,dg22.yx), fun((yy).toDouble,dg22.yy))
    def fold(zero: Int)(fun: (Int,Float)=>Int) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Long)(fun: (Long,Float)=>Long) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Float)(fun: (Float,Float)=>Float) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Double)(fun: (Double,Float)=>Double) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def reduce(fun: (Float,Float)=>Float) = fun(fun(fun(xx,xy),yx),yy)
    def ===(fg22: GMat2F) = xx==fg22.xx && xy==fg22.xy && yx==fg22.yx && yy==fg22.yy
    def ===(xx0: Float, xy0: Float, yx0: Float, yy0: Float) = xx==xx0 && xy==xy0 && yx==yx0 && yy==yy0
    def approx(fg22: GMat2F, eps: Float) = ScalarF.close(xx,fg22.xx,eps) && ScalarF.close(xy,fg22.xy,eps) && ScalarF.close(yx,fg22.yx,eps) && ScalarF.close(yy,fg22.yy,eps)
    def approx(dg22: GMat2D, eps: Double) = ScalarD.close(xx,dg22.xx,eps) && ScalarD.close(xy,dg22.xy,eps) && ScalarD.close(yx,dg22.yx,eps) && ScalarD.close(yy,dg22.yy,eps)
    final def =~=(fg22: GMat2F) = approx(fg22, 1e-10f)
    final def =~=(dg22: GMat2D) = approx(dg22, 1e-10)
    def approx(xx0: Float, xy0: Float, yx0: Float, yy0: Float, eps: Float) = ScalarF.close(xx,xx0,eps) && ScalarF.close(xy,xy0,eps) && ScalarF.close(yx,yx0,eps) && ScalarF.close(yy,yy0,eps)
    def det = xx*yy - xy*yx
    def trace = new IVec2F(xx, yy)
    def xRow = new IVec2F(xx, xy)
    def xCol = new IVec2F(xx, yx)
    def yRow = new IVec2F(yx, yy)
    def yCol = new IVec2F(xy, yy)
    def t = new IMat2F(xx, yx, xy, yy)
    def inv = { val idet = 1/det; new IMat2F(yy*idet,-xy*idet,-yx*idet,xx*idet) }
    def **(sg2: GVec2S) = new IVec2F(xx*(sg2.x).toFloat+xy*(sg2.y).toFloat, yx*(sg2.x).toFloat+yy*(sg2.y).toFloat)
    def **(ig2: GVec2I) = new IVec2F(xx*(ig2.x).toFloat+xy*(ig2.y).toFloat, yx*(ig2.x).toFloat+yy*(ig2.y).toFloat)
    def **(lg2: GVec2L) = new IVec2D((xx).toDouble*(lg2.x).toDouble+(xy).toDouble*(lg2.y).toDouble, (yx).toDouble*(lg2.x).toDouble+(yy).toDouble*(lg2.y).toDouble)
    def **(fg2: GVec2F) = new IVec2F(xx*fg2.x+xy*fg2.y, yx*fg2.x+yy*fg2.y)
    def **(dg2: GVec2D) = new IVec2D((xx).toDouble*dg2.x+(xy).toDouble*dg2.y, (yx).toDouble*dg2.x+(yy).toDouble*dg2.y)
    def **(sg22: GMat2S) = new IMat2F(xx*(sg22.xx).toFloat+xy*(sg22.yx).toFloat, xx*(sg22.xy).toFloat+xy*(sg22.yy).toFloat, yx*(sg22.xx).toFloat+yy*(sg22.yx).toFloat, yx*(sg22.xy).toFloat+yy*(sg22.yy).toFloat)
    def **(ig22: GMat2I) = new IMat2F(xx*(ig22.xx).toFloat+xy*(ig22.yx).toFloat, xx*(ig22.xy).toFloat+xy*(ig22.yy).toFloat, yx*(ig22.xx).toFloat+yy*(ig22.yx).toFloat, yx*(ig22.xy).toFloat+yy*(ig22.yy).toFloat)
    def **(lg22: GMat2L) = new IMat2D((xx).toDouble*(lg22.xx).toDouble+(xy).toDouble*(lg22.yx).toDouble, (xx).toDouble*(lg22.xy).toDouble+(xy).toDouble*(lg22.yy).toDouble, (yx).toDouble*(lg22.xx).toDouble+(yy).toDouble*(lg22.yx).toDouble, (yx).toDouble*(lg22.xy).toDouble+(yy).toDouble*(lg22.yy).toDouble)
    def **(fg22: GMat2F) = new IMat2F(xx*fg22.xx+xy*fg22.yx, xx*fg22.xy+xy*fg22.yy, yx*fg22.xx+yy*fg22.yx, yx*fg22.xy+yy*fg22.yy)
    def **(dg22: GMat2D) = new IMat2D((xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx, (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy, (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx, (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy)
  } // class GMat2F

  object GMat2F {
    def apply(xx0: Float, xy0: Float, yx0: Float, yy0: Float): GMat2F = new IMat2F(xx0, xy0, yx0, yy0)
    def parse(str: String): GMat2F = IMat2F.parse(str)
    def rotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat2F((c).toFloat, (-s).toFloat, (s).toFloat, (c).toFloat) }
    val identity: GMat2F = IMat2F.identity
    val zero: GMat2F = IMat2F.zero
    def traced(fg2: GVec2F) = new IMat2F(fg2.x, 0, 0, fg2.y)
  } // object GMat2F


  abstract class GMat2D extends Cloneable {
    def xx: Double
    def xy: Double
    def yx: Double
    def yy: Double
    override def toString = "["+xx+", "+xy+" ; "+yx+", "+yy+"]"
    override def hashCode = (((yy.##)*16777619 ^ yx.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg22: GMat2S => {xx==sg22.xx && xy==sg22.xy && yx==sg22.yx && yy==sg22.yy }; case ig22: GMat2I => {xx==ig22.xx && xy==ig22.xy && yx==ig22.yx && yy==ig22.yy }; case lg22: GMat2L => {xx==lg22.xx && xy==lg22.xy && yx==lg22.yx && yy==lg22.yy }; case fg22: GMat2F => {xx==fg22.xx && xy==fg22.xy && yx==fg22.yx && yy==fg22.yy }; case dg22: GMat2D => {xx==dg22.xx && xy==dg22.xy && yx==dg22.yx && yy==dg22.yy }; case _ => false }
    override def clone(): GMat2D = new IMat2D(xx, xy, yx, yy)
    def toS: GMat2S = new IMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    def toI: GMat2I = new IMat2I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt)
    def mapI(fun: Double => Int) = new IMat2I((math.round(fun(xx))).toInt, (math.round(fun(xy))).toInt, (math.round(fun(yx))).toInt, (math.round(fun(yy))).toInt)
    def toL: GMat2L = new IMat2L(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    def mapL(fun: Double => Long) = new IMat2L(math.round(fun(xx)), math.round(fun(xy)), math.round(fun(yx)), math.round(fun(yy)))
    def toF: GMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    def mapF(fun: Double => Float) = new IMat2F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat)
    def copy(xx0: Double = xx, xy0: Double = xy, yx0: Double = yx, yy0: Double = yy): GMat2D = new IMat2D(xx0, xy0, yx0, yy0)
    def pad(padding: Double = 1): GMat3D = new IMat3D(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapD(fun: Double => Double) = new IMat2D(fun(xx), fun(xy), fun(yx), fun(yy))
    def imm = new IMat2D(xx, xy, yx, yy)
    def mut = new MMat2D(xx, xy, yx, yy)
    def unary_-() = new IMat2D(-xx, -xy, -yx, -yy)
    def +(x0: Double) = new IMat2D(xx + x0, xy + x0, yx + x0, yy + x0)
    def +(sg22: GMat2S) = new IMat2D(xx + (sg22.xx).toDouble, xy + (sg22.xy).toDouble, yx + (sg22.yx).toDouble, yy + (sg22.yy).toDouble)
    def +(ig22: GMat2I) = new IMat2D(xx + (ig22.xx).toDouble, xy + (ig22.xy).toDouble, yx + (ig22.yx).toDouble, yy + (ig22.yy).toDouble)
    def +(lg22: GMat2L) = new IMat2D(xx + (lg22.xx).toDouble, xy + (lg22.xy).toDouble, yx + (lg22.yx).toDouble, yy + (lg22.yy).toDouble)
    def +(fg22: GMat2F) = new IMat2D(xx + (fg22.xx).toDouble, xy + (fg22.xy).toDouble, yx + (fg22.yx).toDouble, yy + (fg22.yy).toDouble)
    def +(dg22: GMat2D) = new IMat2D(xx + dg22.xx, xy + dg22.xy, yx + dg22.yx, yy + dg22.yy)
    def +(xx0: Double, xy0: Double, yx0: Double, yy0: Double) = new IMat2D(xx + xx0, xy + xy0, yx + yx0, yy + yy0)
    def -(x0: Double) = new IMat2D(xx - x0, xy - x0, yx - x0, yy - x0)
    def -(sg22: GMat2S) = new IMat2D(xx - (sg22.xx).toDouble, xy - (sg22.xy).toDouble, yx - (sg22.yx).toDouble, yy - (sg22.yy).toDouble)
    def -(ig22: GMat2I) = new IMat2D(xx - (ig22.xx).toDouble, xy - (ig22.xy).toDouble, yx - (ig22.yx).toDouble, yy - (ig22.yy).toDouble)
    def -(lg22: GMat2L) = new IMat2D(xx - (lg22.xx).toDouble, xy - (lg22.xy).toDouble, yx - (lg22.yx).toDouble, yy - (lg22.yy).toDouble)
    def -(fg22: GMat2F) = new IMat2D(xx - (fg22.xx).toDouble, xy - (fg22.xy).toDouble, yx - (fg22.yx).toDouble, yy - (fg22.yy).toDouble)
    def -(dg22: GMat2D) = new IMat2D(xx - dg22.xx, xy - dg22.xy, yx - dg22.yx, yy - dg22.yy)
    def -(xx0: Double, xy0: Double, yx0: Double, yy0: Double) = new IMat2D(xx - xx0, xy - xy0, yx - yx0, yy - yy0)
    def *(x0: Double) = new IMat2D(xx * x0, xy * x0, yx * x0, yy * x0)
    def *(sg22: GMat2S) = new IMat2D(xx * (sg22.xx).toDouble, xy * (sg22.xy).toDouble, yx * (sg22.yx).toDouble, yy * (sg22.yy).toDouble)
    def *(ig22: GMat2I) = new IMat2D(xx * (ig22.xx).toDouble, xy * (ig22.xy).toDouble, yx * (ig22.yx).toDouble, yy * (ig22.yy).toDouble)
    def *(lg22: GMat2L) = new IMat2D(xx * (lg22.xx).toDouble, xy * (lg22.xy).toDouble, yx * (lg22.yx).toDouble, yy * (lg22.yy).toDouble)
    def *(fg22: GMat2F) = new IMat2D(xx * (fg22.xx).toDouble, xy * (fg22.xy).toDouble, yx * (fg22.yx).toDouble, yy * (fg22.yy).toDouble)
    def *(dg22: GMat2D) = new IMat2D(xx * dg22.xx, xy * dg22.xy, yx * dg22.yx, yy * dg22.yy)
    def *(xx0: Double, xy0: Double, yx0: Double, yy0: Double) = new IMat2D(xx * xx0, xy * xy0, yx * yx0, yy * yy0)
    def /(x0: Double) = new IMat2D(xx / x0, xy / x0, yx / x0, yy / x0)
    def /(sg22: GMat2S) = new IMat2D(xx / (sg22.xx).toDouble, xy / (sg22.xy).toDouble, yx / (sg22.yx).toDouble, yy / (sg22.yy).toDouble)
    def /(ig22: GMat2I) = new IMat2D(xx / (ig22.xx).toDouble, xy / (ig22.xy).toDouble, yx / (ig22.yx).toDouble, yy / (ig22.yy).toDouble)
    def /(lg22: GMat2L) = new IMat2D(xx / (lg22.xx).toDouble, xy / (lg22.xy).toDouble, yx / (lg22.yx).toDouble, yy / (lg22.yy).toDouble)
    def /(fg22: GMat2F) = new IMat2D(xx / (fg22.xx).toDouble, xy / (fg22.xy).toDouble, yx / (fg22.yx).toDouble, yy / (fg22.yy).toDouble)
    def /(dg22: GMat2D) = new IMat2D(xx / dg22.xx, xy / dg22.xy, yx / dg22.yx, yy / dg22.yy)
    def /(xx0: Double, xy0: Double, yx0: Double, yy0: Double) = new IMat2D(xx / xx0, xy / xy0, yx / yx0, yy / yy0)
    def max(x0: Double) = new IMat2D(math.max(xx,x0), math.max(xy,x0), math.max(yx,x0), math.max(yy,x0))
    def max(sg22: GMat2S) = new IMat2D(math.max(xx,(sg22.xx).toDouble), math.max(xy,(sg22.xy).toDouble), math.max(yx,(sg22.yx).toDouble), math.max(yy,(sg22.yy).toDouble))
    def max(ig22: GMat2I) = new IMat2D(math.max(xx,(ig22.xx).toDouble), math.max(xy,(ig22.xy).toDouble), math.max(yx,(ig22.yx).toDouble), math.max(yy,(ig22.yy).toDouble))
    def max(lg22: GMat2L) = new IMat2D(math.max(xx,(lg22.xx).toDouble), math.max(xy,(lg22.xy).toDouble), math.max(yx,(lg22.yx).toDouble), math.max(yy,(lg22.yy).toDouble))
    def max(fg22: GMat2F) = new IMat2D(math.max(xx,(fg22.xx).toDouble), math.max(xy,(fg22.xy).toDouble), math.max(yx,(fg22.yx).toDouble), math.max(yy,(fg22.yy).toDouble))
    def max(dg22: GMat2D) = new IMat2D(math.max(xx,dg22.xx), math.max(xy,dg22.xy), math.max(yx,dg22.yx), math.max(yy,dg22.yy))
    def max(xx0: Double, xy0: Double, yx0: Double, yy0: Double) = new IMat2D(math.max(xx,xx0), math.max(xy,xy0), math.max(yx,yx0), math.max(yy,yy0))
    def min(x0: Double) = new IMat2D(math.min(xx,x0), math.min(xy,x0), math.min(yx,x0), math.min(yy,x0))
    def min(sg22: GMat2S) = new IMat2D(math.min(xx,(sg22.xx).toDouble), math.min(xy,(sg22.xy).toDouble), math.min(yx,(sg22.yx).toDouble), math.min(yy,(sg22.yy).toDouble))
    def min(ig22: GMat2I) = new IMat2D(math.min(xx,(ig22.xx).toDouble), math.min(xy,(ig22.xy).toDouble), math.min(yx,(ig22.yx).toDouble), math.min(yy,(ig22.yy).toDouble))
    def min(lg22: GMat2L) = new IMat2D(math.min(xx,(lg22.xx).toDouble), math.min(xy,(lg22.xy).toDouble), math.min(yx,(lg22.yx).toDouble), math.min(yy,(lg22.yy).toDouble))
    def min(fg22: GMat2F) = new IMat2D(math.min(xx,(fg22.xx).toDouble), math.min(xy,(fg22.xy).toDouble), math.min(yx,(fg22.yx).toDouble), math.min(yy,(fg22.yy).toDouble))
    def min(dg22: GMat2D) = new IMat2D(math.min(xx,dg22.xx), math.min(xy,dg22.xy), math.min(yx,dg22.yx), math.min(yy,dg22.yy))
    def min(xx0: Double, xy0: Double, yx0: Double, yy0: Double) = new IMat2D(math.min(xx,xx0), math.min(xy,xy0), math.min(yx,yx0), math.min(yy,yy0))
    def operate(sg22: GMat2S)(fun: (Double,Double)=>Double) = new IMat2D(fun(xx,(sg22.xx).toDouble), fun(xy,(sg22.xy).toDouble), fun(yx,(sg22.yx).toDouble), fun(yy,(sg22.yy).toDouble))
    def operate(ig22: GMat2I)(fun: (Double,Double)=>Double) = new IMat2D(fun(xx,(ig22.xx).toDouble), fun(xy,(ig22.xy).toDouble), fun(yx,(ig22.yx).toDouble), fun(yy,(ig22.yy).toDouble))
    def operate(lg22: GMat2L)(fun: (Double,Double)=>Double) = new IMat2D(fun(xx,(lg22.xx).toDouble), fun(xy,(lg22.xy).toDouble), fun(yx,(lg22.yx).toDouble), fun(yy,(lg22.yy).toDouble))
    def operate(fg22: GMat2F)(fun: (Double,Double)=>Double) = new IMat2D(fun(xx,(fg22.xx).toDouble), fun(xy,(fg22.xy).toDouble), fun(yx,(fg22.yx).toDouble), fun(yy,(fg22.yy).toDouble))
    def operate(dg22: GMat2D)(fun: (Double,Double)=>Double) = new IMat2D(fun(xx,dg22.xx), fun(xy,dg22.xy), fun(yx,dg22.yx), fun(yy,dg22.yy))
    def fold(zero: Int)(fun: (Int,Double)=>Int) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Long)(fun: (Long,Double)=>Long) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Float)(fun: (Float,Double)=>Float) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def fold(zero: Double)(fun: (Double,Double)=>Double) = fun(fun(fun(fun(zero,xx),xy),yx),yy)
    def reduce(fun: (Double,Double)=>Double) = fun(fun(fun(xx,xy),yx),yy)
    def ===(dg22: GMat2D) = xx==dg22.xx && xy==dg22.xy && yx==dg22.yx && yy==dg22.yy
    def ===(xx0: Double, xy0: Double, yx0: Double, yy0: Double) = xx==xx0 && xy==xy0 && yx==yx0 && yy==yy0
    def approx(fg22: GMat2F, eps: Double) = ScalarD.close(xx,(fg22.xx).toDouble,eps) && ScalarD.close(xy,(fg22.xy).toDouble,eps) && ScalarD.close(yx,(fg22.yx).toDouble,eps) && ScalarD.close(yy,(fg22.yy).toDouble,eps)
    def approx(dg22: GMat2D, eps: Double) = ScalarD.close(xx,dg22.xx,eps) && ScalarD.close(xy,dg22.xy,eps) && ScalarD.close(yx,dg22.yx,eps) && ScalarD.close(yy,dg22.yy,eps)
    final def =~=(fg22: GMat2F) = approx(fg22, 1e-10)
    final def =~=(dg22: GMat2D) = approx(dg22, 1e-20)
    def approx(xx0: Double, xy0: Double, yx0: Double, yy0: Double, eps: Double) = ScalarD.close(xx,xx0,eps) && ScalarD.close(xy,xy0,eps) && ScalarD.close(yx,yx0,eps) && ScalarD.close(yy,yy0,eps)
    def det = xx*yy - xy*yx
    def trace = new IVec2D(xx, yy)
    def xRow = new IVec2D(xx, xy)
    def xCol = new IVec2D(xx, yx)
    def yRow = new IVec2D(yx, yy)
    def yCol = new IVec2D(xy, yy)
    def t = new IMat2D(xx, yx, xy, yy)
    def inv = { val idet = 1/det; new IMat2D(yy*idet,-xy*idet,-yx*idet,xx*idet) }
    def **(sg2: GVec2S) = new IVec2D(xx*(sg2.x).toDouble+xy*(sg2.y).toDouble, yx*(sg2.x).toDouble+yy*(sg2.y).toDouble)
    def **(ig2: GVec2I) = new IVec2D(xx*(ig2.x).toDouble+xy*(ig2.y).toDouble, yx*(ig2.x).toDouble+yy*(ig2.y).toDouble)
    def **(lg2: GVec2L) = new IVec2D(xx*(lg2.x).toDouble+xy*(lg2.y).toDouble, yx*(lg2.x).toDouble+yy*(lg2.y).toDouble)
    def **(fg2: GVec2F) = new IVec2D(xx*(fg2.x).toDouble+xy*(fg2.y).toDouble, yx*(fg2.x).toDouble+yy*(fg2.y).toDouble)
    def **(dg2: GVec2D) = new IVec2D(xx*dg2.x+xy*dg2.y, yx*dg2.x+yy*dg2.y)
    def **(sg22: GMat2S) = new IMat2D(xx*(sg22.xx).toDouble+xy*(sg22.yx).toDouble, xx*(sg22.xy).toDouble+xy*(sg22.yy).toDouble, yx*(sg22.xx).toDouble+yy*(sg22.yx).toDouble, yx*(sg22.xy).toDouble+yy*(sg22.yy).toDouble)
    def **(ig22: GMat2I) = new IMat2D(xx*(ig22.xx).toDouble+xy*(ig22.yx).toDouble, xx*(ig22.xy).toDouble+xy*(ig22.yy).toDouble, yx*(ig22.xx).toDouble+yy*(ig22.yx).toDouble, yx*(ig22.xy).toDouble+yy*(ig22.yy).toDouble)
    def **(lg22: GMat2L) = new IMat2D(xx*(lg22.xx).toDouble+xy*(lg22.yx).toDouble, xx*(lg22.xy).toDouble+xy*(lg22.yy).toDouble, yx*(lg22.xx).toDouble+yy*(lg22.yx).toDouble, yx*(lg22.xy).toDouble+yy*(lg22.yy).toDouble)
    def **(fg22: GMat2F) = new IMat2D(xx*(fg22.xx).toDouble+xy*(fg22.yx).toDouble, xx*(fg22.xy).toDouble+xy*(fg22.yy).toDouble, yx*(fg22.xx).toDouble+yy*(fg22.yx).toDouble, yx*(fg22.xy).toDouble+yy*(fg22.yy).toDouble)
    def **(dg22: GMat2D) = new IMat2D(xx*dg22.xx+xy*dg22.yx, xx*dg22.xy+xy*dg22.yy, yx*dg22.xx+yy*dg22.yx, yx*dg22.xy+yy*dg22.yy)
  } // class GMat2D

  object GMat2D {
    def apply(xx0: Double, xy0: Double, yx0: Double, yy0: Double): GMat2D = new IMat2D(xx0, xy0, yx0, yy0)
    def parse(str: String): GMat2D = IMat2D.parse(str)
    def rotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat2D(c, -s, s, c) }
    val identity: GMat2D = IMat2D.identity
    val zero: GMat2D = IMat2D.zero
    def traced(dg2: GVec2D) = new IMat2D(dg2.x, 0, 0, dg2.y)
  } // object GMat2D


  final case class IMat2S(val xx: Short, val xy: Short, val yx: Short, val yy: Short) extends GMat2S {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat2S = new IMat2S(xx, xy, yx, yy)
    override def copy(xx0: Short = xx, xy0: Short = xy, yx0: Short = yx, yy0: Short = yy): IMat2S = new IMat2S(xx0, xy0, yx0, yy0)
    override def pad(padding: Short = 1): IMat3S = new IMat3S(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toI: IMat2I = new IMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def toL: IMat2L = new IMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: IMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: IMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class IMat2S

  object IMat2S {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat2S = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toShort); new IMat2S(p(0), p(1), p(2), p(3)) }
    val identity = new IMat2S(1, 0, 0, 1)
    val zero = new IMat2S(0, 0, 0, 0)
    def traced(sg2: GVec2S) = new IMat2S(sg2.x, 0, 0, sg2.y)
  } // object IMat2S


  final case class IMat2I(val xx: Int, val xy: Int, val yx: Int, val yy: Int) extends GMat2I {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat2I = new IMat2I(xx, xy, yx, yy)
    override def toS: IMat2S = new IMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, yx0: Int = yx, yy0: Int = yy): IMat2I = new IMat2I(xx0, xy0, yx0, yy0)
    override def pad(padding: Int = 1): IMat3I = new IMat3I(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toL: IMat2L = new IMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: IMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: IMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class IMat2I

  object IMat2I {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat2I = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toInt); new IMat2I(p(0), p(1), p(2), p(3)) }
    val identity = new IMat2I(1, 0, 0, 1)
    val zero = new IMat2I(0, 0, 0, 0)
    def traced(ig2: GVec2I) = new IMat2I(ig2.x, 0, 0, ig2.y)
  } // object IMat2I


  final case class IMat2L(val xx: Long, val xy: Long, val yx: Long, val yy: Long) extends GMat2L {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat2L = new IMat2L(xx, xy, yx, yy)
    override def toS: IMat2S = new IMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def toI: IMat2I = new IMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, yx0: Long = yx, yy0: Long = yy): IMat2L = new IMat2L(xx0, xy0, yx0, yy0)
    override def pad(padding: Long = 1): IMat3L = new IMat3L(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toF: IMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: IMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class IMat2L

  object IMat2L {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat2L = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toLong); new IMat2L(p(0), p(1), p(2), p(3)) }
    val identity = new IMat2L(1, 0, 0, 1)
    val zero = new IMat2L(0, 0, 0, 0)
    def traced(lg2: GVec2L) = new IMat2L(lg2.x, 0, 0, lg2.y)
  } // object IMat2L


  final case class IMat2F(val xx: Float, val xy: Float, val yx: Float, val yy: Float) extends GMat2F {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat2F = new IMat2F(xx, xy, yx, yy)
    override def toS: IMat2S = new IMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: IMat2I = new IMat2I(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toL: IMat2L = new IMat2L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((yx).toDouble), math.round((yy).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, yx0: Float = yx, yy0: Float = yy): IMat2F = new IMat2F(xx0, xy0, yx0, yy0)
    override def pad(padding: Float = 1): IMat3F = new IMat3F(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toD: IMat2D = new IMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class IMat2F

  object IMat2F {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat2F = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toFloat); new IMat2F(p(0), p(1), p(2), p(3)) }
    def rotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat2F((c).toFloat, (-s).toFloat, (s).toFloat, (c).toFloat) }
    val identity = new IMat2F(1, 0, 0, 1)
    val zero = new IMat2F(0, 0, 0, 0)
    def traced(fg2: GVec2F) = new IMat2F(fg2.x, 0, 0, fg2.y)
  } // object IMat2F


  final case class IMat2D(val xx: Double, val xy: Double, val yx: Double, val yy: Double) extends GMat2D {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat2D = new IMat2D(xx, xy, yx, yy)
    override def toS: IMat2S = new IMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: IMat2I = new IMat2I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt)
    override def toL: IMat2L = new IMat2L(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toF: IMat2F = new IMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, yx0: Double = yx, yy0: Double = yy): IMat2D = new IMat2D(xx0, xy0, yx0, yy0)
    override def pad(padding: Double = 1): IMat3D = new IMat3D(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mat = this
    override def imm = this
  } // class IMat2D

  object IMat2D {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat2D = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toDouble); new IMat2D(p(0), p(1), p(2), p(3)) }
    def rotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat2D(c, -s, s, c) }
    val identity = new IMat2D(1, 0, 0, 1)
    val zero = new IMat2D(0, 0, 0, 0)
    def traced(dg2: GVec2D) = new IMat2D(dg2.x, 0, 0, dg2.y)
  } // object IMat2D


  abstract class AMat2S extends GMat2S {
    def xx_=(xx0: Short): Unit
    def xy_=(xy0: Short): Unit
    def yx_=(yx0: Short): Unit
    def yy_=(yy0: Short): Unit
    override def clone(): AMat2S = new MMat2S(xx, xy, yx, yy)
    override def copy(xx0: Short = xx, xy0: Short = xy, yx0: Short = yx, yy0: Short = yy): AMat2S = new MMat2S(xx0, xy0, yx0, yy0)
    override def pad(padding: Short = 1): AMat3S = new MMat3S(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    override def toI: AMat2I = new MMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def toL: AMat2L = new MMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: AMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: AMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def negEq: this.type = { xx = (-xx).toShort; xy = (-xy).toShort; yx = (-yx).toShort; yy = (-yy).toShort; this }
    def :~(x0: Short): this.type = { xx = x0; xy = x0; yx = x0; yy = x0; this }
    def :~~(x0: Int): this.type = { xx = (x0).toShort; xy = (x0).toShort; yx = (x0).toShort; yy = (x0).toShort; this }
    def :~~(x0: Long): this.type = { xx = (x0).toShort; xy = (x0).toShort; yx = (x0).toShort; yy = (x0).toShort; this }
    def :~~(x0: Float): this.type = { xx = (math.round(x0)).toShort; xy = (math.round(x0)).toShort; yx = (math.round(x0)).toShort; yy = (math.round(x0)).toShort; this }
    def :~~(x0: Double): this.type = { xx = (math.round(x0)).toShort; xy = (math.round(x0)).toShort; yx = (math.round(x0)).toShort; yy = (math.round(x0)).toShort; this }
    def :~(sg22: GMat2S): this.type = { xx = sg22.xx; xy = sg22.xy; yx = sg22.yx; yy = sg22.yy; this }
    def :~(xx0: Short, xy0: Short, yx0: Short, yy0: Short): this.type = { xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def :~~(ig22: GMat2I): this.type = { xx = (ig22.xx).toShort; xy = (ig22.xy).toShort; yx = (ig22.yx).toShort; yy = (ig22.yy).toShort; this }
    def :~~(lg22: GMat2L): this.type = { xx = (lg22.xx).toShort; xy = (lg22.xy).toShort; yx = (lg22.yx).toShort; yy = (lg22.yy).toShort; this }
    def :~~(fg22: GMat2F): this.type = { xx = (math.round(fg22.xx)).toShort; xy = (math.round(fg22.xy)).toShort; yx = (math.round(fg22.yx)).toShort; yy = (math.round(fg22.yy)).toShort; this }
    def :~~(dg22: GMat2D): this.type = { xx = (math.round(dg22.xx)).toShort; xy = (math.round(dg22.xy)).toShort; yx = (math.round(dg22.yx)).toShort; yy = (math.round(dg22.yy)).toShort; this }
    def +~(x0: Short): this.type = { xx = (xx + x0).toShort; xy = (xy + x0).toShort; yx = (yx + x0).toShort; yy = (yy + x0).toShort; this }
    def +~~(x0: Int): this.type = { xx = ((xx).toInt + x0).toShort; xy = ((xy).toInt + x0).toShort; yx = ((yx).toInt + x0).toShort; yy = ((yy).toInt + x0).toShort; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toLong + x0).toShort; xy = ((xy).toLong + x0).toShort; yx = ((yx).toLong + x0).toShort; yy = ((yy).toLong + x0).toShort; this }
    def +~~(x0: Float): this.type = { xx = (math.round((xx).toFloat + x0)).toShort; xy = (math.round((xy).toFloat + x0)).toShort; yx = (math.round((yx).toFloat + x0)).toShort; yy = (math.round((yy).toFloat + x0)).toShort; this }
    def +~~(x0: Double): this.type = { xx = (math.round((xx).toDouble + x0)).toShort; xy = (math.round((xy).toDouble + x0)).toShort; yx = (math.round((yx).toDouble + x0)).toShort; yy = (math.round((yy).toDouble + x0)).toShort; this }
    def +~(sg22: GMat2S): this.type = { xx = (xx + sg22.xx).toShort; xy = (xy + sg22.xy).toShort; yx = (yx + sg22.yx).toShort; yy = (yy + sg22.yy).toShort; this }
    def +~(xx0: Short, xy0: Short, yx0: Short, yy0: Short): this.type = { xx = (xx + xx0).toShort; xy = (xy + xy0).toShort; yx = (yx + yx0).toShort; yy = (yy + yy0).toShort; this }
    def +~~(ig22: GMat2I): this.type = { xx = ((xx).toInt + ig22.xx).toShort; xy = ((xy).toInt + ig22.xy).toShort; yx = ((yx).toInt + ig22.yx).toShort; yy = ((yy).toInt + ig22.yy).toShort; this }
    def +~~(lg22: GMat2L): this.type = { xx = ((xx).toLong + lg22.xx).toShort; xy = ((xy).toLong + lg22.xy).toShort; yx = ((yx).toLong + lg22.yx).toShort; yy = ((yy).toLong + lg22.yy).toShort; this }
    def +~~(fg22: GMat2F): this.type = { xx = (math.round((xx).toFloat + fg22.xx)).toShort; xy = (math.round((xy).toFloat + fg22.xy)).toShort; yx = (math.round((yx).toFloat + fg22.yx)).toShort; yy = (math.round((yy).toFloat + fg22.yy)).toShort; this }
    def +~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble + dg22.xx)).toShort; xy = (math.round((xy).toDouble + dg22.xy)).toShort; yx = (math.round((yx).toDouble + dg22.yx)).toShort; yy = (math.round((yy).toDouble + dg22.yy)).toShort; this }
    def -~(x0: Short): this.type = { xx = (xx - x0).toShort; xy = (xy - x0).toShort; yx = (yx - x0).toShort; yy = (yy - x0).toShort; this }
    def -~~(x0: Int): this.type = { xx = ((xx).toInt - x0).toShort; xy = ((xy).toInt - x0).toShort; yx = ((yx).toInt - x0).toShort; yy = ((yy).toInt - x0).toShort; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toLong - x0).toShort; xy = ((xy).toLong - x0).toShort; yx = ((yx).toLong - x0).toShort; yy = ((yy).toLong - x0).toShort; this }
    def -~~(x0: Float): this.type = { xx = (math.round((xx).toFloat - x0)).toShort; xy = (math.round((xy).toFloat - x0)).toShort; yx = (math.round((yx).toFloat - x0)).toShort; yy = (math.round((yy).toFloat - x0)).toShort; this }
    def -~~(x0: Double): this.type = { xx = (math.round((xx).toDouble - x0)).toShort; xy = (math.round((xy).toDouble - x0)).toShort; yx = (math.round((yx).toDouble - x0)).toShort; yy = (math.round((yy).toDouble - x0)).toShort; this }
    def -~(sg22: GMat2S): this.type = { xx = (xx - sg22.xx).toShort; xy = (xy - sg22.xy).toShort; yx = (yx - sg22.yx).toShort; yy = (yy - sg22.yy).toShort; this }
    def -~(xx0: Short, xy0: Short, yx0: Short, yy0: Short): this.type = { xx = (xx - xx0).toShort; xy = (xy - xy0).toShort; yx = (yx - yx0).toShort; yy = (yy - yy0).toShort; this }
    def -~~(ig22: GMat2I): this.type = { xx = ((xx).toInt - ig22.xx).toShort; xy = ((xy).toInt - ig22.xy).toShort; yx = ((yx).toInt - ig22.yx).toShort; yy = ((yy).toInt - ig22.yy).toShort; this }
    def -~~(lg22: GMat2L): this.type = { xx = ((xx).toLong - lg22.xx).toShort; xy = ((xy).toLong - lg22.xy).toShort; yx = ((yx).toLong - lg22.yx).toShort; yy = ((yy).toLong - lg22.yy).toShort; this }
    def -~~(fg22: GMat2F): this.type = { xx = (math.round((xx).toFloat - fg22.xx)).toShort; xy = (math.round((xy).toFloat - fg22.xy)).toShort; yx = (math.round((yx).toFloat - fg22.yx)).toShort; yy = (math.round((yy).toFloat - fg22.yy)).toShort; this }
    def -~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble - dg22.xx)).toShort; xy = (math.round((xy).toDouble - dg22.xy)).toShort; yx = (math.round((yx).toDouble - dg22.yx)).toShort; yy = (math.round((yy).toDouble - dg22.yy)).toShort; this }
    def *~(x0: Short): this.type = { xx = (xx * x0).toShort; xy = (xy * x0).toShort; yx = (yx * x0).toShort; yy = (yy * x0).toShort; this }
    def *~~(x0: Int): this.type = { xx = ((xx).toInt * x0).toShort; xy = ((xy).toInt * x0).toShort; yx = ((yx).toInt * x0).toShort; yy = ((yy).toInt * x0).toShort; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toLong * x0).toShort; xy = ((xy).toLong * x0).toShort; yx = ((yx).toLong * x0).toShort; yy = ((yy).toLong * x0).toShort; this }
    def *~~(x0: Float): this.type = { xx = (math.round((xx).toFloat * x0)).toShort; xy = (math.round((xy).toFloat * x0)).toShort; yx = (math.round((yx).toFloat * x0)).toShort; yy = (math.round((yy).toFloat * x0)).toShort; this }
    def *~~(x0: Double): this.type = { xx = (math.round((xx).toDouble * x0)).toShort; xy = (math.round((xy).toDouble * x0)).toShort; yx = (math.round((yx).toDouble * x0)).toShort; yy = (math.round((yy).toDouble * x0)).toShort; this }
    def *~(sg22: GMat2S): this.type = { xx = (xx * sg22.xx).toShort; xy = (xy * sg22.xy).toShort; yx = (yx * sg22.yx).toShort; yy = (yy * sg22.yy).toShort; this }
    def *~(xx0: Short, xy0: Short, yx0: Short, yy0: Short): this.type = { xx = (xx * xx0).toShort; xy = (xy * xy0).toShort; yx = (yx * yx0).toShort; yy = (yy * yy0).toShort; this }
    def *~~(ig22: GMat2I): this.type = { xx = ((xx).toInt * ig22.xx).toShort; xy = ((xy).toInt * ig22.xy).toShort; yx = ((yx).toInt * ig22.yx).toShort; yy = ((yy).toInt * ig22.yy).toShort; this }
    def *~~(lg22: GMat2L): this.type = { xx = ((xx).toLong * lg22.xx).toShort; xy = ((xy).toLong * lg22.xy).toShort; yx = ((yx).toLong * lg22.yx).toShort; yy = ((yy).toLong * lg22.yy).toShort; this }
    def *~~(fg22: GMat2F): this.type = { xx = (math.round((xx).toFloat * fg22.xx)).toShort; xy = (math.round((xy).toFloat * fg22.xy)).toShort; yx = (math.round((yx).toFloat * fg22.yx)).toShort; yy = (math.round((yy).toFloat * fg22.yy)).toShort; this }
    def *~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble * dg22.xx)).toShort; xy = (math.round((xy).toDouble * dg22.xy)).toShort; yx = (math.round((yx).toDouble * dg22.yx)).toShort; yy = (math.round((yy).toDouble * dg22.yy)).toShort; this }
    def /~(x0: Short): this.type = { xx = (xx / x0).toShort; xy = (xy / x0).toShort; yx = (yx / x0).toShort; yy = (yy / x0).toShort; this }
    def /~~(x0: Int): this.type = { xx = ((xx).toInt / x0).toShort; xy = ((xy).toInt / x0).toShort; yx = ((yx).toInt / x0).toShort; yy = ((yy).toInt / x0).toShort; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toLong / x0).toShort; xy = ((xy).toLong / x0).toShort; yx = ((yx).toLong / x0).toShort; yy = ((yy).toLong / x0).toShort; this }
    def /~~(x0: Float): this.type = { xx = (math.round((xx).toFloat / x0)).toShort; xy = (math.round((xy).toFloat / x0)).toShort; yx = (math.round((yx).toFloat / x0)).toShort; yy = (math.round((yy).toFloat / x0)).toShort; this }
    def /~~(x0: Double): this.type = { xx = (math.round((xx).toDouble / x0)).toShort; xy = (math.round((xy).toDouble / x0)).toShort; yx = (math.round((yx).toDouble / x0)).toShort; yy = (math.round((yy).toDouble / x0)).toShort; this }
    def /~(sg22: GMat2S): this.type = { xx = (xx / sg22.xx).toShort; xy = (xy / sg22.xy).toShort; yx = (yx / sg22.yx).toShort; yy = (yy / sg22.yy).toShort; this }
    def /~(xx0: Short, xy0: Short, yx0: Short, yy0: Short): this.type = { xx = (xx / xx0).toShort; xy = (xy / xy0).toShort; yx = (yx / yx0).toShort; yy = (yy / yy0).toShort; this }
    def /~~(ig22: GMat2I): this.type = { xx = ((xx).toInt / ig22.xx).toShort; xy = ((xy).toInt / ig22.xy).toShort; yx = ((yx).toInt / ig22.yx).toShort; yy = ((yy).toInt / ig22.yy).toShort; this }
    def /~~(lg22: GMat2L): this.type = { xx = ((xx).toLong / lg22.xx).toShort; xy = ((xy).toLong / lg22.xy).toShort; yx = ((yx).toLong / lg22.yx).toShort; yy = ((yy).toLong / lg22.yy).toShort; this }
    def /~~(fg22: GMat2F): this.type = { xx = (math.round((xx).toFloat / fg22.xx)).toShort; xy = (math.round((xy).toFloat / fg22.xy)).toShort; yx = (math.round((yx).toFloat / fg22.yx)).toShort; yy = (math.round((yy).toFloat / fg22.yy)).toShort; this }
    def /~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble / dg22.xx)).toShort; xy = (math.round((xy).toDouble / dg22.xy)).toShort; yx = (math.round((yx).toDouble / dg22.yx)).toShort; yy = (math.round((yy).toDouble / dg22.yy)).toShort; this }
    def maxEq(x0: Short): this.type = { xx = (math.max(xx,x0)).toShort; xy = (math.max(xy,x0)).toShort; yx = (math.max(yx,x0)).toShort; yy = (math.max(yy,x0)).toShort; this }
    def maxEqCast(x0: Int): this.type = { xx = (math.max((xx).toInt,x0)).toShort; xy = (math.max((xy).toInt,x0)).toShort; yx = (math.max((yx).toInt,x0)).toShort; yy = (math.max((yy).toInt,x0)).toShort; this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toLong,x0)).toShort; xy = (math.max((xy).toLong,x0)).toShort; yx = (math.max((yx).toLong,x0)).toShort; yy = (math.max((yy).toLong,x0)).toShort; this }
    def maxEqCast(x0: Float): this.type = { xx = (math.round(math.max((xx).toFloat,x0))).toShort; xy = (math.round(math.max((xy).toFloat,x0))).toShort; yx = (math.round(math.max((yx).toFloat,x0))).toShort; yy = (math.round(math.max((yy).toFloat,x0))).toShort; this }
    def maxEqCast(x0: Double): this.type = { xx = (math.round(math.max((xx).toDouble,x0))).toShort; xy = (math.round(math.max((xy).toDouble,x0))).toShort; yx = (math.round(math.max((yx).toDouble,x0))).toShort; yy = (math.round(math.max((yy).toDouble,x0))).toShort; this }
    def maxEq(sg22: GMat2S): this.type = { xx = (math.max(xx,sg22.xx)).toShort; xy = (math.max(xy,sg22.xy)).toShort; yx = (math.max(yx,sg22.yx)).toShort; yy = (math.max(yy,sg22.yy)).toShort; this }
    def maxEq(xx0: Short, xy0: Short, yx0: Short, yy0: Short): this.type = { xx = (math.max(xx,xx0)).toShort; xy = (math.max(xy,xy0)).toShort; yx = (math.max(yx,yx0)).toShort; yy = (math.max(yy,yy0)).toShort; this }
    def maxEqCast(ig22: GMat2I): this.type = { xx = (math.max((xx).toInt,ig22.xx)).toShort; xy = (math.max((xy).toInt,ig22.xy)).toShort; yx = (math.max((yx).toInt,ig22.yx)).toShort; yy = (math.max((yy).toInt,ig22.yy)).toShort; this }
    def maxEqCast(lg22: GMat2L): this.type = { xx = (math.max((xx).toLong,lg22.xx)).toShort; xy = (math.max((xy).toLong,lg22.xy)).toShort; yx = (math.max((yx).toLong,lg22.yx)).toShort; yy = (math.max((yy).toLong,lg22.yy)).toShort; this }
    def maxEqCast(fg22: GMat2F): this.type = { xx = (math.round(math.max((xx).toFloat,fg22.xx))).toShort; xy = (math.round(math.max((xy).toFloat,fg22.xy))).toShort; yx = (math.round(math.max((yx).toFloat,fg22.yx))).toShort; yy = (math.round(math.max((yy).toFloat,fg22.yy))).toShort; this }
    def maxEqCast(dg22: GMat2D): this.type = { xx = (math.round(math.max((xx).toDouble,dg22.xx))).toShort; xy = (math.round(math.max((xy).toDouble,dg22.xy))).toShort; yx = (math.round(math.max((yx).toDouble,dg22.yx))).toShort; yy = (math.round(math.max((yy).toDouble,dg22.yy))).toShort; this }
    def minEq(x0: Short): this.type = { xx = (math.min(xx,x0)).toShort; xy = (math.min(xy,x0)).toShort; yx = (math.min(yx,x0)).toShort; yy = (math.min(yy,x0)).toShort; this }
    def minEqCast(x0: Int): this.type = { xx = (math.min((xx).toInt,x0)).toShort; xy = (math.min((xy).toInt,x0)).toShort; yx = (math.min((yx).toInt,x0)).toShort; yy = (math.min((yy).toInt,x0)).toShort; this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toLong,x0)).toShort; xy = (math.min((xy).toLong,x0)).toShort; yx = (math.min((yx).toLong,x0)).toShort; yy = (math.min((yy).toLong,x0)).toShort; this }
    def minEqCast(x0: Float): this.type = { xx = (math.round(math.min((xx).toFloat,x0))).toShort; xy = (math.round(math.min((xy).toFloat,x0))).toShort; yx = (math.round(math.min((yx).toFloat,x0))).toShort; yy = (math.round(math.min((yy).toFloat,x0))).toShort; this }
    def minEqCast(x0: Double): this.type = { xx = (math.round(math.min((xx).toDouble,x0))).toShort; xy = (math.round(math.min((xy).toDouble,x0))).toShort; yx = (math.round(math.min((yx).toDouble,x0))).toShort; yy = (math.round(math.min((yy).toDouble,x0))).toShort; this }
    def minEq(sg22: GMat2S): this.type = { xx = (math.min(xx,sg22.xx)).toShort; xy = (math.min(xy,sg22.xy)).toShort; yx = (math.min(yx,sg22.yx)).toShort; yy = (math.min(yy,sg22.yy)).toShort; this }
    def minEq(xx0: Short, xy0: Short, yx0: Short, yy0: Short): this.type = { xx = (math.min(xx,xx0)).toShort; xy = (math.min(xy,xy0)).toShort; yx = (math.min(yx,yx0)).toShort; yy = (math.min(yy,yy0)).toShort; this }
    def minEqCast(ig22: GMat2I): this.type = { xx = (math.min((xx).toInt,ig22.xx)).toShort; xy = (math.min((xy).toInt,ig22.xy)).toShort; yx = (math.min((yx).toInt,ig22.yx)).toShort; yy = (math.min((yy).toInt,ig22.yy)).toShort; this }
    def minEqCast(lg22: GMat2L): this.type = { xx = (math.min((xx).toLong,lg22.xx)).toShort; xy = (math.min((xy).toLong,lg22.xy)).toShort; yx = (math.min((yx).toLong,lg22.yx)).toShort; yy = (math.min((yy).toLong,lg22.yy)).toShort; this }
    def minEqCast(fg22: GMat2F): this.type = { xx = (math.round(math.min((xx).toFloat,fg22.xx))).toShort; xy = (math.round(math.min((xy).toFloat,fg22.xy))).toShort; yx = (math.round(math.min((yx).toFloat,fg22.yx))).toShort; yy = (math.round(math.min((yy).toFloat,fg22.yy))).toShort; this }
    def minEqCast(dg22: GMat2D): this.type = { xx = (math.round(math.min((xx).toDouble,dg22.xx))).toShort; xy = (math.round(math.min((xy).toDouble,dg22.xy))).toShort; yx = (math.round(math.min((yx).toDouble,dg22.yx))).toShort; yy = (math.round(math.min((yy).toDouble,dg22.yy))).toShort; this }
    def operateEq(sg22: GMat2S)(fun: (Short,Short)=>Short) = { xx = (fun(xx,sg22.xx)).toShort; xy = (fun(xy,sg22.xy)).toShort; yx = (fun(yx,sg22.yx)).toShort; yy = (fun(yy,sg22.yy)).toShort; this }
    def operateEqCast(ig22: GMat2I)(fun: (Int,Int)=>Int) = { xx = (fun((xx).toInt,ig22.xx)).toShort; xy = (fun((xy).toInt,ig22.xy)).toShort; yx = (fun((yx).toInt,ig22.yx)).toShort; yy = (fun((yy).toInt,ig22.yy)).toShort; this }
    def operateEqCast(lg22: GMat2L)(fun: (Long,Long)=>Long) = { xx = (fun((xx).toLong,lg22.xx)).toShort; xy = (fun((xy).toLong,lg22.xy)).toShort; yx = (fun((yx).toLong,lg22.yx)).toShort; yy = (fun((yy).toLong,lg22.yy)).toShort; this }
    def operateEqCast(fg22: GMat2F)(fun: (Float,Float)=>Float) = { xx = (math.round(fun((xx).toFloat,fg22.xx))).toShort; xy = (math.round(fun((xy).toFloat,fg22.xy))).toShort; yx = (math.round(fun((yx).toFloat,fg22.yx))).toShort; yy = (math.round(fun((yy).toFloat,fg22.yy))).toShort; this }
    def operateEqCast(dg22: GMat2D)(fun: (Double,Double)=>Double) = { xx = (math.round(fun((xx).toDouble,dg22.xx))).toShort; xy = (math.round(fun((xy).toDouble,dg22.xy))).toShort; yx = (math.round(fun((yx).toDouble,dg22.yx))).toShort; yy = (math.round(fun((yy).toDouble,dg22.yy))).toShort; this }
    def :|~(sg2: GVec2S) = { xx = sg2.x; xy = sg2.x; yx = sg2.y; yy = sg2.y; this }
    def :-~(sg2: GVec2S) = { xx = sg2.x; xy = sg2.y; yx = sg2.x; yy = sg2.y; this }
    def :|~~(ig2: GVec2I) = { xx = (ig2.x).toShort; xy = (ig2.x).toShort; yx = (ig2.y).toShort; yy = (ig2.y).toShort; this }
    def :-~~(ig2: GVec2I) = { xx = (ig2.x).toShort; xy = (ig2.y).toShort; yx = (ig2.x).toShort; yy = (ig2.y).toShort; this }
    def :|~~(lg2: GVec2L) = { xx = (lg2.x).toShort; xy = (lg2.x).toShort; yx = (lg2.y).toShort; yy = (lg2.y).toShort; this }
    def :-~~(lg2: GVec2L) = { xx = (lg2.x).toShort; xy = (lg2.y).toShort; yx = (lg2.x).toShort; yy = (lg2.y).toShort; this }
    def :|~~(fg2: GVec2F) = { xx = (math.round(fg2.x)).toShort; xy = (math.round(fg2.x)).toShort; yx = (math.round(fg2.y)).toShort; yy = (math.round(fg2.y)).toShort; this }
    def :-~~(fg2: GVec2F) = { xx = (math.round(fg2.x)).toShort; xy = (math.round(fg2.y)).toShort; yx = (math.round(fg2.x)).toShort; yy = (math.round(fg2.y)).toShort; this }
    def :|~~(dg2: GVec2D) = { xx = (math.round(dg2.x)).toShort; xy = (math.round(dg2.x)).toShort; yx = (math.round(dg2.y)).toShort; yy = (math.round(dg2.y)).toShort; this }
    def :-~~(dg2: GVec2D) = { xx = (math.round(dg2.x)).toShort; xy = (math.round(dg2.y)).toShort; yx = (math.round(dg2.x)).toShort; yy = (math.round(dg2.y)).toShort; this }
    def **~(sg22: GMat2S) = {val xx0 = xx*sg22.xx+xy*sg22.yx; val xy0 = xx*sg22.xy+xy*sg22.yy; val yx0 = yx*sg22.xx+yy*sg22.yx; val yy0 = yx*sg22.xy+yy*sg22.yy; xx = (xx0).toShort; xy = (xy0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; this }
    def **~~(ig22: GMat2I) = {val xx0 = (xx).toInt*ig22.xx+(xy).toInt*ig22.yx; val xy0 = (xx).toInt*ig22.xy+(xy).toInt*ig22.yy; val yx0 = (yx).toInt*ig22.xx+(yy).toInt*ig22.yx; val yy0 = (yx).toInt*ig22.xy+(yy).toInt*ig22.yy; xx = (xx0).toShort; xy = (xy0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; this }
    def **~~(lg22: GMat2L) = {val xx0 = (xx).toLong*lg22.xx+(xy).toLong*lg22.yx; val xy0 = (xx).toLong*lg22.xy+(xy).toLong*lg22.yy; val yx0 = (yx).toLong*lg22.xx+(yy).toLong*lg22.yx; val yy0 = (yx).toLong*lg22.xy+(yy).toLong*lg22.yy; xx = (xx0).toShort; xy = (xy0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; this }
    def **~~(fg22: GMat2F) = {val xx0 = (xx).toFloat*fg22.xx+(xy).toFloat*fg22.yx; val xy0 = (xx).toFloat*fg22.xy+(xy).toFloat*fg22.yy; val yx0 = (yx).toFloat*fg22.xx+(yy).toFloat*fg22.yx; val yy0 = (yx).toFloat*fg22.xy+(yy).toFloat*fg22.yy; xx = (math.round(xx0)).toShort; xy = (math.round(xy0)).toShort; yx = (math.round(yx0)).toShort; yy = (math.round(yy0)).toShort; this }
    def **~~(dg22: GMat2D) = {val xx0 = (xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx; val xy0 = (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy; val yx0 = (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx; val yy0 = (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy; xx = (math.round(xx0)).toShort; xy = (math.round(xy0)).toShort; yx = (math.round(yx0)).toShort; yy = (math.round(yy0)).toShort; this }
    class RowViewX extends AVec2S { def x = xx; def x_=(x0: Short) { xx = x0 }; def y = xy; def y_=(x0: Short) { xy = x0 } }
    class ColViewX extends AVec2S { def x = xx; def x_=(x0: Short) { xx = x0 }; def y = yx; def y_=(x0: Short) { yx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec2S { def x = yx; def x_=(x0: Short) { yx = x0 }; def y = yy; def y_=(x0: Short) { yy = x0 } }
    class ColViewY extends AVec2S { def x = xy; def x_=(x0: Short) { xy = x0 }; def y = yy; def y_=(x0: Short) { yy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; this }
  } // class AMat2S

  object AMat2S {
    def apply(xx0: Short, xy0: Short, yx0: Short, yy0: Short): AMat2S = new MMat2S(xx0, xy0, yx0, yy0)
    def parse(str: String): AMat2S = IMat2S.parse(str).mut
    def identity: AMat2S = MMat2S.identity
    def zero: AMat2S = MMat2S.zero
    def traced(sg2: GVec2S) = new MMat2S(sg2.x, 0, 0, sg2.y)
  } // object AMat2S


  abstract class AMat2I extends GMat2I {
    def xx_=(xx0: Int): Unit
    def xy_=(xy0: Int): Unit
    def yx_=(yx0: Int): Unit
    def yy_=(yy0: Int): Unit
    override def clone(): AMat2I = new MMat2I(xx, xy, yx, yy)
    override def toS: AMat2S = new MMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, yx0: Int = yx, yy0: Int = yy): AMat2I = new MMat2I(xx0, xy0, yx0, yy0)
    override def pad(padding: Int = 1): AMat3I = new MMat3I(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapEq(fun: Int => Int): this.type = {xx = fun(xx); xy = fun(xy); yx = fun(yx); yy = fun(yy); this }
    override def toL: AMat2L = new MMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: AMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: AMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; yx = -yx; yy = -yy; this }
    def :~(x0: Int): this.type = { xx = x0; xy = x0; yx = x0; yy = x0; this }
    def :~~(x0: Long): this.type = { xx = (x0).toInt; xy = (x0).toInt; yx = (x0).toInt; yy = (x0).toInt; this }
    def :~~(x0: Float): this.type = { xx = math.round(x0); xy = math.round(x0); yx = math.round(x0); yy = math.round(x0); this }
    def :~~(x0: Double): this.type = { xx = (math.round(x0)).toInt; xy = (math.round(x0)).toInt; yx = (math.round(x0)).toInt; yy = (math.round(x0)).toInt; this }
    def :~(sg22: GMat2S): this.type = { xx = (sg22.xx).toInt; xy = (sg22.xy).toInt; yx = (sg22.yx).toInt; yy = (sg22.yy).toInt; this }
    def :~(ig22: GMat2I): this.type = { xx = ig22.xx; xy = ig22.xy; yx = ig22.yx; yy = ig22.yy; this }
    def :~(xx0: Int, xy0: Int, yx0: Int, yy0: Int): this.type = { xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def :~~(lg22: GMat2L): this.type = { xx = (lg22.xx).toInt; xy = (lg22.xy).toInt; yx = (lg22.yx).toInt; yy = (lg22.yy).toInt; this }
    def :~~(fg22: GMat2F): this.type = { xx = math.round(fg22.xx); xy = math.round(fg22.xy); yx = math.round(fg22.yx); yy = math.round(fg22.yy); this }
    def :~~(dg22: GMat2D): this.type = { xx = (math.round(dg22.xx)).toInt; xy = (math.round(dg22.xy)).toInt; yx = (math.round(dg22.yx)).toInt; yy = (math.round(dg22.yy)).toInt; this }
    def +~(x0: Int): this.type = { xx = xx + x0; xy = xy + x0; yx = yx + x0; yy = yy + x0; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toLong + x0).toInt; xy = ((xy).toLong + x0).toInt; yx = ((yx).toLong + x0).toInt; yy = ((yy).toLong + x0).toInt; this }
    def +~~(x0: Float): this.type = { xx = math.round((xx).toFloat + x0); xy = math.round((xy).toFloat + x0); yx = math.round((yx).toFloat + x0); yy = math.round((yy).toFloat + x0); this }
    def +~~(x0: Double): this.type = { xx = (math.round((xx).toDouble + x0)).toInt; xy = (math.round((xy).toDouble + x0)).toInt; yx = (math.round((yx).toDouble + x0)).toInt; yy = (math.round((yy).toDouble + x0)).toInt; this }
    def +~(sg22: GMat2S): this.type = { xx = xx + (sg22.xx).toInt; xy = xy + (sg22.xy).toInt; yx = yx + (sg22.yx).toInt; yy = yy + (sg22.yy).toInt; this }
    def +~(ig22: GMat2I): this.type = { xx = xx + ig22.xx; xy = xy + ig22.xy; yx = yx + ig22.yx; yy = yy + ig22.yy; this }
    def +~(xx0: Int, xy0: Int, yx0: Int, yy0: Int): this.type = { xx = xx + xx0; xy = xy + xy0; yx = yx + yx0; yy = yy + yy0; this }
    def +~~(lg22: GMat2L): this.type = { xx = ((xx).toLong + lg22.xx).toInt; xy = ((xy).toLong + lg22.xy).toInt; yx = ((yx).toLong + lg22.yx).toInt; yy = ((yy).toLong + lg22.yy).toInt; this }
    def +~~(fg22: GMat2F): this.type = { xx = math.round((xx).toFloat + fg22.xx); xy = math.round((xy).toFloat + fg22.xy); yx = math.round((yx).toFloat + fg22.yx); yy = math.round((yy).toFloat + fg22.yy); this }
    def +~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble + dg22.xx)).toInt; xy = (math.round((xy).toDouble + dg22.xy)).toInt; yx = (math.round((yx).toDouble + dg22.yx)).toInt; yy = (math.round((yy).toDouble + dg22.yy)).toInt; this }
    def -~(x0: Int): this.type = { xx = xx - x0; xy = xy - x0; yx = yx - x0; yy = yy - x0; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toLong - x0).toInt; xy = ((xy).toLong - x0).toInt; yx = ((yx).toLong - x0).toInt; yy = ((yy).toLong - x0).toInt; this }
    def -~~(x0: Float): this.type = { xx = math.round((xx).toFloat - x0); xy = math.round((xy).toFloat - x0); yx = math.round((yx).toFloat - x0); yy = math.round((yy).toFloat - x0); this }
    def -~~(x0: Double): this.type = { xx = (math.round((xx).toDouble - x0)).toInt; xy = (math.round((xy).toDouble - x0)).toInt; yx = (math.round((yx).toDouble - x0)).toInt; yy = (math.round((yy).toDouble - x0)).toInt; this }
    def -~(sg22: GMat2S): this.type = { xx = xx - (sg22.xx).toInt; xy = xy - (sg22.xy).toInt; yx = yx - (sg22.yx).toInt; yy = yy - (sg22.yy).toInt; this }
    def -~(ig22: GMat2I): this.type = { xx = xx - ig22.xx; xy = xy - ig22.xy; yx = yx - ig22.yx; yy = yy - ig22.yy; this }
    def -~(xx0: Int, xy0: Int, yx0: Int, yy0: Int): this.type = { xx = xx - xx0; xy = xy - xy0; yx = yx - yx0; yy = yy - yy0; this }
    def -~~(lg22: GMat2L): this.type = { xx = ((xx).toLong - lg22.xx).toInt; xy = ((xy).toLong - lg22.xy).toInt; yx = ((yx).toLong - lg22.yx).toInt; yy = ((yy).toLong - lg22.yy).toInt; this }
    def -~~(fg22: GMat2F): this.type = { xx = math.round((xx).toFloat - fg22.xx); xy = math.round((xy).toFloat - fg22.xy); yx = math.round((yx).toFloat - fg22.yx); yy = math.round((yy).toFloat - fg22.yy); this }
    def -~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble - dg22.xx)).toInt; xy = (math.round((xy).toDouble - dg22.xy)).toInt; yx = (math.round((yx).toDouble - dg22.yx)).toInt; yy = (math.round((yy).toDouble - dg22.yy)).toInt; this }
    def *~(x0: Int): this.type = { xx = xx * x0; xy = xy * x0; yx = yx * x0; yy = yy * x0; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toLong * x0).toInt; xy = ((xy).toLong * x0).toInt; yx = ((yx).toLong * x0).toInt; yy = ((yy).toLong * x0).toInt; this }
    def *~~(x0: Float): this.type = { xx = math.round((xx).toFloat * x0); xy = math.round((xy).toFloat * x0); yx = math.round((yx).toFloat * x0); yy = math.round((yy).toFloat * x0); this }
    def *~~(x0: Double): this.type = { xx = (math.round((xx).toDouble * x0)).toInt; xy = (math.round((xy).toDouble * x0)).toInt; yx = (math.round((yx).toDouble * x0)).toInt; yy = (math.round((yy).toDouble * x0)).toInt; this }
    def *~(sg22: GMat2S): this.type = { xx = xx * (sg22.xx).toInt; xy = xy * (sg22.xy).toInt; yx = yx * (sg22.yx).toInt; yy = yy * (sg22.yy).toInt; this }
    def *~(ig22: GMat2I): this.type = { xx = xx * ig22.xx; xy = xy * ig22.xy; yx = yx * ig22.yx; yy = yy * ig22.yy; this }
    def *~(xx0: Int, xy0: Int, yx0: Int, yy0: Int): this.type = { xx = xx * xx0; xy = xy * xy0; yx = yx * yx0; yy = yy * yy0; this }
    def *~~(lg22: GMat2L): this.type = { xx = ((xx).toLong * lg22.xx).toInt; xy = ((xy).toLong * lg22.xy).toInt; yx = ((yx).toLong * lg22.yx).toInt; yy = ((yy).toLong * lg22.yy).toInt; this }
    def *~~(fg22: GMat2F): this.type = { xx = math.round((xx).toFloat * fg22.xx); xy = math.round((xy).toFloat * fg22.xy); yx = math.round((yx).toFloat * fg22.yx); yy = math.round((yy).toFloat * fg22.yy); this }
    def *~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble * dg22.xx)).toInt; xy = (math.round((xy).toDouble * dg22.xy)).toInt; yx = (math.round((yx).toDouble * dg22.yx)).toInt; yy = (math.round((yy).toDouble * dg22.yy)).toInt; this }
    def /~(x0: Int): this.type = { xx = xx / x0; xy = xy / x0; yx = yx / x0; yy = yy / x0; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toLong / x0).toInt; xy = ((xy).toLong / x0).toInt; yx = ((yx).toLong / x0).toInt; yy = ((yy).toLong / x0).toInt; this }
    def /~~(x0: Float): this.type = { xx = math.round((xx).toFloat / x0); xy = math.round((xy).toFloat / x0); yx = math.round((yx).toFloat / x0); yy = math.round((yy).toFloat / x0); this }
    def /~~(x0: Double): this.type = { xx = (math.round((xx).toDouble / x0)).toInt; xy = (math.round((xy).toDouble / x0)).toInt; yx = (math.round((yx).toDouble / x0)).toInt; yy = (math.round((yy).toDouble / x0)).toInt; this }
    def /~(sg22: GMat2S): this.type = { xx = xx / (sg22.xx).toInt; xy = xy / (sg22.xy).toInt; yx = yx / (sg22.yx).toInt; yy = yy / (sg22.yy).toInt; this }
    def /~(ig22: GMat2I): this.type = { xx = xx / ig22.xx; xy = xy / ig22.xy; yx = yx / ig22.yx; yy = yy / ig22.yy; this }
    def /~(xx0: Int, xy0: Int, yx0: Int, yy0: Int): this.type = { xx = xx / xx0; xy = xy / xy0; yx = yx / yx0; yy = yy / yy0; this }
    def /~~(lg22: GMat2L): this.type = { xx = ((xx).toLong / lg22.xx).toInt; xy = ((xy).toLong / lg22.xy).toInt; yx = ((yx).toLong / lg22.yx).toInt; yy = ((yy).toLong / lg22.yy).toInt; this }
    def /~~(fg22: GMat2F): this.type = { xx = math.round((xx).toFloat / fg22.xx); xy = math.round((xy).toFloat / fg22.xy); yx = math.round((yx).toFloat / fg22.yx); yy = math.round((yy).toFloat / fg22.yy); this }
    def /~~(dg22: GMat2D): this.type = { xx = (math.round((xx).toDouble / dg22.xx)).toInt; xy = (math.round((xy).toDouble / dg22.xy)).toInt; yx = (math.round((yx).toDouble / dg22.yx)).toInt; yy = (math.round((yy).toDouble / dg22.yy)).toInt; this }
    def maxEq(x0: Int): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toLong,x0)).toInt; xy = (math.max((xy).toLong,x0)).toInt; yx = (math.max((yx).toLong,x0)).toInt; yy = (math.max((yy).toLong,x0)).toInt; this }
    def maxEqCast(x0: Float): this.type = { xx = math.round(math.max((xx).toFloat,x0)); xy = math.round(math.max((xy).toFloat,x0)); yx = math.round(math.max((yx).toFloat,x0)); yy = math.round(math.max((yy).toFloat,x0)); this }
    def maxEqCast(x0: Double): this.type = { xx = (math.round(math.max((xx).toDouble,x0))).toInt; xy = (math.round(math.max((xy).toDouble,x0))).toInt; yx = (math.round(math.max((yx).toDouble,x0))).toInt; yy = (math.round(math.max((yy).toDouble,x0))).toInt; this }
    def maxEq(sg22: GMat2S): this.type = { xx = math.max(xx,(sg22.xx).toInt); xy = math.max(xy,(sg22.xy).toInt); yx = math.max(yx,(sg22.yx).toInt); yy = math.max(yy,(sg22.yy).toInt); this }
    def maxEq(ig22: GMat2I): this.type = { xx = math.max(xx,ig22.xx); xy = math.max(xy,ig22.xy); yx = math.max(yx,ig22.yx); yy = math.max(yy,ig22.yy); this }
    def maxEq(xx0: Int, xy0: Int, yx0: Int, yy0: Int): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); this }
    def maxEqCast(lg22: GMat2L): this.type = { xx = (math.max((xx).toLong,lg22.xx)).toInt; xy = (math.max((xy).toLong,lg22.xy)).toInt; yx = (math.max((yx).toLong,lg22.yx)).toInt; yy = (math.max((yy).toLong,lg22.yy)).toInt; this }
    def maxEqCast(fg22: GMat2F): this.type = { xx = math.round(math.max((xx).toFloat,fg22.xx)); xy = math.round(math.max((xy).toFloat,fg22.xy)); yx = math.round(math.max((yx).toFloat,fg22.yx)); yy = math.round(math.max((yy).toFloat,fg22.yy)); this }
    def maxEqCast(dg22: GMat2D): this.type = { xx = (math.round(math.max((xx).toDouble,dg22.xx))).toInt; xy = (math.round(math.max((xy).toDouble,dg22.xy))).toInt; yx = (math.round(math.max((yx).toDouble,dg22.yx))).toInt; yy = (math.round(math.max((yy).toDouble,dg22.yy))).toInt; this }
    def minEq(x0: Int): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toLong,x0)).toInt; xy = (math.min((xy).toLong,x0)).toInt; yx = (math.min((yx).toLong,x0)).toInt; yy = (math.min((yy).toLong,x0)).toInt; this }
    def minEqCast(x0: Float): this.type = { xx = math.round(math.min((xx).toFloat,x0)); xy = math.round(math.min((xy).toFloat,x0)); yx = math.round(math.min((yx).toFloat,x0)); yy = math.round(math.min((yy).toFloat,x0)); this }
    def minEqCast(x0: Double): this.type = { xx = (math.round(math.min((xx).toDouble,x0))).toInt; xy = (math.round(math.min((xy).toDouble,x0))).toInt; yx = (math.round(math.min((yx).toDouble,x0))).toInt; yy = (math.round(math.min((yy).toDouble,x0))).toInt; this }
    def minEq(sg22: GMat2S): this.type = { xx = math.min(xx,(sg22.xx).toInt); xy = math.min(xy,(sg22.xy).toInt); yx = math.min(yx,(sg22.yx).toInt); yy = math.min(yy,(sg22.yy).toInt); this }
    def minEq(ig22: GMat2I): this.type = { xx = math.min(xx,ig22.xx); xy = math.min(xy,ig22.xy); yx = math.min(yx,ig22.yx); yy = math.min(yy,ig22.yy); this }
    def minEq(xx0: Int, xy0: Int, yx0: Int, yy0: Int): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); this }
    def minEqCast(lg22: GMat2L): this.type = { xx = (math.min((xx).toLong,lg22.xx)).toInt; xy = (math.min((xy).toLong,lg22.xy)).toInt; yx = (math.min((yx).toLong,lg22.yx)).toInt; yy = (math.min((yy).toLong,lg22.yy)).toInt; this }
    def minEqCast(fg22: GMat2F): this.type = { xx = math.round(math.min((xx).toFloat,fg22.xx)); xy = math.round(math.min((xy).toFloat,fg22.xy)); yx = math.round(math.min((yx).toFloat,fg22.yx)); yy = math.round(math.min((yy).toFloat,fg22.yy)); this }
    def minEqCast(dg22: GMat2D): this.type = { xx = (math.round(math.min((xx).toDouble,dg22.xx))).toInt; xy = (math.round(math.min((xy).toDouble,dg22.xy))).toInt; yx = (math.round(math.min((yx).toDouble,dg22.yx))).toInt; yy = (math.round(math.min((yy).toDouble,dg22.yy))).toInt; this }
    def operateEq(sg22: GMat2S)(fun: (Int,Int)=>Int) = { xx = fun(xx,(sg22.xx).toInt); xy = fun(xy,(sg22.xy).toInt); yx = fun(yx,(sg22.yx).toInt); yy = fun(yy,(sg22.yy).toInt); this }
    def operateEq(ig22: GMat2I)(fun: (Int,Int)=>Int) = { xx = fun(xx,ig22.xx); xy = fun(xy,ig22.xy); yx = fun(yx,ig22.yx); yy = fun(yy,ig22.yy); this }
    def operateEqCast(lg22: GMat2L)(fun: (Long,Long)=>Long) = { xx = (fun((xx).toLong,lg22.xx)).toInt; xy = (fun((xy).toLong,lg22.xy)).toInt; yx = (fun((yx).toLong,lg22.yx)).toInt; yy = (fun((yy).toLong,lg22.yy)).toInt; this }
    def operateEqCast(fg22: GMat2F)(fun: (Float,Float)=>Float) = { xx = math.round(fun((xx).toFloat,fg22.xx)); xy = math.round(fun((xy).toFloat,fg22.xy)); yx = math.round(fun((yx).toFloat,fg22.yx)); yy = math.round(fun((yy).toFloat,fg22.yy)); this }
    def operateEqCast(dg22: GMat2D)(fun: (Double,Double)=>Double) = { xx = (math.round(fun((xx).toDouble,dg22.xx))).toInt; xy = (math.round(fun((xy).toDouble,dg22.xy))).toInt; yx = (math.round(fun((yx).toDouble,dg22.yx))).toInt; yy = (math.round(fun((yy).toDouble,dg22.yy))).toInt; this }
    def :|~(sg2: GVec2S) = { xx = (sg2.x).toInt; xy = (sg2.x).toInt; yx = (sg2.y).toInt; yy = (sg2.y).toInt; this }
    def :-~(sg2: GVec2S) = { xx = (sg2.x).toInt; xy = (sg2.y).toInt; yx = (sg2.x).toInt; yy = (sg2.y).toInt; this }
    def :|~(ig2: GVec2I) = { xx = ig2.x; xy = ig2.x; yx = ig2.y; yy = ig2.y; this }
    def :-~(ig2: GVec2I) = { xx = ig2.x; xy = ig2.y; yx = ig2.x; yy = ig2.y; this }
    def :|~~(lg2: GVec2L) = { xx = (lg2.x).toInt; xy = (lg2.x).toInt; yx = (lg2.y).toInt; yy = (lg2.y).toInt; this }
    def :-~~(lg2: GVec2L) = { xx = (lg2.x).toInt; xy = (lg2.y).toInt; yx = (lg2.x).toInt; yy = (lg2.y).toInt; this }
    def :|~~(fg2: GVec2F) = { xx = math.round(fg2.x); xy = math.round(fg2.x); yx = math.round(fg2.y); yy = math.round(fg2.y); this }
    def :-~~(fg2: GVec2F) = { xx = math.round(fg2.x); xy = math.round(fg2.y); yx = math.round(fg2.x); yy = math.round(fg2.y); this }
    def :|~~(dg2: GVec2D) = { xx = (math.round(dg2.x)).toInt; xy = (math.round(dg2.x)).toInt; yx = (math.round(dg2.y)).toInt; yy = (math.round(dg2.y)).toInt; this }
    def :-~~(dg2: GVec2D) = { xx = (math.round(dg2.x)).toInt; xy = (math.round(dg2.y)).toInt; yx = (math.round(dg2.x)).toInt; yy = (math.round(dg2.y)).toInt; this }
    def **~(sg22: GMat2S) = {val xx0 = xx*(sg22.xx).toInt+xy*(sg22.yx).toInt; val xy0 = xx*(sg22.xy).toInt+xy*(sg22.yy).toInt; val yx0 = yx*(sg22.xx).toInt+yy*(sg22.yx).toInt; val yy0 = yx*(sg22.xy).toInt+yy*(sg22.yy).toInt; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(ig22: GMat2I) = {val xx0 = xx*ig22.xx+xy*ig22.yx; val xy0 = xx*ig22.xy+xy*ig22.yy; val yx0 = yx*ig22.xx+yy*ig22.yx; val yy0 = yx*ig22.xy+yy*ig22.yy; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~~(lg22: GMat2L) = {val xx0 = (xx).toLong*lg22.xx+(xy).toLong*lg22.yx; val xy0 = (xx).toLong*lg22.xy+(xy).toLong*lg22.yy; val yx0 = (yx).toLong*lg22.xx+(yy).toLong*lg22.yx; val yy0 = (yx).toLong*lg22.xy+(yy).toLong*lg22.yy; xx = (xx0).toInt; xy = (xy0).toInt; yx = (yx0).toInt; yy = (yy0).toInt; this }
    def **~~(fg22: GMat2F) = {val xx0 = (xx).toFloat*fg22.xx+(xy).toFloat*fg22.yx; val xy0 = (xx).toFloat*fg22.xy+(xy).toFloat*fg22.yy; val yx0 = (yx).toFloat*fg22.xx+(yy).toFloat*fg22.yx; val yy0 = (yx).toFloat*fg22.xy+(yy).toFloat*fg22.yy; xx = math.round(xx0); xy = math.round(xy0); yx = math.round(yx0); yy = math.round(yy0); this }
    def **~~(dg22: GMat2D) = {val xx0 = (xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx; val xy0 = (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy; val yx0 = (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx; val yy0 = (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy; xx = (math.round(xx0)).toInt; xy = (math.round(xy0)).toInt; yx = (math.round(yx0)).toInt; yy = (math.round(yy0)).toInt; this }
    class RowViewX extends AVec2I { def x = xx; def x_=(x0: Int) { xx = x0 }; def y = xy; def y_=(x0: Int) { xy = x0 } }
    class ColViewX extends AVec2I { def x = xx; def x_=(x0: Int) { xx = x0 }; def y = yx; def y_=(x0: Int) { yx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec2I { def x = yx; def x_=(x0: Int) { yx = x0 }; def y = yy; def y_=(x0: Int) { yy = x0 } }
    class ColViewY extends AVec2I { def x = xy; def x_=(x0: Int) { xy = x0 }; def y = yy; def y_=(x0: Int) { yy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; this }
  } // class AMat2I

  object AMat2I {
    def apply(xx0: Int, xy0: Int, yx0: Int, yy0: Int): AMat2I = new MMat2I(xx0, xy0, yx0, yy0)
    def parse(str: String): AMat2I = IMat2I.parse(str).mut
    def identity: AMat2I = MMat2I.identity
    def zero: AMat2I = MMat2I.zero
    def traced(ig2: GVec2I) = new MMat2I(ig2.x, 0, 0, ig2.y)
  } // object AMat2I


  abstract class AMat2L extends GMat2L {
    def xx_=(xx0: Long): Unit
    def xy_=(xy0: Long): Unit
    def yx_=(yx0: Long): Unit
    def yy_=(yy0: Long): Unit
    override def clone(): AMat2L = new MMat2L(xx, xy, yx, yy)
    override def toS: AMat2S = new MMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def toI: AMat2I = new MMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, yx0: Long = yx, yy0: Long = yy): AMat2L = new MMat2L(xx0, xy0, yx0, yy0)
    override def pad(padding: Long = 1): AMat3L = new MMat3L(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapEq(fun: Long => Long): this.type = {xx = fun(xx); xy = fun(xy); yx = fun(yx); yy = fun(yy); this }
    override def toF: AMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: AMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; yx = -yx; yy = -yy; this }
    def :~(x0: Long): this.type = { xx = x0; xy = x0; yx = x0; yy = x0; this }
    def :~~(x0: Double): this.type = { xx = math.round(x0); xy = math.round(x0); yx = math.round(x0); yy = math.round(x0); this }
    def :~(sg22: GMat2S): this.type = { xx = (sg22.xx).toLong; xy = (sg22.xy).toLong; yx = (sg22.yx).toLong; yy = (sg22.yy).toLong; this }
    def :~(ig22: GMat2I): this.type = { xx = (ig22.xx).toLong; xy = (ig22.xy).toLong; yx = (ig22.yx).toLong; yy = (ig22.yy).toLong; this }
    def :~(lg22: GMat2L): this.type = { xx = lg22.xx; xy = lg22.xy; yx = lg22.yx; yy = lg22.yy; this }
    def :~(xx0: Long, xy0: Long, yx0: Long, yy0: Long): this.type = { xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def :~~(fg22: GMat2F): this.type = { xx = math.round((fg22.xx).toDouble); xy = math.round((fg22.xy).toDouble); yx = math.round((fg22.yx).toDouble); yy = math.round((fg22.yy).toDouble); this }
    def :~~(dg22: GMat2D): this.type = { xx = math.round(dg22.xx); xy = math.round(dg22.xy); yx = math.round(dg22.yx); yy = math.round(dg22.yy); this }
    def +~(x0: Long): this.type = { xx = xx + x0; xy = xy + x0; yx = yx + x0; yy = yy + x0; this }
    def +~~(x0: Double): this.type = { xx = math.round((xx).toDouble + x0); xy = math.round((xy).toDouble + x0); yx = math.round((yx).toDouble + x0); yy = math.round((yy).toDouble + x0); this }
    def +~(sg22: GMat2S): this.type = { xx = xx + (sg22.xx).toLong; xy = xy + (sg22.xy).toLong; yx = yx + (sg22.yx).toLong; yy = yy + (sg22.yy).toLong; this }
    def +~(ig22: GMat2I): this.type = { xx = xx + (ig22.xx).toLong; xy = xy + (ig22.xy).toLong; yx = yx + (ig22.yx).toLong; yy = yy + (ig22.yy).toLong; this }
    def +~(lg22: GMat2L): this.type = { xx = xx + lg22.xx; xy = xy + lg22.xy; yx = yx + lg22.yx; yy = yy + lg22.yy; this }
    def +~(xx0: Long, xy0: Long, yx0: Long, yy0: Long): this.type = { xx = xx + xx0; xy = xy + xy0; yx = yx + yx0; yy = yy + yy0; this }
    def +~~(fg22: GMat2F): this.type = { xx = math.round((xx).toDouble + (fg22.xx).toDouble); xy = math.round((xy).toDouble + (fg22.xy).toDouble); yx = math.round((yx).toDouble + (fg22.yx).toDouble); yy = math.round((yy).toDouble + (fg22.yy).toDouble); this }
    def +~~(dg22: GMat2D): this.type = { xx = math.round((xx).toDouble + dg22.xx); xy = math.round((xy).toDouble + dg22.xy); yx = math.round((yx).toDouble + dg22.yx); yy = math.round((yy).toDouble + dg22.yy); this }
    def -~(x0: Long): this.type = { xx = xx - x0; xy = xy - x0; yx = yx - x0; yy = yy - x0; this }
    def -~~(x0: Double): this.type = { xx = math.round((xx).toDouble - x0); xy = math.round((xy).toDouble - x0); yx = math.round((yx).toDouble - x0); yy = math.round((yy).toDouble - x0); this }
    def -~(sg22: GMat2S): this.type = { xx = xx - (sg22.xx).toLong; xy = xy - (sg22.xy).toLong; yx = yx - (sg22.yx).toLong; yy = yy - (sg22.yy).toLong; this }
    def -~(ig22: GMat2I): this.type = { xx = xx - (ig22.xx).toLong; xy = xy - (ig22.xy).toLong; yx = yx - (ig22.yx).toLong; yy = yy - (ig22.yy).toLong; this }
    def -~(lg22: GMat2L): this.type = { xx = xx - lg22.xx; xy = xy - lg22.xy; yx = yx - lg22.yx; yy = yy - lg22.yy; this }
    def -~(xx0: Long, xy0: Long, yx0: Long, yy0: Long): this.type = { xx = xx - xx0; xy = xy - xy0; yx = yx - yx0; yy = yy - yy0; this }
    def -~~(fg22: GMat2F): this.type = { xx = math.round((xx).toDouble - (fg22.xx).toDouble); xy = math.round((xy).toDouble - (fg22.xy).toDouble); yx = math.round((yx).toDouble - (fg22.yx).toDouble); yy = math.round((yy).toDouble - (fg22.yy).toDouble); this }
    def -~~(dg22: GMat2D): this.type = { xx = math.round((xx).toDouble - dg22.xx); xy = math.round((xy).toDouble - dg22.xy); yx = math.round((yx).toDouble - dg22.yx); yy = math.round((yy).toDouble - dg22.yy); this }
    def *~(x0: Long): this.type = { xx = xx * x0; xy = xy * x0; yx = yx * x0; yy = yy * x0; this }
    def *~~(x0: Double): this.type = { xx = math.round((xx).toDouble * x0); xy = math.round((xy).toDouble * x0); yx = math.round((yx).toDouble * x0); yy = math.round((yy).toDouble * x0); this }
    def *~(sg22: GMat2S): this.type = { xx = xx * (sg22.xx).toLong; xy = xy * (sg22.xy).toLong; yx = yx * (sg22.yx).toLong; yy = yy * (sg22.yy).toLong; this }
    def *~(ig22: GMat2I): this.type = { xx = xx * (ig22.xx).toLong; xy = xy * (ig22.xy).toLong; yx = yx * (ig22.yx).toLong; yy = yy * (ig22.yy).toLong; this }
    def *~(lg22: GMat2L): this.type = { xx = xx * lg22.xx; xy = xy * lg22.xy; yx = yx * lg22.yx; yy = yy * lg22.yy; this }
    def *~(xx0: Long, xy0: Long, yx0: Long, yy0: Long): this.type = { xx = xx * xx0; xy = xy * xy0; yx = yx * yx0; yy = yy * yy0; this }
    def *~~(fg22: GMat2F): this.type = { xx = math.round((xx).toDouble * (fg22.xx).toDouble); xy = math.round((xy).toDouble * (fg22.xy).toDouble); yx = math.round((yx).toDouble * (fg22.yx).toDouble); yy = math.round((yy).toDouble * (fg22.yy).toDouble); this }
    def *~~(dg22: GMat2D): this.type = { xx = math.round((xx).toDouble * dg22.xx); xy = math.round((xy).toDouble * dg22.xy); yx = math.round((yx).toDouble * dg22.yx); yy = math.round((yy).toDouble * dg22.yy); this }
    def /~(x0: Long): this.type = { xx = xx / x0; xy = xy / x0; yx = yx / x0; yy = yy / x0; this }
    def /~~(x0: Double): this.type = { xx = math.round((xx).toDouble / x0); xy = math.round((xy).toDouble / x0); yx = math.round((yx).toDouble / x0); yy = math.round((yy).toDouble / x0); this }
    def /~(sg22: GMat2S): this.type = { xx = xx / (sg22.xx).toLong; xy = xy / (sg22.xy).toLong; yx = yx / (sg22.yx).toLong; yy = yy / (sg22.yy).toLong; this }
    def /~(ig22: GMat2I): this.type = { xx = xx / (ig22.xx).toLong; xy = xy / (ig22.xy).toLong; yx = yx / (ig22.yx).toLong; yy = yy / (ig22.yy).toLong; this }
    def /~(lg22: GMat2L): this.type = { xx = xx / lg22.xx; xy = xy / lg22.xy; yx = yx / lg22.yx; yy = yy / lg22.yy; this }
    def /~(xx0: Long, xy0: Long, yx0: Long, yy0: Long): this.type = { xx = xx / xx0; xy = xy / xy0; yx = yx / yx0; yy = yy / yy0; this }
    def /~~(fg22: GMat2F): this.type = { xx = math.round((xx).toDouble / (fg22.xx).toDouble); xy = math.round((xy).toDouble / (fg22.xy).toDouble); yx = math.round((yx).toDouble / (fg22.yx).toDouble); yy = math.round((yy).toDouble / (fg22.yy).toDouble); this }
    def /~~(dg22: GMat2D): this.type = { xx = math.round((xx).toDouble / dg22.xx); xy = math.round((xy).toDouble / dg22.xy); yx = math.round((yx).toDouble / dg22.yx); yy = math.round((yy).toDouble / dg22.yy); this }
    def maxEq(x0: Long): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); this }
    def maxEqCast(x0: Double): this.type = { xx = math.round(math.max((xx).toDouble,x0)); xy = math.round(math.max((xy).toDouble,x0)); yx = math.round(math.max((yx).toDouble,x0)); yy = math.round(math.max((yy).toDouble,x0)); this }
    def maxEq(sg22: GMat2S): this.type = { xx = math.max(xx,(sg22.xx).toLong); xy = math.max(xy,(sg22.xy).toLong); yx = math.max(yx,(sg22.yx).toLong); yy = math.max(yy,(sg22.yy).toLong); this }
    def maxEq(ig22: GMat2I): this.type = { xx = math.max(xx,(ig22.xx).toLong); xy = math.max(xy,(ig22.xy).toLong); yx = math.max(yx,(ig22.yx).toLong); yy = math.max(yy,(ig22.yy).toLong); this }
    def maxEq(lg22: GMat2L): this.type = { xx = math.max(xx,lg22.xx); xy = math.max(xy,lg22.xy); yx = math.max(yx,lg22.yx); yy = math.max(yy,lg22.yy); this }
    def maxEq(xx0: Long, xy0: Long, yx0: Long, yy0: Long): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); this }
    def maxEqCast(fg22: GMat2F): this.type = { xx = math.round(math.max((xx).toDouble,(fg22.xx).toDouble)); xy = math.round(math.max((xy).toDouble,(fg22.xy).toDouble)); yx = math.round(math.max((yx).toDouble,(fg22.yx).toDouble)); yy = math.round(math.max((yy).toDouble,(fg22.yy).toDouble)); this }
    def maxEqCast(dg22: GMat2D): this.type = { xx = math.round(math.max((xx).toDouble,dg22.xx)); xy = math.round(math.max((xy).toDouble,dg22.xy)); yx = math.round(math.max((yx).toDouble,dg22.yx)); yy = math.round(math.max((yy).toDouble,dg22.yy)); this }
    def minEq(x0: Long): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); this }
    def minEqCast(x0: Double): this.type = { xx = math.round(math.min((xx).toDouble,x0)); xy = math.round(math.min((xy).toDouble,x0)); yx = math.round(math.min((yx).toDouble,x0)); yy = math.round(math.min((yy).toDouble,x0)); this }
    def minEq(sg22: GMat2S): this.type = { xx = math.min(xx,(sg22.xx).toLong); xy = math.min(xy,(sg22.xy).toLong); yx = math.min(yx,(sg22.yx).toLong); yy = math.min(yy,(sg22.yy).toLong); this }
    def minEq(ig22: GMat2I): this.type = { xx = math.min(xx,(ig22.xx).toLong); xy = math.min(xy,(ig22.xy).toLong); yx = math.min(yx,(ig22.yx).toLong); yy = math.min(yy,(ig22.yy).toLong); this }
    def minEq(lg22: GMat2L): this.type = { xx = math.min(xx,lg22.xx); xy = math.min(xy,lg22.xy); yx = math.min(yx,lg22.yx); yy = math.min(yy,lg22.yy); this }
    def minEq(xx0: Long, xy0: Long, yx0: Long, yy0: Long): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); this }
    def minEqCast(fg22: GMat2F): this.type = { xx = math.round(math.min((xx).toDouble,(fg22.xx).toDouble)); xy = math.round(math.min((xy).toDouble,(fg22.xy).toDouble)); yx = math.round(math.min((yx).toDouble,(fg22.yx).toDouble)); yy = math.round(math.min((yy).toDouble,(fg22.yy).toDouble)); this }
    def minEqCast(dg22: GMat2D): this.type = { xx = math.round(math.min((xx).toDouble,dg22.xx)); xy = math.round(math.min((xy).toDouble,dg22.xy)); yx = math.round(math.min((yx).toDouble,dg22.yx)); yy = math.round(math.min((yy).toDouble,dg22.yy)); this }
    def operateEq(sg22: GMat2S)(fun: (Long,Long)=>Long) = { xx = fun(xx,(sg22.xx).toLong); xy = fun(xy,(sg22.xy).toLong); yx = fun(yx,(sg22.yx).toLong); yy = fun(yy,(sg22.yy).toLong); this }
    def operateEq(ig22: GMat2I)(fun: (Long,Long)=>Long) = { xx = fun(xx,(ig22.xx).toLong); xy = fun(xy,(ig22.xy).toLong); yx = fun(yx,(ig22.yx).toLong); yy = fun(yy,(ig22.yy).toLong); this }
    def operateEq(lg22: GMat2L)(fun: (Long,Long)=>Long) = { xx = fun(xx,lg22.xx); xy = fun(xy,lg22.xy); yx = fun(yx,lg22.yx); yy = fun(yy,lg22.yy); this }
    def operateEqCast(fg22: GMat2F)(fun: (Double,Double)=>Double) = { xx = math.round(fun((xx).toDouble,(fg22.xx).toDouble)); xy = math.round(fun((xy).toDouble,(fg22.xy).toDouble)); yx = math.round(fun((yx).toDouble,(fg22.yx).toDouble)); yy = math.round(fun((yy).toDouble,(fg22.yy).toDouble)); this }
    def operateEqCast(dg22: GMat2D)(fun: (Double,Double)=>Double) = { xx = math.round(fun((xx).toDouble,dg22.xx)); xy = math.round(fun((xy).toDouble,dg22.xy)); yx = math.round(fun((yx).toDouble,dg22.yx)); yy = math.round(fun((yy).toDouble,dg22.yy)); this }
    def :|~(sg2: GVec2S) = { xx = (sg2.x).toLong; xy = (sg2.x).toLong; yx = (sg2.y).toLong; yy = (sg2.y).toLong; this }
    def :-~(sg2: GVec2S) = { xx = (sg2.x).toLong; xy = (sg2.y).toLong; yx = (sg2.x).toLong; yy = (sg2.y).toLong; this }
    def :|~(ig2: GVec2I) = { xx = (ig2.x).toLong; xy = (ig2.x).toLong; yx = (ig2.y).toLong; yy = (ig2.y).toLong; this }
    def :-~(ig2: GVec2I) = { xx = (ig2.x).toLong; xy = (ig2.y).toLong; yx = (ig2.x).toLong; yy = (ig2.y).toLong; this }
    def :|~(lg2: GVec2L) = { xx = lg2.x; xy = lg2.x; yx = lg2.y; yy = lg2.y; this }
    def :-~(lg2: GVec2L) = { xx = lg2.x; xy = lg2.y; yx = lg2.x; yy = lg2.y; this }
    def :|~~(fg2: GVec2F) = { xx = math.round((fg2.x).toDouble); xy = math.round((fg2.x).toDouble); yx = math.round((fg2.y).toDouble); yy = math.round((fg2.y).toDouble); this }
    def :-~~(fg2: GVec2F) = { xx = math.round((fg2.x).toDouble); xy = math.round((fg2.y).toDouble); yx = math.round((fg2.x).toDouble); yy = math.round((fg2.y).toDouble); this }
    def :|~~(dg2: GVec2D) = { xx = math.round(dg2.x); xy = math.round(dg2.x); yx = math.round(dg2.y); yy = math.round(dg2.y); this }
    def :-~~(dg2: GVec2D) = { xx = math.round(dg2.x); xy = math.round(dg2.y); yx = math.round(dg2.x); yy = math.round(dg2.y); this }
    def **~(sg22: GMat2S) = {val xx0 = xx*(sg22.xx).toLong+xy*(sg22.yx).toLong; val xy0 = xx*(sg22.xy).toLong+xy*(sg22.yy).toLong; val yx0 = yx*(sg22.xx).toLong+yy*(sg22.yx).toLong; val yy0 = yx*(sg22.xy).toLong+yy*(sg22.yy).toLong; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(ig22: GMat2I) = {val xx0 = xx*(ig22.xx).toLong+xy*(ig22.yx).toLong; val xy0 = xx*(ig22.xy).toLong+xy*(ig22.yy).toLong; val yx0 = yx*(ig22.xx).toLong+yy*(ig22.yx).toLong; val yy0 = yx*(ig22.xy).toLong+yy*(ig22.yy).toLong; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(lg22: GMat2L) = {val xx0 = xx*lg22.xx+xy*lg22.yx; val xy0 = xx*lg22.xy+xy*lg22.yy; val yx0 = yx*lg22.xx+yy*lg22.yx; val yy0 = yx*lg22.xy+yy*lg22.yy; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~~(fg22: GMat2F) = {val xx0 = (xx).toDouble*(fg22.xx).toDouble+(xy).toDouble*(fg22.yx).toDouble; val xy0 = (xx).toDouble*(fg22.xy).toDouble+(xy).toDouble*(fg22.yy).toDouble; val yx0 = (yx).toDouble*(fg22.xx).toDouble+(yy).toDouble*(fg22.yx).toDouble; val yy0 = (yx).toDouble*(fg22.xy).toDouble+(yy).toDouble*(fg22.yy).toDouble; xx = math.round(xx0); xy = math.round(xy0); yx = math.round(yx0); yy = math.round(yy0); this }
    def **~~(dg22: GMat2D) = {val xx0 = (xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx; val xy0 = (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy; val yx0 = (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx; val yy0 = (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy; xx = math.round(xx0); xy = math.round(xy0); yx = math.round(yx0); yy = math.round(yy0); this }
    class RowViewX extends AVec2L { def x = xx; def x_=(x0: Long) { xx = x0 }; def y = xy; def y_=(x0: Long) { xy = x0 } }
    class ColViewX extends AVec2L { def x = xx; def x_=(x0: Long) { xx = x0 }; def y = yx; def y_=(x0: Long) { yx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec2L { def x = yx; def x_=(x0: Long) { yx = x0 }; def y = yy; def y_=(x0: Long) { yy = x0 } }
    class ColViewY extends AVec2L { def x = xy; def x_=(x0: Long) { xy = x0 }; def y = yy; def y_=(x0: Long) { yy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; this }
  } // class AMat2L

  object AMat2L {
    def apply(xx0: Long, xy0: Long, yx0: Long, yy0: Long): AMat2L = new MMat2L(xx0, xy0, yx0, yy0)
    def parse(str: String): AMat2L = IMat2L.parse(str).mut
    def identity: AMat2L = MMat2L.identity
    def zero: AMat2L = MMat2L.zero
    def traced(lg2: GVec2L) = new MMat2L(lg2.x, 0, 0, lg2.y)
  } // object AMat2L


  abstract class AMat2F extends GMat2F {
    def xx_=(xx0: Float): Unit
    def xy_=(xy0: Float): Unit
    def yx_=(yx0: Float): Unit
    def yy_=(yy0: Float): Unit
    override def clone(): AMat2F = new MMat2F(xx, xy, yx, yy)
    override def toS: AMat2S = new MMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: AMat2I = new MMat2I(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toL: AMat2L = new MMat2L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((yx).toDouble), math.round((yy).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, yx0: Float = yx, yy0: Float = yy): AMat2F = new MMat2F(xx0, xy0, yx0, yy0)
    override def pad(padding: Float = 1): AMat3F = new MMat3F(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapEq(fun: Float => Float): this.type = {xx = fun(xx); xy = fun(xy); yx = fun(yx); yy = fun(yy); this }
    override def toD: AMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; yx = -yx; yy = -yy; this }
    def :~~(x0: Long): this.type = { xx = (x0).toFloat; xy = (x0).toFloat; yx = (x0).toFloat; yy = (x0).toFloat; this }
    def :~(x0: Float): this.type = { xx = x0; xy = x0; yx = x0; yy = x0; this }
    def :~~(x0: Double): this.type = { xx = (x0).toFloat; xy = (x0).toFloat; yx = (x0).toFloat; yy = (x0).toFloat; this }
    def :~(sg22: GMat2S): this.type = { xx = (sg22.xx).toFloat; xy = (sg22.xy).toFloat; yx = (sg22.yx).toFloat; yy = (sg22.yy).toFloat; this }
    def :~(ig22: GMat2I): this.type = { xx = (ig22.xx).toFloat; xy = (ig22.xy).toFloat; yx = (ig22.yx).toFloat; yy = (ig22.yy).toFloat; this }
    def :~~(lg22: GMat2L): this.type = { xx = ((lg22.xx).toDouble).toFloat; xy = ((lg22.xy).toDouble).toFloat; yx = ((lg22.yx).toDouble).toFloat; yy = ((lg22.yy).toDouble).toFloat; this }
    def :~(fg22: GMat2F): this.type = { xx = fg22.xx; xy = fg22.xy; yx = fg22.yx; yy = fg22.yy; this }
    def :~(xx0: Float, xy0: Float, yx0: Float, yy0: Float): this.type = { xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def :~~(dg22: GMat2D): this.type = { xx = (dg22.xx).toFloat; xy = (dg22.xy).toFloat; yx = (dg22.yx).toFloat; yy = (dg22.yy).toFloat; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toDouble + (x0).toDouble).toFloat; xy = ((xy).toDouble + (x0).toDouble).toFloat; yx = ((yx).toDouble + (x0).toDouble).toFloat; yy = ((yy).toDouble + (x0).toDouble).toFloat; this }
    def +~(x0: Float): this.type = { xx = xx + x0; xy = xy + x0; yx = yx + x0; yy = yy + x0; this }
    def +~~(x0: Double): this.type = { xx = ((xx).toDouble + x0).toFloat; xy = ((xy).toDouble + x0).toFloat; yx = ((yx).toDouble + x0).toFloat; yy = ((yy).toDouble + x0).toFloat; this }
    def +~(sg22: GMat2S): this.type = { xx = xx + (sg22.xx).toFloat; xy = xy + (sg22.xy).toFloat; yx = yx + (sg22.yx).toFloat; yy = yy + (sg22.yy).toFloat; this }
    def +~(ig22: GMat2I): this.type = { xx = xx + (ig22.xx).toFloat; xy = xy + (ig22.xy).toFloat; yx = yx + (ig22.yx).toFloat; yy = yy + (ig22.yy).toFloat; this }
    def +~~(lg22: GMat2L): this.type = { xx = ((xx).toDouble + (lg22.xx).toDouble).toFloat; xy = ((xy).toDouble + (lg22.xy).toDouble).toFloat; yx = ((yx).toDouble + (lg22.yx).toDouble).toFloat; yy = ((yy).toDouble + (lg22.yy).toDouble).toFloat; this }
    def +~(fg22: GMat2F): this.type = { xx = xx + fg22.xx; xy = xy + fg22.xy; yx = yx + fg22.yx; yy = yy + fg22.yy; this }
    def +~(xx0: Float, xy0: Float, yx0: Float, yy0: Float): this.type = { xx = xx + xx0; xy = xy + xy0; yx = yx + yx0; yy = yy + yy0; this }
    def +~~(dg22: GMat2D): this.type = { xx = ((xx).toDouble + dg22.xx).toFloat; xy = ((xy).toDouble + dg22.xy).toFloat; yx = ((yx).toDouble + dg22.yx).toFloat; yy = ((yy).toDouble + dg22.yy).toFloat; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toDouble - (x0).toDouble).toFloat; xy = ((xy).toDouble - (x0).toDouble).toFloat; yx = ((yx).toDouble - (x0).toDouble).toFloat; yy = ((yy).toDouble - (x0).toDouble).toFloat; this }
    def -~(x0: Float): this.type = { xx = xx - x0; xy = xy - x0; yx = yx - x0; yy = yy - x0; this }
    def -~~(x0: Double): this.type = { xx = ((xx).toDouble - x0).toFloat; xy = ((xy).toDouble - x0).toFloat; yx = ((yx).toDouble - x0).toFloat; yy = ((yy).toDouble - x0).toFloat; this }
    def -~(sg22: GMat2S): this.type = { xx = xx - (sg22.xx).toFloat; xy = xy - (sg22.xy).toFloat; yx = yx - (sg22.yx).toFloat; yy = yy - (sg22.yy).toFloat; this }
    def -~(ig22: GMat2I): this.type = { xx = xx - (ig22.xx).toFloat; xy = xy - (ig22.xy).toFloat; yx = yx - (ig22.yx).toFloat; yy = yy - (ig22.yy).toFloat; this }
    def -~~(lg22: GMat2L): this.type = { xx = ((xx).toDouble - (lg22.xx).toDouble).toFloat; xy = ((xy).toDouble - (lg22.xy).toDouble).toFloat; yx = ((yx).toDouble - (lg22.yx).toDouble).toFloat; yy = ((yy).toDouble - (lg22.yy).toDouble).toFloat; this }
    def -~(fg22: GMat2F): this.type = { xx = xx - fg22.xx; xy = xy - fg22.xy; yx = yx - fg22.yx; yy = yy - fg22.yy; this }
    def -~(xx0: Float, xy0: Float, yx0: Float, yy0: Float): this.type = { xx = xx - xx0; xy = xy - xy0; yx = yx - yx0; yy = yy - yy0; this }
    def -~~(dg22: GMat2D): this.type = { xx = ((xx).toDouble - dg22.xx).toFloat; xy = ((xy).toDouble - dg22.xy).toFloat; yx = ((yx).toDouble - dg22.yx).toFloat; yy = ((yy).toDouble - dg22.yy).toFloat; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toDouble * (x0).toDouble).toFloat; xy = ((xy).toDouble * (x0).toDouble).toFloat; yx = ((yx).toDouble * (x0).toDouble).toFloat; yy = ((yy).toDouble * (x0).toDouble).toFloat; this }
    def *~(x0: Float): this.type = { xx = xx * x0; xy = xy * x0; yx = yx * x0; yy = yy * x0; this }
    def *~~(x0: Double): this.type = { xx = ((xx).toDouble * x0).toFloat; xy = ((xy).toDouble * x0).toFloat; yx = ((yx).toDouble * x0).toFloat; yy = ((yy).toDouble * x0).toFloat; this }
    def *~(sg22: GMat2S): this.type = { xx = xx * (sg22.xx).toFloat; xy = xy * (sg22.xy).toFloat; yx = yx * (sg22.yx).toFloat; yy = yy * (sg22.yy).toFloat; this }
    def *~(ig22: GMat2I): this.type = { xx = xx * (ig22.xx).toFloat; xy = xy * (ig22.xy).toFloat; yx = yx * (ig22.yx).toFloat; yy = yy * (ig22.yy).toFloat; this }
    def *~~(lg22: GMat2L): this.type = { xx = ((xx).toDouble * (lg22.xx).toDouble).toFloat; xy = ((xy).toDouble * (lg22.xy).toDouble).toFloat; yx = ((yx).toDouble * (lg22.yx).toDouble).toFloat; yy = ((yy).toDouble * (lg22.yy).toDouble).toFloat; this }
    def *~(fg22: GMat2F): this.type = { xx = xx * fg22.xx; xy = xy * fg22.xy; yx = yx * fg22.yx; yy = yy * fg22.yy; this }
    def *~(xx0: Float, xy0: Float, yx0: Float, yy0: Float): this.type = { xx = xx * xx0; xy = xy * xy0; yx = yx * yx0; yy = yy * yy0; this }
    def *~~(dg22: GMat2D): this.type = { xx = ((xx).toDouble * dg22.xx).toFloat; xy = ((xy).toDouble * dg22.xy).toFloat; yx = ((yx).toDouble * dg22.yx).toFloat; yy = ((yy).toDouble * dg22.yy).toFloat; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toDouble / (x0).toDouble).toFloat; xy = ((xy).toDouble / (x0).toDouble).toFloat; yx = ((yx).toDouble / (x0).toDouble).toFloat; yy = ((yy).toDouble / (x0).toDouble).toFloat; this }
    def /~(x0: Float): this.type = { xx = xx / x0; xy = xy / x0; yx = yx / x0; yy = yy / x0; this }
    def /~~(x0: Double): this.type = { xx = ((xx).toDouble / x0).toFloat; xy = ((xy).toDouble / x0).toFloat; yx = ((yx).toDouble / x0).toFloat; yy = ((yy).toDouble / x0).toFloat; this }
    def /~(sg22: GMat2S): this.type = { xx = xx / (sg22.xx).toFloat; xy = xy / (sg22.xy).toFloat; yx = yx / (sg22.yx).toFloat; yy = yy / (sg22.yy).toFloat; this }
    def /~(ig22: GMat2I): this.type = { xx = xx / (ig22.xx).toFloat; xy = xy / (ig22.xy).toFloat; yx = yx / (ig22.yx).toFloat; yy = yy / (ig22.yy).toFloat; this }
    def /~~(lg22: GMat2L): this.type = { xx = ((xx).toDouble / (lg22.xx).toDouble).toFloat; xy = ((xy).toDouble / (lg22.xy).toDouble).toFloat; yx = ((yx).toDouble / (lg22.yx).toDouble).toFloat; yy = ((yy).toDouble / (lg22.yy).toDouble).toFloat; this }
    def /~(fg22: GMat2F): this.type = { xx = xx / fg22.xx; xy = xy / fg22.xy; yx = yx / fg22.yx; yy = yy / fg22.yy; this }
    def /~(xx0: Float, xy0: Float, yx0: Float, yy0: Float): this.type = { xx = xx / xx0; xy = xy / xy0; yx = yx / yx0; yy = yy / yy0; this }
    def /~~(dg22: GMat2D): this.type = { xx = ((xx).toDouble / dg22.xx).toFloat; xy = ((xy).toDouble / dg22.xy).toFloat; yx = ((yx).toDouble / dg22.yx).toFloat; yy = ((yy).toDouble / dg22.yy).toFloat; this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toDouble,(x0).toDouble)).toFloat; xy = (math.max((xy).toDouble,(x0).toDouble)).toFloat; yx = (math.max((yx).toDouble,(x0).toDouble)).toFloat; yy = (math.max((yy).toDouble,(x0).toDouble)).toFloat; this }
    def maxEq(x0: Float): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); this }
    def maxEqCast(x0: Double): this.type = { xx = (math.max((xx).toDouble,x0)).toFloat; xy = (math.max((xy).toDouble,x0)).toFloat; yx = (math.max((yx).toDouble,x0)).toFloat; yy = (math.max((yy).toDouble,x0)).toFloat; this }
    def maxEq(sg22: GMat2S): this.type = { xx = math.max(xx,(sg22.xx).toFloat); xy = math.max(xy,(sg22.xy).toFloat); yx = math.max(yx,(sg22.yx).toFloat); yy = math.max(yy,(sg22.yy).toFloat); this }
    def maxEq(ig22: GMat2I): this.type = { xx = math.max(xx,(ig22.xx).toFloat); xy = math.max(xy,(ig22.xy).toFloat); yx = math.max(yx,(ig22.yx).toFloat); yy = math.max(yy,(ig22.yy).toFloat); this }
    def maxEqCast(lg22: GMat2L): this.type = { xx = (math.max((xx).toDouble,(lg22.xx).toDouble)).toFloat; xy = (math.max((xy).toDouble,(lg22.xy).toDouble)).toFloat; yx = (math.max((yx).toDouble,(lg22.yx).toDouble)).toFloat; yy = (math.max((yy).toDouble,(lg22.yy).toDouble)).toFloat; this }
    def maxEq(fg22: GMat2F): this.type = { xx = math.max(xx,fg22.xx); xy = math.max(xy,fg22.xy); yx = math.max(yx,fg22.yx); yy = math.max(yy,fg22.yy); this }
    def maxEq(xx0: Float, xy0: Float, yx0: Float, yy0: Float): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); this }
    def maxEqCast(dg22: GMat2D): this.type = { xx = (math.max((xx).toDouble,dg22.xx)).toFloat; xy = (math.max((xy).toDouble,dg22.xy)).toFloat; yx = (math.max((yx).toDouble,dg22.yx)).toFloat; yy = (math.max((yy).toDouble,dg22.yy)).toFloat; this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toDouble,(x0).toDouble)).toFloat; xy = (math.min((xy).toDouble,(x0).toDouble)).toFloat; yx = (math.min((yx).toDouble,(x0).toDouble)).toFloat; yy = (math.min((yy).toDouble,(x0).toDouble)).toFloat; this }
    def minEq(x0: Float): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); this }
    def minEqCast(x0: Double): this.type = { xx = (math.min((xx).toDouble,x0)).toFloat; xy = (math.min((xy).toDouble,x0)).toFloat; yx = (math.min((yx).toDouble,x0)).toFloat; yy = (math.min((yy).toDouble,x0)).toFloat; this }
    def minEq(sg22: GMat2S): this.type = { xx = math.min(xx,(sg22.xx).toFloat); xy = math.min(xy,(sg22.xy).toFloat); yx = math.min(yx,(sg22.yx).toFloat); yy = math.min(yy,(sg22.yy).toFloat); this }
    def minEq(ig22: GMat2I): this.type = { xx = math.min(xx,(ig22.xx).toFloat); xy = math.min(xy,(ig22.xy).toFloat); yx = math.min(yx,(ig22.yx).toFloat); yy = math.min(yy,(ig22.yy).toFloat); this }
    def minEqCast(lg22: GMat2L): this.type = { xx = (math.min((xx).toDouble,(lg22.xx).toDouble)).toFloat; xy = (math.min((xy).toDouble,(lg22.xy).toDouble)).toFloat; yx = (math.min((yx).toDouble,(lg22.yx).toDouble)).toFloat; yy = (math.min((yy).toDouble,(lg22.yy).toDouble)).toFloat; this }
    def minEq(fg22: GMat2F): this.type = { xx = math.min(xx,fg22.xx); xy = math.min(xy,fg22.xy); yx = math.min(yx,fg22.yx); yy = math.min(yy,fg22.yy); this }
    def minEq(xx0: Float, xy0: Float, yx0: Float, yy0: Float): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); this }
    def minEqCast(dg22: GMat2D): this.type = { xx = (math.min((xx).toDouble,dg22.xx)).toFloat; xy = (math.min((xy).toDouble,dg22.xy)).toFloat; yx = (math.min((yx).toDouble,dg22.yx)).toFloat; yy = (math.min((yy).toDouble,dg22.yy)).toFloat; this }
    def operateEq(sg22: GMat2S)(fun: (Float,Float)=>Float) = { xx = fun(xx,(sg22.xx).toFloat); xy = fun(xy,(sg22.xy).toFloat); yx = fun(yx,(sg22.yx).toFloat); yy = fun(yy,(sg22.yy).toFloat); this }
    def operateEq(ig22: GMat2I)(fun: (Float,Float)=>Float) = { xx = fun(xx,(ig22.xx).toFloat); xy = fun(xy,(ig22.xy).toFloat); yx = fun(yx,(ig22.yx).toFloat); yy = fun(yy,(ig22.yy).toFloat); this }
    def operateEqCast(lg22: GMat2L)(fun: (Double,Double)=>Double) = { xx = (fun((xx).toDouble,(lg22.xx).toDouble)).toFloat; xy = (fun((xy).toDouble,(lg22.xy).toDouble)).toFloat; yx = (fun((yx).toDouble,(lg22.yx).toDouble)).toFloat; yy = (fun((yy).toDouble,(lg22.yy).toDouble)).toFloat; this }
    def operateEq(fg22: GMat2F)(fun: (Float,Float)=>Float) = { xx = fun(xx,fg22.xx); xy = fun(xy,fg22.xy); yx = fun(yx,fg22.yx); yy = fun(yy,fg22.yy); this }
    def operateEqCast(dg22: GMat2D)(fun: (Double,Double)=>Double) = { xx = (fun((xx).toDouble,dg22.xx)).toFloat; xy = (fun((xy).toDouble,dg22.xy)).toFloat; yx = (fun((yx).toDouble,dg22.yx)).toFloat; yy = (fun((yy).toDouble,dg22.yy)).toFloat; this }
    def :|~(sg2: GVec2S) = { xx = (sg2.x).toFloat; xy = (sg2.x).toFloat; yx = (sg2.y).toFloat; yy = (sg2.y).toFloat; this }
    def :-~(sg2: GVec2S) = { xx = (sg2.x).toFloat; xy = (sg2.y).toFloat; yx = (sg2.x).toFloat; yy = (sg2.y).toFloat; this }
    def :|~(ig2: GVec2I) = { xx = (ig2.x).toFloat; xy = (ig2.x).toFloat; yx = (ig2.y).toFloat; yy = (ig2.y).toFloat; this }
    def :-~(ig2: GVec2I) = { xx = (ig2.x).toFloat; xy = (ig2.y).toFloat; yx = (ig2.x).toFloat; yy = (ig2.y).toFloat; this }
    def :|~~(lg2: GVec2L) = { xx = (lg2.x).toFloat; xy = (lg2.x).toFloat; yx = (lg2.y).toFloat; yy = (lg2.y).toFloat; this }
    def :-~~(lg2: GVec2L) = { xx = (lg2.x).toFloat; xy = (lg2.y).toFloat; yx = (lg2.x).toFloat; yy = (lg2.y).toFloat; this }
    def :|~(fg2: GVec2F) = { xx = fg2.x; xy = fg2.x; yx = fg2.y; yy = fg2.y; this }
    def :-~(fg2: GVec2F) = { xx = fg2.x; xy = fg2.y; yx = fg2.x; yy = fg2.y; this }
    def :|~~(dg2: GVec2D) = { xx = (dg2.x).toFloat; xy = (dg2.x).toFloat; yx = (dg2.y).toFloat; yy = (dg2.y).toFloat; this }
    def :-~~(dg2: GVec2D) = { xx = (dg2.x).toFloat; xy = (dg2.y).toFloat; yx = (dg2.x).toFloat; yy = (dg2.y).toFloat; this }
    def **~(sg22: GMat2S) = {val xx0 = xx*(sg22.xx).toFloat+xy*(sg22.yx).toFloat; val xy0 = xx*(sg22.xy).toFloat+xy*(sg22.yy).toFloat; val yx0 = yx*(sg22.xx).toFloat+yy*(sg22.yx).toFloat; val yy0 = yx*(sg22.xy).toFloat+yy*(sg22.yy).toFloat; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(ig22: GMat2I) = {val xx0 = xx*(ig22.xx).toFloat+xy*(ig22.yx).toFloat; val xy0 = xx*(ig22.xy).toFloat+xy*(ig22.yy).toFloat; val yx0 = yx*(ig22.xx).toFloat+yy*(ig22.yx).toFloat; val yy0 = yx*(ig22.xy).toFloat+yy*(ig22.yy).toFloat; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~~(lg22: GMat2L) = {val xx0 = (xx).toDouble*(lg22.xx).toDouble+(xy).toDouble*(lg22.yx).toDouble; val xy0 = (xx).toDouble*(lg22.xy).toDouble+(xy).toDouble*(lg22.yy).toDouble; val yx0 = (yx).toDouble*(lg22.xx).toDouble+(yy).toDouble*(lg22.yx).toDouble; val yy0 = (yx).toDouble*(lg22.xy).toDouble+(yy).toDouble*(lg22.yy).toDouble; xx = (xx0).toFloat; xy = (xy0).toFloat; yx = (yx0).toFloat; yy = (yy0).toFloat; this }
    def **~(fg22: GMat2F) = {val xx0 = xx*fg22.xx+xy*fg22.yx; val xy0 = xx*fg22.xy+xy*fg22.yy; val yx0 = yx*fg22.xx+yy*fg22.yx; val yy0 = yx*fg22.xy+yy*fg22.yy; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~~(dg22: GMat2D) = {val xx0 = (xx).toDouble*dg22.xx+(xy).toDouble*dg22.yx; val xy0 = (xx).toDouble*dg22.xy+(xy).toDouble*dg22.yy; val yx0 = (yx).toDouble*dg22.xx+(yy).toDouble*dg22.yx; val yy0 = (yx).toDouble*dg22.xy+(yy).toDouble*dg22.yy; xx = (xx0).toFloat; xy = (xy0).toFloat; yx = (yx0).toFloat; yy = (yy0).toFloat; this }
    def gaussJordanEq(fg22: GMat2F): this.type = {var xx0 = fg22.xx; var xy0 = fg22.xy; var yx0 = fg22.yx; var yy0 = fg22.yy; if (math.abs(xx) < math.abs(yx)) {val i22=1/yx; yx=xx; xx=1; var t22=xy; xy=yy*i22; yy=t22; t22=xx0; xx0=yx0*i22; yx0=t22; t22=xy0; xy0=yy0*i22; yy0=t22} else {val i21=1/xx; xx=1; xy=xy*i21; xx0*=i21; xy0*=i21}; { val j22=yx/xx; yx=0; yy=yy-xy*j22; yx0-=xx0*j22; yy0-=xy0*j22}; { val i10=1/yy; yy=1; yx0*=i10; yy0*=i10 }; xx0-=xy*yx0; xy0-=xy*yy0; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    class RowViewX extends AVec2F { def x = xx; def x_=(x0: Float) { xx = x0 }; def y = xy; def y_=(x0: Float) { xy = x0 } }
    class ColViewX extends AVec2F { def x = xx; def x_=(x0: Float) { xx = x0 }; def y = yx; def y_=(x0: Float) { yx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec2F { def x = yx; def x_=(x0: Float) { yx = x0 }; def y = yy; def y_=(x0: Float) { yy = x0 } }
    class ColViewY extends AVec2F { def x = xy; def x_=(x0: Float) { xy = x0 }; def y = yy; def y_=(x0: Float) { yy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; this }
    def invEq: this.type = { val idet = 1/det; var temp: Float = yy; yy = xx*idet; xx = temp*idet; xy = -xy*idet; yx = -yx*idet; this }
  } // class AMat2F

  object AMat2F {
    def apply(xx0: Float, xy0: Float, yx0: Float, yy0: Float): AMat2F = new MMat2F(xx0, xy0, yx0, yy0)
    def parse(str: String): AMat2F = IMat2F.parse(str).mut
    def rotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat2F((c).toFloat, (-s).toFloat, (s).toFloat, (c).toFloat) }
    def identity: AMat2F = MMat2F.identity
    def zero: AMat2F = MMat2F.zero
    def traced(fg2: GVec2F) = new MMat2F(fg2.x, 0, 0, fg2.y)
  } // object AMat2F


  abstract class AMat2D extends GMat2D {
    def xx_=(xx0: Double): Unit
    def xy_=(xy0: Double): Unit
    def yx_=(yx0: Double): Unit
    def yy_=(yy0: Double): Unit
    override def clone(): AMat2D = new MMat2D(xx, xy, yx, yy)
    override def toS: AMat2S = new MMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: AMat2I = new MMat2I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt)
    override def toL: AMat2L = new MMat2L(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toF: AMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, yx0: Double = yx, yy0: Double = yy): AMat2D = new MMat2D(xx0, xy0, yx0, yy0)
    override def pad(padding: Double = 1): AMat3D = new MMat3D(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    def mapEq(fun: Double => Double): this.type = {xx = fun(xx); xy = fun(xy); yx = fun(yx); yy = fun(yy); this }
    def negEq: this.type = { xx = -xx; xy = -xy; yx = -yx; yy = -yy; this }
    def :~(x0: Double): this.type = { xx = x0; xy = x0; yx = x0; yy = x0; this }
    def :~(sg22: GMat2S): this.type = { xx = (sg22.xx).toDouble; xy = (sg22.xy).toDouble; yx = (sg22.yx).toDouble; yy = (sg22.yy).toDouble; this }
    def :~(ig22: GMat2I): this.type = { xx = (ig22.xx).toDouble; xy = (ig22.xy).toDouble; yx = (ig22.yx).toDouble; yy = (ig22.yy).toDouble; this }
    def :~(lg22: GMat2L): this.type = { xx = (lg22.xx).toDouble; xy = (lg22.xy).toDouble; yx = (lg22.yx).toDouble; yy = (lg22.yy).toDouble; this }
    def :~(fg22: GMat2F): this.type = { xx = (fg22.xx).toDouble; xy = (fg22.xy).toDouble; yx = (fg22.yx).toDouble; yy = (fg22.yy).toDouble; this }
    def :~(dg22: GMat2D): this.type = { xx = dg22.xx; xy = dg22.xy; yx = dg22.yx; yy = dg22.yy; this }
    def :~(xx0: Double, xy0: Double, yx0: Double, yy0: Double): this.type = { xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def +~(x0: Double): this.type = { xx = xx + x0; xy = xy + x0; yx = yx + x0; yy = yy + x0; this }
    def +~(sg22: GMat2S): this.type = { xx = xx + (sg22.xx).toDouble; xy = xy + (sg22.xy).toDouble; yx = yx + (sg22.yx).toDouble; yy = yy + (sg22.yy).toDouble; this }
    def +~(ig22: GMat2I): this.type = { xx = xx + (ig22.xx).toDouble; xy = xy + (ig22.xy).toDouble; yx = yx + (ig22.yx).toDouble; yy = yy + (ig22.yy).toDouble; this }
    def +~(lg22: GMat2L): this.type = { xx = xx + (lg22.xx).toDouble; xy = xy + (lg22.xy).toDouble; yx = yx + (lg22.yx).toDouble; yy = yy + (lg22.yy).toDouble; this }
    def +~(fg22: GMat2F): this.type = { xx = xx + (fg22.xx).toDouble; xy = xy + (fg22.xy).toDouble; yx = yx + (fg22.yx).toDouble; yy = yy + (fg22.yy).toDouble; this }
    def +~(dg22: GMat2D): this.type = { xx = xx + dg22.xx; xy = xy + dg22.xy; yx = yx + dg22.yx; yy = yy + dg22.yy; this }
    def +~(xx0: Double, xy0: Double, yx0: Double, yy0: Double): this.type = { xx = xx + xx0; xy = xy + xy0; yx = yx + yx0; yy = yy + yy0; this }
    def -~(x0: Double): this.type = { xx = xx - x0; xy = xy - x0; yx = yx - x0; yy = yy - x0; this }
    def -~(sg22: GMat2S): this.type = { xx = xx - (sg22.xx).toDouble; xy = xy - (sg22.xy).toDouble; yx = yx - (sg22.yx).toDouble; yy = yy - (sg22.yy).toDouble; this }
    def -~(ig22: GMat2I): this.type = { xx = xx - (ig22.xx).toDouble; xy = xy - (ig22.xy).toDouble; yx = yx - (ig22.yx).toDouble; yy = yy - (ig22.yy).toDouble; this }
    def -~(lg22: GMat2L): this.type = { xx = xx - (lg22.xx).toDouble; xy = xy - (lg22.xy).toDouble; yx = yx - (lg22.yx).toDouble; yy = yy - (lg22.yy).toDouble; this }
    def -~(fg22: GMat2F): this.type = { xx = xx - (fg22.xx).toDouble; xy = xy - (fg22.xy).toDouble; yx = yx - (fg22.yx).toDouble; yy = yy - (fg22.yy).toDouble; this }
    def -~(dg22: GMat2D): this.type = { xx = xx - dg22.xx; xy = xy - dg22.xy; yx = yx - dg22.yx; yy = yy - dg22.yy; this }
    def -~(xx0: Double, xy0: Double, yx0: Double, yy0: Double): this.type = { xx = xx - xx0; xy = xy - xy0; yx = yx - yx0; yy = yy - yy0; this }
    def *~(x0: Double): this.type = { xx = xx * x0; xy = xy * x0; yx = yx * x0; yy = yy * x0; this }
    def *~(sg22: GMat2S): this.type = { xx = xx * (sg22.xx).toDouble; xy = xy * (sg22.xy).toDouble; yx = yx * (sg22.yx).toDouble; yy = yy * (sg22.yy).toDouble; this }
    def *~(ig22: GMat2I): this.type = { xx = xx * (ig22.xx).toDouble; xy = xy * (ig22.xy).toDouble; yx = yx * (ig22.yx).toDouble; yy = yy * (ig22.yy).toDouble; this }
    def *~(lg22: GMat2L): this.type = { xx = xx * (lg22.xx).toDouble; xy = xy * (lg22.xy).toDouble; yx = yx * (lg22.yx).toDouble; yy = yy * (lg22.yy).toDouble; this }
    def *~(fg22: GMat2F): this.type = { xx = xx * (fg22.xx).toDouble; xy = xy * (fg22.xy).toDouble; yx = yx * (fg22.yx).toDouble; yy = yy * (fg22.yy).toDouble; this }
    def *~(dg22: GMat2D): this.type = { xx = xx * dg22.xx; xy = xy * dg22.xy; yx = yx * dg22.yx; yy = yy * dg22.yy; this }
    def *~(xx0: Double, xy0: Double, yx0: Double, yy0: Double): this.type = { xx = xx * xx0; xy = xy * xy0; yx = yx * yx0; yy = yy * yy0; this }
    def /~(x0: Double): this.type = { xx = xx / x0; xy = xy / x0; yx = yx / x0; yy = yy / x0; this }
    def /~(sg22: GMat2S): this.type = { xx = xx / (sg22.xx).toDouble; xy = xy / (sg22.xy).toDouble; yx = yx / (sg22.yx).toDouble; yy = yy / (sg22.yy).toDouble; this }
    def /~(ig22: GMat2I): this.type = { xx = xx / (ig22.xx).toDouble; xy = xy / (ig22.xy).toDouble; yx = yx / (ig22.yx).toDouble; yy = yy / (ig22.yy).toDouble; this }
    def /~(lg22: GMat2L): this.type = { xx = xx / (lg22.xx).toDouble; xy = xy / (lg22.xy).toDouble; yx = yx / (lg22.yx).toDouble; yy = yy / (lg22.yy).toDouble; this }
    def /~(fg22: GMat2F): this.type = { xx = xx / (fg22.xx).toDouble; xy = xy / (fg22.xy).toDouble; yx = yx / (fg22.yx).toDouble; yy = yy / (fg22.yy).toDouble; this }
    def /~(dg22: GMat2D): this.type = { xx = xx / dg22.xx; xy = xy / dg22.xy; yx = yx / dg22.yx; yy = yy / dg22.yy; this }
    def /~(xx0: Double, xy0: Double, yx0: Double, yy0: Double): this.type = { xx = xx / xx0; xy = xy / xy0; yx = yx / yx0; yy = yy / yy0; this }
    def maxEq(x0: Double): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); this }
    def maxEq(sg22: GMat2S): this.type = { xx = math.max(xx,(sg22.xx).toDouble); xy = math.max(xy,(sg22.xy).toDouble); yx = math.max(yx,(sg22.yx).toDouble); yy = math.max(yy,(sg22.yy).toDouble); this }
    def maxEq(ig22: GMat2I): this.type = { xx = math.max(xx,(ig22.xx).toDouble); xy = math.max(xy,(ig22.xy).toDouble); yx = math.max(yx,(ig22.yx).toDouble); yy = math.max(yy,(ig22.yy).toDouble); this }
    def maxEq(lg22: GMat2L): this.type = { xx = math.max(xx,(lg22.xx).toDouble); xy = math.max(xy,(lg22.xy).toDouble); yx = math.max(yx,(lg22.yx).toDouble); yy = math.max(yy,(lg22.yy).toDouble); this }
    def maxEq(fg22: GMat2F): this.type = { xx = math.max(xx,(fg22.xx).toDouble); xy = math.max(xy,(fg22.xy).toDouble); yx = math.max(yx,(fg22.yx).toDouble); yy = math.max(yy,(fg22.yy).toDouble); this }
    def maxEq(dg22: GMat2D): this.type = { xx = math.max(xx,dg22.xx); xy = math.max(xy,dg22.xy); yx = math.max(yx,dg22.yx); yy = math.max(yy,dg22.yy); this }
    def maxEq(xx0: Double, xy0: Double, yx0: Double, yy0: Double): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); this }
    def minEq(x0: Double): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); this }
    def minEq(sg22: GMat2S): this.type = { xx = math.min(xx,(sg22.xx).toDouble); xy = math.min(xy,(sg22.xy).toDouble); yx = math.min(yx,(sg22.yx).toDouble); yy = math.min(yy,(sg22.yy).toDouble); this }
    def minEq(ig22: GMat2I): this.type = { xx = math.min(xx,(ig22.xx).toDouble); xy = math.min(xy,(ig22.xy).toDouble); yx = math.min(yx,(ig22.yx).toDouble); yy = math.min(yy,(ig22.yy).toDouble); this }
    def minEq(lg22: GMat2L): this.type = { xx = math.min(xx,(lg22.xx).toDouble); xy = math.min(xy,(lg22.xy).toDouble); yx = math.min(yx,(lg22.yx).toDouble); yy = math.min(yy,(lg22.yy).toDouble); this }
    def minEq(fg22: GMat2F): this.type = { xx = math.min(xx,(fg22.xx).toDouble); xy = math.min(xy,(fg22.xy).toDouble); yx = math.min(yx,(fg22.yx).toDouble); yy = math.min(yy,(fg22.yy).toDouble); this }
    def minEq(dg22: GMat2D): this.type = { xx = math.min(xx,dg22.xx); xy = math.min(xy,dg22.xy); yx = math.min(yx,dg22.yx); yy = math.min(yy,dg22.yy); this }
    def minEq(xx0: Double, xy0: Double, yx0: Double, yy0: Double): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); this }
    def operateEq(sg22: GMat2S)(fun: (Double,Double)=>Double) = { xx = fun(xx,(sg22.xx).toDouble); xy = fun(xy,(sg22.xy).toDouble); yx = fun(yx,(sg22.yx).toDouble); yy = fun(yy,(sg22.yy).toDouble); this }
    def operateEq(ig22: GMat2I)(fun: (Double,Double)=>Double) = { xx = fun(xx,(ig22.xx).toDouble); xy = fun(xy,(ig22.xy).toDouble); yx = fun(yx,(ig22.yx).toDouble); yy = fun(yy,(ig22.yy).toDouble); this }
    def operateEq(lg22: GMat2L)(fun: (Double,Double)=>Double) = { xx = fun(xx,(lg22.xx).toDouble); xy = fun(xy,(lg22.xy).toDouble); yx = fun(yx,(lg22.yx).toDouble); yy = fun(yy,(lg22.yy).toDouble); this }
    def operateEq(fg22: GMat2F)(fun: (Double,Double)=>Double) = { xx = fun(xx,(fg22.xx).toDouble); xy = fun(xy,(fg22.xy).toDouble); yx = fun(yx,(fg22.yx).toDouble); yy = fun(yy,(fg22.yy).toDouble); this }
    def operateEq(dg22: GMat2D)(fun: (Double,Double)=>Double) = { xx = fun(xx,dg22.xx); xy = fun(xy,dg22.xy); yx = fun(yx,dg22.yx); yy = fun(yy,dg22.yy); this }
    def :|~(sg2: GVec2S) = { xx = (sg2.x).toDouble; xy = (sg2.x).toDouble; yx = (sg2.y).toDouble; yy = (sg2.y).toDouble; this }
    def :-~(sg2: GVec2S) = { xx = (sg2.x).toDouble; xy = (sg2.y).toDouble; yx = (sg2.x).toDouble; yy = (sg2.y).toDouble; this }
    def :|~(ig2: GVec2I) = { xx = (ig2.x).toDouble; xy = (ig2.x).toDouble; yx = (ig2.y).toDouble; yy = (ig2.y).toDouble; this }
    def :-~(ig2: GVec2I) = { xx = (ig2.x).toDouble; xy = (ig2.y).toDouble; yx = (ig2.x).toDouble; yy = (ig2.y).toDouble; this }
    def :|~(lg2: GVec2L) = { xx = (lg2.x).toDouble; xy = (lg2.x).toDouble; yx = (lg2.y).toDouble; yy = (lg2.y).toDouble; this }
    def :-~(lg2: GVec2L) = { xx = (lg2.x).toDouble; xy = (lg2.y).toDouble; yx = (lg2.x).toDouble; yy = (lg2.y).toDouble; this }
    def :|~(fg2: GVec2F) = { xx = (fg2.x).toDouble; xy = (fg2.x).toDouble; yx = (fg2.y).toDouble; yy = (fg2.y).toDouble; this }
    def :-~(fg2: GVec2F) = { xx = (fg2.x).toDouble; xy = (fg2.y).toDouble; yx = (fg2.x).toDouble; yy = (fg2.y).toDouble; this }
    def :|~(dg2: GVec2D) = { xx = dg2.x; xy = dg2.x; yx = dg2.y; yy = dg2.y; this }
    def :-~(dg2: GVec2D) = { xx = dg2.x; xy = dg2.y; yx = dg2.x; yy = dg2.y; this }
    def **~(sg22: GMat2S) = {val xx0 = xx*(sg22.xx).toDouble+xy*(sg22.yx).toDouble; val xy0 = xx*(sg22.xy).toDouble+xy*(sg22.yy).toDouble; val yx0 = yx*(sg22.xx).toDouble+yy*(sg22.yx).toDouble; val yy0 = yx*(sg22.xy).toDouble+yy*(sg22.yy).toDouble; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(ig22: GMat2I) = {val xx0 = xx*(ig22.xx).toDouble+xy*(ig22.yx).toDouble; val xy0 = xx*(ig22.xy).toDouble+xy*(ig22.yy).toDouble; val yx0 = yx*(ig22.xx).toDouble+yy*(ig22.yx).toDouble; val yy0 = yx*(ig22.xy).toDouble+yy*(ig22.yy).toDouble; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(lg22: GMat2L) = {val xx0 = xx*(lg22.xx).toDouble+xy*(lg22.yx).toDouble; val xy0 = xx*(lg22.xy).toDouble+xy*(lg22.yy).toDouble; val yx0 = yx*(lg22.xx).toDouble+yy*(lg22.yx).toDouble; val yy0 = yx*(lg22.xy).toDouble+yy*(lg22.yy).toDouble; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(fg22: GMat2F) = {val xx0 = xx*(fg22.xx).toDouble+xy*(fg22.yx).toDouble; val xy0 = xx*(fg22.xy).toDouble+xy*(fg22.yy).toDouble; val yx0 = yx*(fg22.xx).toDouble+yy*(fg22.yx).toDouble; val yy0 = yx*(fg22.xy).toDouble+yy*(fg22.yy).toDouble; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def **~(dg22: GMat2D) = {val xx0 = xx*dg22.xx+xy*dg22.yx; val xy0 = xx*dg22.xy+xy*dg22.yy; val yx0 = yx*dg22.xx+yy*dg22.yx; val yy0 = yx*dg22.xy+yy*dg22.yy; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    def gaussJordanEq(dg22: GMat2D): this.type = {var xx0 = dg22.xx; var xy0 = dg22.xy; var yx0 = dg22.yx; var yy0 = dg22.yy; if (math.abs(xx) < math.abs(yx)) {val i22=1/yx; yx=xx; xx=1; var t22=xy; xy=yy*i22; yy=t22; t22=xx0; xx0=yx0*i22; yx0=t22; t22=xy0; xy0=yy0*i22; yy0=t22} else {val i21=1/xx; xx=1; xy=xy*i21; xx0*=i21; xy0*=i21}; { val j22=yx/xx; yx=0; yy=yy-xy*j22; yx0-=xx0*j22; yy0-=xy0*j22}; { val i10=1/yy; yy=1; yx0*=i10; yy0*=i10 }; xx0-=xy*yx0; xy0-=xy*yy0; xx = xx0; xy = xy0; yx = yx0; yy = yy0; this }
    class RowViewX extends AVec2D { def x = xx; def x_=(x0: Double) { xx = x0 }; def y = xy; def y_=(x0: Double) { xy = x0 } }
    class ColViewX extends AVec2D { def x = xx; def x_=(x0: Double) { xx = x0 }; def y = yx; def y_=(x0: Double) { yx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec2D { def x = yx; def x_=(x0: Double) { yx = x0 }; def y = yy; def y_=(x0: Double) { yy = x0 } }
    class ColViewY extends AVec2D { def x = xy; def x_=(x0: Double) { xy = x0 }; def y = yy; def y_=(x0: Double) { yy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; this }
    def invEq: this.type = { val idet = 1/det; var temp: Double = yy; yy = xx*idet; xx = temp*idet; xy = -xy*idet; yx = -yx*idet; this }
  } // class AMat2D

  object AMat2D {
    def apply(xx0: Double, xy0: Double, yx0: Double, yy0: Double): AMat2D = new MMat2D(xx0, xy0, yx0, yy0)
    def parse(str: String): AMat2D = IMat2D.parse(str).mut
    def rotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat2D(c, -s, s, c) }
    def identity: AMat2D = MMat2D.identity
    def zero: AMat2D = MMat2D.zero
    def traced(dg2: GVec2D) = new MMat2D(dg2.x, 0, 0, dg2.y)
  } // object AMat2D


  final class MMat2S(var xx: Short, var xy: Short, var yx: Short, var yy: Short) extends AMat2S {
    override def clone(): MMat2S = new MMat2S(xx, xy, yx, yy)
    override def copy(xx0: Short = xx, xy0: Short = xy, yx0: Short = yx, yy0: Short = yy): MMat2S = new MMat2S(xx0, xy0, yx0, yy0)
    override def pad(padding: Short = 1): MMat3S = new MMat3S(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    override def toI: MMat2I = new MMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def toL: MMat2L = new MMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class MMat2S

  object MMat2S {
    def apply(xx0: Short, xy0: Short, yx0: Short, yy0: Short): MMat2S = new MMat2S(xx0, xy0, yx0, yy0)
    def parse(str: String): MMat2S = IMat2S.parse(str).mut
    def identity = new MMat2S(1, 0, 0, 1)
    def zero = new MMat2S(0, 0, 0, 0)
    def traced(sg2: GVec2S) = new MMat2S(sg2.x, 0, 0, sg2.y)
  } // object MMat2S


  final class MMat2I(var xx: Int, var xy: Int, var yx: Int, var yy: Int) extends AMat2I {
    override def clone(): MMat2I = new MMat2I(xx, xy, yx, yy)
    override def toS: MMat2S = new MMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, yx0: Int = yx, yy0: Int = yy): MMat2I = new MMat2I(xx0, xy0, yx0, yy0)
    override def pad(padding: Int = 1): MMat3I = new MMat3I(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    override def toL: MMat2L = new MMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class MMat2I

  object MMat2I {
    def apply(xx0: Int, xy0: Int, yx0: Int, yy0: Int): MMat2I = new MMat2I(xx0, xy0, yx0, yy0)
    def parse(str: String): MMat2I = IMat2I.parse(str).mut
    def identity = new MMat2I(1, 0, 0, 1)
    def zero = new MMat2I(0, 0, 0, 0)
    def traced(ig2: GVec2I) = new MMat2I(ig2.x, 0, 0, ig2.y)
  } // object MMat2I


  final class MMat2L(var xx: Long, var xy: Long, var yx: Long, var yy: Long) extends AMat2L {
    override def clone(): MMat2L = new MMat2L(xx, xy, yx, yy)
    override def toS: MMat2S = new MMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def toI: MMat2I = new MMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, yx0: Long = yx, yy0: Long = yy): MMat2L = new MMat2L(xx0, xy0, yx0, yy0)
    override def pad(padding: Long = 1): MMat3L = new MMat3L(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class MMat2L

  object MMat2L {
    def apply(xx0: Long, xy0: Long, yx0: Long, yy0: Long): MMat2L = new MMat2L(xx0, xy0, yx0, yy0)
    def parse(str: String): MMat2L = IMat2L.parse(str).mut
    def identity = new MMat2L(1, 0, 0, 1)
    def zero = new MMat2L(0, 0, 0, 0)
    def traced(lg2: GVec2L) = new MMat2L(lg2.x, 0, 0, lg2.y)
  } // object MMat2L


  final class MMat2F(var xx: Float, var xy: Float, var yx: Float, var yy: Float) extends AMat2F {
    override def clone(): MMat2F = new MMat2F(xx, xy, yx, yy)
    override def toS: MMat2S = new MMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: MMat2I = new MMat2I(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toL: MMat2L = new MMat2L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((yx).toDouble), math.round((yy).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, yx0: Float = yx, yy0: Float = yy): MMat2F = new MMat2F(xx0, xy0, yx0, yy0)
    override def pad(padding: Float = 1): MMat3F = new MMat3F(xx, xy, padding, yx, yy, padding, padding, padding, padding)
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class MMat2F

  object MMat2F {
    def apply(xx0: Float, xy0: Float, yx0: Float, yy0: Float): MMat2F = new MMat2F(xx0, xy0, yx0, yy0)
    def parse(str: String): MMat2F = IMat2F.parse(str).mut
    def rotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat2F((c).toFloat, (-s).toFloat, (s).toFloat, (c).toFloat) }
    def identity = new MMat2F(1, 0, 0, 1)
    def zero = new MMat2F(0, 0, 0, 0)
    def traced(fg2: GVec2F) = new MMat2F(fg2.x, 0, 0, fg2.y)
  } // object MMat2F


  final class MMat2D(var xx: Double, var xy: Double, var yx: Double, var yy: Double) extends AMat2D {
    override def clone(): MMat2D = new MMat2D(xx, xy, yx, yy)
    override def toS: MMat2S = new MMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: MMat2I = new MMat2I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt)
    override def toL: MMat2L = new MMat2L(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, yx0: Double = yx, yy0: Double = yy): MMat2D = new MMat2D(xx0, xy0, yx0, yy0)
    override def pad(padding: Double = 1): MMat3D = new MMat3D(xx, xy, padding, yx, yy, padding, padding, padding, padding)
  } // class MMat2D

  object MMat2D {
    def apply(xx0: Double, xy0: Double, yx0: Double, yy0: Double): MMat2D = new MMat2D(xx0, xy0, yx0, yy0)
    def parse(str: String): MMat2D = IMat2D.parse(str).mut
    def rotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat2D(c, -s, s, c) }
    def identity = new MMat2D(1, 0, 0, 1)
    def zero = new MMat2D(0, 0, 0, 0)
    def traced(dg2: GVec2D) = new MMat2D(dg2.x, 0, 0, dg2.y)
  } // object MMat2D


  class BMat2S(data: Array[Short]) extends AMat2S with Iterator[BMat2S] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Short) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Short) { data(index+1) = xy0 }
    def yx = data(index+2)
    def yx_=(yx0: Short) { data(index+2) = yx0 }
    def yy = data(index+3)
    def yy_=(yy0: Short) { data(index+3) = yy0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+xx+", "+xy+" ; "+yx+", "+yy+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BMat2S(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toI: MMat2I = new MMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def toL: MMat2L = new MMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class BMat2S

  object BMat2S {
    def apply(a0: Array[Short]) = new BMat2S(a0)
    def apply(i0: Int) = new BMat2S(new Array[Short](i0*4))
  } // object BMat2S


  class BMat2I(data: Array[Int]) extends AMat2I with Iterator[BMat2I] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Int) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Int) { data(index+1) = xy0 }
    def yx = data(index+2)
    def yx_=(yx0: Int) { data(index+2) = yx0 }
    def yy = data(index+3)
    def yy_=(yy0: Int) { data(index+3) = yy0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+xx+", "+xy+" ; "+yx+", "+yy+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BMat2I(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat2S = new MMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def toL: MMat2L = new MMat2L((xx).toLong, (xy).toLong, (yx).toLong, (yy).toLong)
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class BMat2I

  object BMat2I {
    def apply(a0: Array[Int]) = new BMat2I(a0)
    def apply(i0: Int) = new BMat2I(new Array[Int](i0*4))
  } // object BMat2I


  class BMat2L(data: Array[Long]) extends AMat2L with Iterator[BMat2L] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Long) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Long) { data(index+1) = xy0 }
    def yx = data(index+2)
    def yx_=(yx0: Long) { data(index+2) = yx0 }
    def yy = data(index+3)
    def yy_=(yy0: Long) { data(index+3) = yy0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+xx+", "+xy+" ; "+yx+", "+yy+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BMat2L(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat2S = new MMat2S((xx).toShort, (xy).toShort, (yx).toShort, (yy).toShort)
    override def toI: MMat2I = new MMat2I((xx).toInt, (xy).toInt, (yx).toInt, (yy).toInt)
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class BMat2L

  object BMat2L {
    def apply(a0: Array[Long]) = new BMat2L(a0)
    def apply(i0: Int) = new BMat2L(new Array[Long](i0*4))
  } // object BMat2L


  class BMat2F(data: Array[Float]) extends AMat2F with Iterator[BMat2F] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Float) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Float) { data(index+1) = xy0 }
    def yx = data(index+2)
    def yx_=(yx0: Float) { data(index+2) = yx0 }
    def yy = data(index+3)
    def yy_=(yy0: Float) { data(index+3) = yy0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+xx+", "+xy+" ; "+yx+", "+yy+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BMat2F(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat2S = new MMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: MMat2I = new MMat2I(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toL: MMat2L = new MMat2L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((yx).toDouble), math.round((yy).toDouble))
    override def toD: MMat2D = new MMat2D((xx).toDouble, (xy).toDouble, (yx).toDouble, (yy).toDouble)
  } // class BMat2F

  object BMat2F {
    def apply(a0: Array[Float]) = new BMat2F(a0)
    def apply(i0: Int) = new BMat2F(new Array[Float](i0*4))
  } // object BMat2F


  class BMat2D(data: Array[Double]) extends AMat2D with Iterator[BMat2D] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Double) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Double) { data(index+1) = xy0 }
    def yx = data(index+2)
    def yx_=(yx0: Double) { data(index+2) = yx0 }
    def yy = data(index+3)
    def yy_=(yy0: Double) { data(index+3) = yy0 }
    override def toString = if (index < 0 || index+4 > data.length) ("(out of range)") else ("["+xx+", "+xy+" ; "+yx+", "+yy+"]")
    def hasNext = (fresh && 4 <= data.length) || (index + 8 <= data.length)
    def next = { if (fresh) fresh = false else index += 4; this }
    def reset(idx: Int = 0) = { index = idx*4; fresh = true; this }
    def spawn = { val v = new BMat2D(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat2S = new MMat2S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort)
    override def toI: MMat2I = new MMat2I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt)
    override def toL: MMat2L = new MMat2L(math.round(xx), math.round(xy), math.round(yx), math.round(yy))
    override def toF: MMat2F = new MMat2F((xx).toFloat, (xy).toFloat, (yx).toFloat, (yy).toFloat)
  } // class BMat2D

  object BMat2D {
    def apply(a0: Array[Double]) = new BMat2D(a0)
    def apply(i0: Int) = new BMat2D(new Array[Double](i0*4))
  } // object BMat2D


  abstract class GMat3S extends Cloneable {
    def xx: Short
    def xy: Short
    def xz: Short
    def yx: Short
    def yy: Short
    def yz: Short
    def zx: Short
    def zy: Short
    def zz: Short
    override def toString = "["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]"
    override def hashCode = ((((((((zz)*16777619 ^ zy)*16777619 ^ zx)*16777619 ^ yz)*16777619 ^ yy)*16777619 ^ yx)*16777619 ^ xz)*16777619 ^ xy)*16777619 ^ xx
    override def equals(any: Any) = any match { case sg33: GMat3S => {xx==sg33.xx && xy==sg33.xy && xz==sg33.xz && yx==sg33.yx && yy==sg33.yy && yz==sg33.yz && zx==sg33.zx && zy==sg33.zy && zz==sg33.zz }; case ig33: GMat3I => {xx==ig33.xx && xy==ig33.xy && xz==ig33.xz && yx==ig33.yx && yy==ig33.yy && yz==ig33.yz && zx==ig33.zx && zy==ig33.zy && zz==ig33.zz }; case lg33: GMat3L => {xx==lg33.xx && xy==lg33.xy && xz==lg33.xz && yx==lg33.yx && yy==lg33.yy && yz==lg33.yz && zx==lg33.zx && zy==lg33.zy && zz==lg33.zz }; case fg33: GMat3F => {xx==fg33.xx && xy==fg33.xy && xz==fg33.xz && yx==fg33.yx && yy==fg33.yy && yz==fg33.yz && zx==fg33.zx && zy==fg33.zy && zz==fg33.zz }; case dg33: GMat3D => {xx==dg33.xx && xy==dg33.xy && xz==dg33.xz && yx==dg33.yx && yy==dg33.yy && yz==dg33.yz && zx==dg33.zx && zy==dg33.zy && zz==dg33.zz }; case _ => false }
    override def clone(): GMat3S = new IMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz): GMat3S = new IMat3S(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def trim: GMat2S = new IMat2S(xx, xy, yx, yy)
    def pad(padding: Short = 1): GMat4S = new IMat4S(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def toI: GMat3I = new IMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    def toL: GMat3L = new IMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    def toF: GMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    def toD: GMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def imm = new IMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mut = new MMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def unary_-() = new IMat3S((-xx).toShort, (-xy).toShort, (-xz).toShort, (-yx).toShort, (-yy).toShort, (-yz).toShort, (-zx).toShort, (-zy).toShort, (-zz).toShort)
    def +(x0: Short) = new IMat3S((xx + x0).toShort, (xy + x0).toShort, (xz + x0).toShort, (yx + x0).toShort, (yy + x0).toShort, (yz + x0).toShort, (zx + x0).toShort, (zy + x0).toShort, (zz + x0).toShort)
    def +(x0: Int) = new IMat3I((xx).toInt + x0, (xy).toInt + x0, (xz).toInt + x0, (yx).toInt + x0, (yy).toInt + x0, (yz).toInt + x0, (zx).toInt + x0, (zy).toInt + x0, (zz).toInt + x0)
    def +(x0: Long) = new IMat3L((xx).toLong + x0, (xy).toLong + x0, (xz).toLong + x0, (yx).toLong + x0, (yy).toLong + x0, (yz).toLong + x0, (zx).toLong + x0, (zy).toLong + x0, (zz).toLong + x0)
    def +(x0: Float) = new IMat3F((xx).toFloat + x0, (xy).toFloat + x0, (xz).toFloat + x0, (yx).toFloat + x0, (yy).toFloat + x0, (yz).toFloat + x0, (zx).toFloat + x0, (zy).toFloat + x0, (zz).toFloat + x0)
    def +(x0: Double) = new IMat3D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0)
    def +(sg33: GMat3S) = new IMat3S((xx + sg33.xx).toShort, (xy + sg33.xy).toShort, (xz + sg33.xz).toShort, (yx + sg33.yx).toShort, (yy + sg33.yy).toShort, (yz + sg33.yz).toShort, (zx + sg33.zx).toShort, (zy + sg33.zy).toShort, (zz + sg33.zz).toShort)
    def +(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short) = new IMat3S((xx + xx0).toShort, (xy + xy0).toShort, (xz + xz0).toShort, (yx + yx0).toShort, (yy + yy0).toShort, (yz + yz0).toShort, (zx + zx0).toShort, (zy + zy0).toShort, (zz + zz0).toShort)
    def +(ig33: GMat3I) = new IMat3I((xx).toInt + ig33.xx, (xy).toInt + ig33.xy, (xz).toInt + ig33.xz, (yx).toInt + ig33.yx, (yy).toInt + ig33.yy, (yz).toInt + ig33.yz, (zx).toInt + ig33.zx, (zy).toInt + ig33.zy, (zz).toInt + ig33.zz)
    def +(lg33: GMat3L) = new IMat3L((xx).toLong + lg33.xx, (xy).toLong + lg33.xy, (xz).toLong + lg33.xz, (yx).toLong + lg33.yx, (yy).toLong + lg33.yy, (yz).toLong + lg33.yz, (zx).toLong + lg33.zx, (zy).toLong + lg33.zy, (zz).toLong + lg33.zz)
    def +(fg33: GMat3F) = new IMat3F((xx).toFloat + fg33.xx, (xy).toFloat + fg33.xy, (xz).toFloat + fg33.xz, (yx).toFloat + fg33.yx, (yy).toFloat + fg33.yy, (yz).toFloat + fg33.yz, (zx).toFloat + fg33.zx, (zy).toFloat + fg33.zy, (zz).toFloat + fg33.zz)
    def +(dg33: GMat3D) = new IMat3D((xx).toDouble + dg33.xx, (xy).toDouble + dg33.xy, (xz).toDouble + dg33.xz, (yx).toDouble + dg33.yx, (yy).toDouble + dg33.yy, (yz).toDouble + dg33.yz, (zx).toDouble + dg33.zx, (zy).toDouble + dg33.zy, (zz).toDouble + dg33.zz)
    def -(x0: Short) = new IMat3S((xx - x0).toShort, (xy - x0).toShort, (xz - x0).toShort, (yx - x0).toShort, (yy - x0).toShort, (yz - x0).toShort, (zx - x0).toShort, (zy - x0).toShort, (zz - x0).toShort)
    def -(x0: Int) = new IMat3I((xx).toInt - x0, (xy).toInt - x0, (xz).toInt - x0, (yx).toInt - x0, (yy).toInt - x0, (yz).toInt - x0, (zx).toInt - x0, (zy).toInt - x0, (zz).toInt - x0)
    def -(x0: Long) = new IMat3L((xx).toLong - x0, (xy).toLong - x0, (xz).toLong - x0, (yx).toLong - x0, (yy).toLong - x0, (yz).toLong - x0, (zx).toLong - x0, (zy).toLong - x0, (zz).toLong - x0)
    def -(x0: Float) = new IMat3F((xx).toFloat - x0, (xy).toFloat - x0, (xz).toFloat - x0, (yx).toFloat - x0, (yy).toFloat - x0, (yz).toFloat - x0, (zx).toFloat - x0, (zy).toFloat - x0, (zz).toFloat - x0)
    def -(x0: Double) = new IMat3D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0)
    def -(sg33: GMat3S) = new IMat3S((xx - sg33.xx).toShort, (xy - sg33.xy).toShort, (xz - sg33.xz).toShort, (yx - sg33.yx).toShort, (yy - sg33.yy).toShort, (yz - sg33.yz).toShort, (zx - sg33.zx).toShort, (zy - sg33.zy).toShort, (zz - sg33.zz).toShort)
    def -(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short) = new IMat3S((xx - xx0).toShort, (xy - xy0).toShort, (xz - xz0).toShort, (yx - yx0).toShort, (yy - yy0).toShort, (yz - yz0).toShort, (zx - zx0).toShort, (zy - zy0).toShort, (zz - zz0).toShort)
    def -(ig33: GMat3I) = new IMat3I((xx).toInt - ig33.xx, (xy).toInt - ig33.xy, (xz).toInt - ig33.xz, (yx).toInt - ig33.yx, (yy).toInt - ig33.yy, (yz).toInt - ig33.yz, (zx).toInt - ig33.zx, (zy).toInt - ig33.zy, (zz).toInt - ig33.zz)
    def -(lg33: GMat3L) = new IMat3L((xx).toLong - lg33.xx, (xy).toLong - lg33.xy, (xz).toLong - lg33.xz, (yx).toLong - lg33.yx, (yy).toLong - lg33.yy, (yz).toLong - lg33.yz, (zx).toLong - lg33.zx, (zy).toLong - lg33.zy, (zz).toLong - lg33.zz)
    def -(fg33: GMat3F) = new IMat3F((xx).toFloat - fg33.xx, (xy).toFloat - fg33.xy, (xz).toFloat - fg33.xz, (yx).toFloat - fg33.yx, (yy).toFloat - fg33.yy, (yz).toFloat - fg33.yz, (zx).toFloat - fg33.zx, (zy).toFloat - fg33.zy, (zz).toFloat - fg33.zz)
    def -(dg33: GMat3D) = new IMat3D((xx).toDouble - dg33.xx, (xy).toDouble - dg33.xy, (xz).toDouble - dg33.xz, (yx).toDouble - dg33.yx, (yy).toDouble - dg33.yy, (yz).toDouble - dg33.yz, (zx).toDouble - dg33.zx, (zy).toDouble - dg33.zy, (zz).toDouble - dg33.zz)
    def *(x0: Short) = new IMat3S((xx * x0).toShort, (xy * x0).toShort, (xz * x0).toShort, (yx * x0).toShort, (yy * x0).toShort, (yz * x0).toShort, (zx * x0).toShort, (zy * x0).toShort, (zz * x0).toShort)
    def *(x0: Int) = new IMat3I((xx).toInt * x0, (xy).toInt * x0, (xz).toInt * x0, (yx).toInt * x0, (yy).toInt * x0, (yz).toInt * x0, (zx).toInt * x0, (zy).toInt * x0, (zz).toInt * x0)
    def *(x0: Long) = new IMat3L((xx).toLong * x0, (xy).toLong * x0, (xz).toLong * x0, (yx).toLong * x0, (yy).toLong * x0, (yz).toLong * x0, (zx).toLong * x0, (zy).toLong * x0, (zz).toLong * x0)
    def *(x0: Float) = new IMat3F((xx).toFloat * x0, (xy).toFloat * x0, (xz).toFloat * x0, (yx).toFloat * x0, (yy).toFloat * x0, (yz).toFloat * x0, (zx).toFloat * x0, (zy).toFloat * x0, (zz).toFloat * x0)
    def *(x0: Double) = new IMat3D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0)
    def *(sg33: GMat3S) = new IMat3S((xx * sg33.xx).toShort, (xy * sg33.xy).toShort, (xz * sg33.xz).toShort, (yx * sg33.yx).toShort, (yy * sg33.yy).toShort, (yz * sg33.yz).toShort, (zx * sg33.zx).toShort, (zy * sg33.zy).toShort, (zz * sg33.zz).toShort)
    def *(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short) = new IMat3S((xx * xx0).toShort, (xy * xy0).toShort, (xz * xz0).toShort, (yx * yx0).toShort, (yy * yy0).toShort, (yz * yz0).toShort, (zx * zx0).toShort, (zy * zy0).toShort, (zz * zz0).toShort)
    def *(ig33: GMat3I) = new IMat3I((xx).toInt * ig33.xx, (xy).toInt * ig33.xy, (xz).toInt * ig33.xz, (yx).toInt * ig33.yx, (yy).toInt * ig33.yy, (yz).toInt * ig33.yz, (zx).toInt * ig33.zx, (zy).toInt * ig33.zy, (zz).toInt * ig33.zz)
    def *(lg33: GMat3L) = new IMat3L((xx).toLong * lg33.xx, (xy).toLong * lg33.xy, (xz).toLong * lg33.xz, (yx).toLong * lg33.yx, (yy).toLong * lg33.yy, (yz).toLong * lg33.yz, (zx).toLong * lg33.zx, (zy).toLong * lg33.zy, (zz).toLong * lg33.zz)
    def *(fg33: GMat3F) = new IMat3F((xx).toFloat * fg33.xx, (xy).toFloat * fg33.xy, (xz).toFloat * fg33.xz, (yx).toFloat * fg33.yx, (yy).toFloat * fg33.yy, (yz).toFloat * fg33.yz, (zx).toFloat * fg33.zx, (zy).toFloat * fg33.zy, (zz).toFloat * fg33.zz)
    def *(dg33: GMat3D) = new IMat3D((xx).toDouble * dg33.xx, (xy).toDouble * dg33.xy, (xz).toDouble * dg33.xz, (yx).toDouble * dg33.yx, (yy).toDouble * dg33.yy, (yz).toDouble * dg33.yz, (zx).toDouble * dg33.zx, (zy).toDouble * dg33.zy, (zz).toDouble * dg33.zz)
    def /(x0: Short) = new IMat3S((xx / x0).toShort, (xy / x0).toShort, (xz / x0).toShort, (yx / x0).toShort, (yy / x0).toShort, (yz / x0).toShort, (zx / x0).toShort, (zy / x0).toShort, (zz / x0).toShort)
    def /(x0: Int) = new IMat3I((xx).toInt / x0, (xy).toInt / x0, (xz).toInt / x0, (yx).toInt / x0, (yy).toInt / x0, (yz).toInt / x0, (zx).toInt / x0, (zy).toInt / x0, (zz).toInt / x0)
    def /(x0: Long) = new IMat3L((xx).toLong / x0, (xy).toLong / x0, (xz).toLong / x0, (yx).toLong / x0, (yy).toLong / x0, (yz).toLong / x0, (zx).toLong / x0, (zy).toLong / x0, (zz).toLong / x0)
    def /(x0: Float) = new IMat3F((xx).toFloat / x0, (xy).toFloat / x0, (xz).toFloat / x0, (yx).toFloat / x0, (yy).toFloat / x0, (yz).toFloat / x0, (zx).toFloat / x0, (zy).toFloat / x0, (zz).toFloat / x0)
    def /(x0: Double) = new IMat3D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0)
    def /(sg33: GMat3S) = new IMat3S((xx / sg33.xx).toShort, (xy / sg33.xy).toShort, (xz / sg33.xz).toShort, (yx / sg33.yx).toShort, (yy / sg33.yy).toShort, (yz / sg33.yz).toShort, (zx / sg33.zx).toShort, (zy / sg33.zy).toShort, (zz / sg33.zz).toShort)
    def /(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short) = new IMat3S((xx / xx0).toShort, (xy / xy0).toShort, (xz / xz0).toShort, (yx / yx0).toShort, (yy / yy0).toShort, (yz / yz0).toShort, (zx / zx0).toShort, (zy / zy0).toShort, (zz / zz0).toShort)
    def /(ig33: GMat3I) = new IMat3I((xx).toInt / ig33.xx, (xy).toInt / ig33.xy, (xz).toInt / ig33.xz, (yx).toInt / ig33.yx, (yy).toInt / ig33.yy, (yz).toInt / ig33.yz, (zx).toInt / ig33.zx, (zy).toInt / ig33.zy, (zz).toInt / ig33.zz)
    def /(lg33: GMat3L) = new IMat3L((xx).toLong / lg33.xx, (xy).toLong / lg33.xy, (xz).toLong / lg33.xz, (yx).toLong / lg33.yx, (yy).toLong / lg33.yy, (yz).toLong / lg33.yz, (zx).toLong / lg33.zx, (zy).toLong / lg33.zy, (zz).toLong / lg33.zz)
    def /(fg33: GMat3F) = new IMat3F((xx).toFloat / fg33.xx, (xy).toFloat / fg33.xy, (xz).toFloat / fg33.xz, (yx).toFloat / fg33.yx, (yy).toFloat / fg33.yy, (yz).toFloat / fg33.yz, (zx).toFloat / fg33.zx, (zy).toFloat / fg33.zy, (zz).toFloat / fg33.zz)
    def /(dg33: GMat3D) = new IMat3D((xx).toDouble / dg33.xx, (xy).toDouble / dg33.xy, (xz).toDouble / dg33.xz, (yx).toDouble / dg33.yx, (yy).toDouble / dg33.yy, (yz).toDouble / dg33.yz, (zx).toDouble / dg33.zx, (zy).toDouble / dg33.zy, (zz).toDouble / dg33.zz)
    def max(x0: Short) = new IMat3S((math.max(xx,x0)).toShort, (math.max(xy,x0)).toShort, (math.max(xz,x0)).toShort, (math.max(yx,x0)).toShort, (math.max(yy,x0)).toShort, (math.max(yz,x0)).toShort, (math.max(zx,x0)).toShort, (math.max(zy,x0)).toShort, (math.max(zz,x0)).toShort)
    def max(x0: Int) = new IMat3I(math.max((xx).toInt,x0), math.max((xy).toInt,x0), math.max((xz).toInt,x0), math.max((yx).toInt,x0), math.max((yy).toInt,x0), math.max((yz).toInt,x0), math.max((zx).toInt,x0), math.max((zy).toInt,x0), math.max((zz).toInt,x0))
    def max(x0: Long) = new IMat3L(math.max((xx).toLong,x0), math.max((xy).toLong,x0), math.max((xz).toLong,x0), math.max((yx).toLong,x0), math.max((yy).toLong,x0), math.max((yz).toLong,x0), math.max((zx).toLong,x0), math.max((zy).toLong,x0), math.max((zz).toLong,x0))
    def max(x0: Float) = new IMat3F(math.max((xx).toFloat,x0), math.max((xy).toFloat,x0), math.max((xz).toFloat,x0), math.max((yx).toFloat,x0), math.max((yy).toFloat,x0), math.max((yz).toFloat,x0), math.max((zx).toFloat,x0), math.max((zy).toFloat,x0), math.max((zz).toFloat,x0))
    def max(x0: Double) = new IMat3D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0))
    def max(sg33: GMat3S) = new IMat3S((math.max(xx,sg33.xx)).toShort, (math.max(xy,sg33.xy)).toShort, (math.max(xz,sg33.xz)).toShort, (math.max(yx,sg33.yx)).toShort, (math.max(yy,sg33.yy)).toShort, (math.max(yz,sg33.yz)).toShort, (math.max(zx,sg33.zx)).toShort, (math.max(zy,sg33.zy)).toShort, (math.max(zz,sg33.zz)).toShort)
    def max(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short) = new IMat3S((math.max(xx,xx0)).toShort, (math.max(xy,xy0)).toShort, (math.max(xz,xz0)).toShort, (math.max(yx,yx0)).toShort, (math.max(yy,yy0)).toShort, (math.max(yz,yz0)).toShort, (math.max(zx,zx0)).toShort, (math.max(zy,zy0)).toShort, (math.max(zz,zz0)).toShort)
    def max(ig33: GMat3I) = new IMat3I(math.max((xx).toInt,ig33.xx), math.max((xy).toInt,ig33.xy), math.max((xz).toInt,ig33.xz), math.max((yx).toInt,ig33.yx), math.max((yy).toInt,ig33.yy), math.max((yz).toInt,ig33.yz), math.max((zx).toInt,ig33.zx), math.max((zy).toInt,ig33.zy), math.max((zz).toInt,ig33.zz))
    def max(lg33: GMat3L) = new IMat3L(math.max((xx).toLong,lg33.xx), math.max((xy).toLong,lg33.xy), math.max((xz).toLong,lg33.xz), math.max((yx).toLong,lg33.yx), math.max((yy).toLong,lg33.yy), math.max((yz).toLong,lg33.yz), math.max((zx).toLong,lg33.zx), math.max((zy).toLong,lg33.zy), math.max((zz).toLong,lg33.zz))
    def max(fg33: GMat3F) = new IMat3F(math.max((xx).toFloat,fg33.xx), math.max((xy).toFloat,fg33.xy), math.max((xz).toFloat,fg33.xz), math.max((yx).toFloat,fg33.yx), math.max((yy).toFloat,fg33.yy), math.max((yz).toFloat,fg33.yz), math.max((zx).toFloat,fg33.zx), math.max((zy).toFloat,fg33.zy), math.max((zz).toFloat,fg33.zz))
    def max(dg33: GMat3D) = new IMat3D(math.max((xx).toDouble,dg33.xx), math.max((xy).toDouble,dg33.xy), math.max((xz).toDouble,dg33.xz), math.max((yx).toDouble,dg33.yx), math.max((yy).toDouble,dg33.yy), math.max((yz).toDouble,dg33.yz), math.max((zx).toDouble,dg33.zx), math.max((zy).toDouble,dg33.zy), math.max((zz).toDouble,dg33.zz))
    def min(x0: Short) = new IMat3S((math.min(xx,x0)).toShort, (math.min(xy,x0)).toShort, (math.min(xz,x0)).toShort, (math.min(yx,x0)).toShort, (math.min(yy,x0)).toShort, (math.min(yz,x0)).toShort, (math.min(zx,x0)).toShort, (math.min(zy,x0)).toShort, (math.min(zz,x0)).toShort)
    def min(x0: Int) = new IMat3I(math.min((xx).toInt,x0), math.min((xy).toInt,x0), math.min((xz).toInt,x0), math.min((yx).toInt,x0), math.min((yy).toInt,x0), math.min((yz).toInt,x0), math.min((zx).toInt,x0), math.min((zy).toInt,x0), math.min((zz).toInt,x0))
    def min(x0: Long) = new IMat3L(math.min((xx).toLong,x0), math.min((xy).toLong,x0), math.min((xz).toLong,x0), math.min((yx).toLong,x0), math.min((yy).toLong,x0), math.min((yz).toLong,x0), math.min((zx).toLong,x0), math.min((zy).toLong,x0), math.min((zz).toLong,x0))
    def min(x0: Float) = new IMat3F(math.min((xx).toFloat,x0), math.min((xy).toFloat,x0), math.min((xz).toFloat,x0), math.min((yx).toFloat,x0), math.min((yy).toFloat,x0), math.min((yz).toFloat,x0), math.min((zx).toFloat,x0), math.min((zy).toFloat,x0), math.min((zz).toFloat,x0))
    def min(x0: Double) = new IMat3D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0))
    def min(sg33: GMat3S) = new IMat3S((math.min(xx,sg33.xx)).toShort, (math.min(xy,sg33.xy)).toShort, (math.min(xz,sg33.xz)).toShort, (math.min(yx,sg33.yx)).toShort, (math.min(yy,sg33.yy)).toShort, (math.min(yz,sg33.yz)).toShort, (math.min(zx,sg33.zx)).toShort, (math.min(zy,sg33.zy)).toShort, (math.min(zz,sg33.zz)).toShort)
    def min(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short) = new IMat3S((math.min(xx,xx0)).toShort, (math.min(xy,xy0)).toShort, (math.min(xz,xz0)).toShort, (math.min(yx,yx0)).toShort, (math.min(yy,yy0)).toShort, (math.min(yz,yz0)).toShort, (math.min(zx,zx0)).toShort, (math.min(zy,zy0)).toShort, (math.min(zz,zz0)).toShort)
    def min(ig33: GMat3I) = new IMat3I(math.min((xx).toInt,ig33.xx), math.min((xy).toInt,ig33.xy), math.min((xz).toInt,ig33.xz), math.min((yx).toInt,ig33.yx), math.min((yy).toInt,ig33.yy), math.min((yz).toInt,ig33.yz), math.min((zx).toInt,ig33.zx), math.min((zy).toInt,ig33.zy), math.min((zz).toInt,ig33.zz))
    def min(lg33: GMat3L) = new IMat3L(math.min((xx).toLong,lg33.xx), math.min((xy).toLong,lg33.xy), math.min((xz).toLong,lg33.xz), math.min((yx).toLong,lg33.yx), math.min((yy).toLong,lg33.yy), math.min((yz).toLong,lg33.yz), math.min((zx).toLong,lg33.zx), math.min((zy).toLong,lg33.zy), math.min((zz).toLong,lg33.zz))
    def min(fg33: GMat3F) = new IMat3F(math.min((xx).toFloat,fg33.xx), math.min((xy).toFloat,fg33.xy), math.min((xz).toFloat,fg33.xz), math.min((yx).toFloat,fg33.yx), math.min((yy).toFloat,fg33.yy), math.min((yz).toFloat,fg33.yz), math.min((zx).toFloat,fg33.zx), math.min((zy).toFloat,fg33.zy), math.min((zz).toFloat,fg33.zz))
    def min(dg33: GMat3D) = new IMat3D(math.min((xx).toDouble,dg33.xx), math.min((xy).toDouble,dg33.xy), math.min((xz).toDouble,dg33.xz), math.min((yx).toDouble,dg33.yx), math.min((yy).toDouble,dg33.yy), math.min((yz).toDouble,dg33.yz), math.min((zx).toDouble,dg33.zx), math.min((zy).toDouble,dg33.zy), math.min((zz).toDouble,dg33.zz))
    def operate(sg33: GMat3S)(fun: (Short,Short)=>Short) = new IMat3S((fun(xx,sg33.xx)).toShort, (fun(xy,sg33.xy)).toShort, (fun(xz,sg33.xz)).toShort, (fun(yx,sg33.yx)).toShort, (fun(yy,sg33.yy)).toShort, (fun(yz,sg33.yz)).toShort, (fun(zx,sg33.zx)).toShort, (fun(zy,sg33.zy)).toShort, (fun(zz,sg33.zz)).toShort)
    def operate(ig33: GMat3I)(fun: (Int,Int)=>Int) = new IMat3I(fun((xx).toInt,ig33.xx), fun((xy).toInt,ig33.xy), fun((xz).toInt,ig33.xz), fun((yx).toInt,ig33.yx), fun((yy).toInt,ig33.yy), fun((yz).toInt,ig33.yz), fun((zx).toInt,ig33.zx), fun((zy).toInt,ig33.zy), fun((zz).toInt,ig33.zz))
    def operate(lg33: GMat3L)(fun: (Long,Long)=>Long) = new IMat3L(fun((xx).toLong,lg33.xx), fun((xy).toLong,lg33.xy), fun((xz).toLong,lg33.xz), fun((yx).toLong,lg33.yx), fun((yy).toLong,lg33.yy), fun((yz).toLong,lg33.yz), fun((zx).toLong,lg33.zx), fun((zy).toLong,lg33.zy), fun((zz).toLong,lg33.zz))
    def operate(fg33: GMat3F)(fun: (Float,Float)=>Float) = new IMat3F(fun((xx).toFloat,fg33.xx), fun((xy).toFloat,fg33.xy), fun((xz).toFloat,fg33.xz), fun((yx).toFloat,fg33.yx), fun((yy).toFloat,fg33.yy), fun((yz).toFloat,fg33.yz), fun((zx).toFloat,fg33.zx), fun((zy).toFloat,fg33.zy), fun((zz).toFloat,fg33.zz))
    def operate(dg33: GMat3D)(fun: (Double,Double)=>Double) = new IMat3D(fun((xx).toDouble,dg33.xx), fun((xy).toDouble,dg33.xy), fun((xz).toDouble,dg33.xz), fun((yx).toDouble,dg33.yx), fun((yy).toDouble,dg33.yy), fun((yz).toDouble,dg33.yz), fun((zx).toDouble,dg33.zx), fun((zy).toDouble,dg33.zy), fun((zz).toDouble,dg33.zz))
    def ===(sg33: GMat3S) = xx==sg33.xx && xy==sg33.xy && xz==sg33.xz && yx==sg33.yx && yy==sg33.yy && yz==sg33.yz && zx==sg33.zx && zy==sg33.zy && zz==sg33.zz
    def ===(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short) = xx==xx0 && xy==xy0 && xz==xz0 && yx==yx0 && yy==yy0 && yz==yz0 && zx==zx0 && zy==zy0 && zz==zz0
    def det = (xx*(yy*zz - yz*zy) + xy*(yz*zx - yx*zz) + xz*(yx*zy - yy*zx)).toShort
    def trace = new IVec3S(xx, yy, zz)
    def xRow = new IVec3S(xx, xy, xz)
    def xCol = new IVec3S(xx, yx, zx)
    def yRow = new IVec3S(yx, yy, yz)
    def yCol = new IVec3S(xy, yy, zy)
    def zRow = new IVec3S(zx, zy, zz)
    def zCol = new IVec3S(xz, yz, zz)
    def t = new IMat3S(xx, yx, zx, xy, yy, zy, xz, yz, zz)
    def **(sg3: GVec3S) = new IVec3S((xx*sg3.x+xy*sg3.y+xz*sg3.z).toShort, (yx*sg3.x+yy*sg3.y+yz*sg3.z).toShort, (zx*sg3.x+zy*sg3.y+zz*sg3.z).toShort)
    def **(ig3: GVec3I) = new IVec3I((xx).toInt*ig3.x+(xy).toInt*ig3.y+(xz).toInt*ig3.z, (yx).toInt*ig3.x+(yy).toInt*ig3.y+(yz).toInt*ig3.z, (zx).toInt*ig3.x+(zy).toInt*ig3.y+(zz).toInt*ig3.z)
    def **(lg3: GVec3L) = new IVec3L((xx).toLong*lg3.x+(xy).toLong*lg3.y+(xz).toLong*lg3.z, (yx).toLong*lg3.x+(yy).toLong*lg3.y+(yz).toLong*lg3.z, (zx).toLong*lg3.x+(zy).toLong*lg3.y+(zz).toLong*lg3.z)
    def **(fg3: GVec3F) = new IVec3F((xx).toFloat*fg3.x+(xy).toFloat*fg3.y+(xz).toFloat*fg3.z, (yx).toFloat*fg3.x+(yy).toFloat*fg3.y+(yz).toFloat*fg3.z, (zx).toFloat*fg3.x+(zy).toFloat*fg3.y+(zz).toFloat*fg3.z)
    def **(dg3: GVec3D) = new IVec3D((xx).toDouble*dg3.x+(xy).toDouble*dg3.y+(xz).toDouble*dg3.z, (yx).toDouble*dg3.x+(yy).toDouble*dg3.y+(yz).toDouble*dg3.z, (zx).toDouble*dg3.x+(zy).toDouble*dg3.y+(zz).toDouble*dg3.z)
    def **(sg33: GMat3S) = new IMat3S((xx*sg33.xx+xy*sg33.yx+xz*sg33.zx).toShort, (xx*sg33.xy+xy*sg33.yy+xz*sg33.zy).toShort, (xx*sg33.xz+xy*sg33.yz+xz*sg33.zz).toShort, (yx*sg33.xx+yy*sg33.yx+yz*sg33.zx).toShort, (yx*sg33.xy+yy*sg33.yy+yz*sg33.zy).toShort, (yx*sg33.xz+yy*sg33.yz+yz*sg33.zz).toShort, (zx*sg33.xx+zy*sg33.yx+zz*sg33.zx).toShort, (zx*sg33.xy+zy*sg33.yy+zz*sg33.zy).toShort, (zx*sg33.xz+zy*sg33.yz+zz*sg33.zz).toShort)
    def **(ig33: GMat3I) = new IMat3I((xx).toInt*ig33.xx+(xy).toInt*ig33.yx+(xz).toInt*ig33.zx, (xx).toInt*ig33.xy+(xy).toInt*ig33.yy+(xz).toInt*ig33.zy, (xx).toInt*ig33.xz+(xy).toInt*ig33.yz+(xz).toInt*ig33.zz, (yx).toInt*ig33.xx+(yy).toInt*ig33.yx+(yz).toInt*ig33.zx, (yx).toInt*ig33.xy+(yy).toInt*ig33.yy+(yz).toInt*ig33.zy, (yx).toInt*ig33.xz+(yy).toInt*ig33.yz+(yz).toInt*ig33.zz, (zx).toInt*ig33.xx+(zy).toInt*ig33.yx+(zz).toInt*ig33.zx, (zx).toInt*ig33.xy+(zy).toInt*ig33.yy+(zz).toInt*ig33.zy, (zx).toInt*ig33.xz+(zy).toInt*ig33.yz+(zz).toInt*ig33.zz)
    def **(lg33: GMat3L) = new IMat3L((xx).toLong*lg33.xx+(xy).toLong*lg33.yx+(xz).toLong*lg33.zx, (xx).toLong*lg33.xy+(xy).toLong*lg33.yy+(xz).toLong*lg33.zy, (xx).toLong*lg33.xz+(xy).toLong*lg33.yz+(xz).toLong*lg33.zz, (yx).toLong*lg33.xx+(yy).toLong*lg33.yx+(yz).toLong*lg33.zx, (yx).toLong*lg33.xy+(yy).toLong*lg33.yy+(yz).toLong*lg33.zy, (yx).toLong*lg33.xz+(yy).toLong*lg33.yz+(yz).toLong*lg33.zz, (zx).toLong*lg33.xx+(zy).toLong*lg33.yx+(zz).toLong*lg33.zx, (zx).toLong*lg33.xy+(zy).toLong*lg33.yy+(zz).toLong*lg33.zy, (zx).toLong*lg33.xz+(zy).toLong*lg33.yz+(zz).toLong*lg33.zz)
    def **(fg33: GMat3F) = new IMat3F((xx).toFloat*fg33.xx+(xy).toFloat*fg33.yx+(xz).toFloat*fg33.zx, (xx).toFloat*fg33.xy+(xy).toFloat*fg33.yy+(xz).toFloat*fg33.zy, (xx).toFloat*fg33.xz+(xy).toFloat*fg33.yz+(xz).toFloat*fg33.zz, (yx).toFloat*fg33.xx+(yy).toFloat*fg33.yx+(yz).toFloat*fg33.zx, (yx).toFloat*fg33.xy+(yy).toFloat*fg33.yy+(yz).toFloat*fg33.zy, (yx).toFloat*fg33.xz+(yy).toFloat*fg33.yz+(yz).toFloat*fg33.zz, (zx).toFloat*fg33.xx+(zy).toFloat*fg33.yx+(zz).toFloat*fg33.zx, (zx).toFloat*fg33.xy+(zy).toFloat*fg33.yy+(zz).toFloat*fg33.zy, (zx).toFloat*fg33.xz+(zy).toFloat*fg33.yz+(zz).toFloat*fg33.zz)
    def **(dg33: GMat3D) = new IMat3D((xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx, (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy, (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz, (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx, (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy, (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz, (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx, (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy, (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz)
  } // class GMat3S

  object GMat3S {
    def apply(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): GMat3S = new IMat3S(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): GMat3S = IMat3S.parse(str)
    val identity: GMat3S = IMat3S.identity
    val zero: GMat3S = IMat3S.zero
    def traced(sg3: GVec3S) = new IMat3S(sg3.x, 0, 0, 0, sg3.y, 0, 0, 0, sg3.z)
  } // object GMat3S


  abstract class GMat3I extends Cloneable {
    def xx: Int
    def xy: Int
    def xz: Int
    def yx: Int
    def yy: Int
    def yz: Int
    def zx: Int
    def zy: Int
    def zz: Int
    override def toString = "["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]"
    override def hashCode = ((((((((zz)*16777619 ^ zy)*16777619 ^ zx)*16777619 ^ yz)*16777619 ^ yy)*16777619 ^ yx)*16777619 ^ xz)*16777619 ^ xy)*16777619 ^ xx
    override def equals(any: Any) = any match { case sg33: GMat3S => {xx==sg33.xx && xy==sg33.xy && xz==sg33.xz && yx==sg33.yx && yy==sg33.yy && yz==sg33.yz && zx==sg33.zx && zy==sg33.zy && zz==sg33.zz }; case ig33: GMat3I => {xx==ig33.xx && xy==ig33.xy && xz==ig33.xz && yx==ig33.yx && yy==ig33.yy && yz==ig33.yz && zx==ig33.zx && zy==ig33.zy && zz==ig33.zz }; case lg33: GMat3L => {xx==lg33.xx && xy==lg33.xy && xz==lg33.xz && yx==lg33.yx && yy==lg33.yy && yz==lg33.yz && zx==lg33.zx && zy==lg33.zy && zz==lg33.zz }; case fg33: GMat3F => {xx==fg33.xx && xy==fg33.xy && xz==fg33.xz && yx==fg33.yx && yy==fg33.yy && yz==fg33.yz && zx==fg33.zx && zy==fg33.zy && zz==fg33.zz }; case dg33: GMat3D => {xx==dg33.xx && xy==dg33.xy && xz==dg33.xz && yx==dg33.yx && yy==dg33.yy && yz==dg33.yz && zx==dg33.zx && zy==dg33.zy && zz==dg33.zz }; case _ => false }
    override def clone(): GMat3I = new IMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def toS: GMat3S = new IMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz): GMat3I = new IMat3I(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def trim: GMat2I = new IMat2I(xx, xy, yx, yy)
    def pad(padding: Int = 1): GMat4I = new IMat4I(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapI(fun: Int => Int) = new IMat3I(fun(xx), fun(xy), fun(xz), fun(yx), fun(yy), fun(yz), fun(zx), fun(zy), fun(zz))
    def toL: GMat3L = new IMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    def mapL(fun: Int => Long) = new IMat3L((fun(xx)).toLong, (fun(xy)).toLong, (fun(xz)).toLong, (fun(yx)).toLong, (fun(yy)).toLong, (fun(yz)).toLong, (fun(zx)).toLong, (fun(zy)).toLong, (fun(zz)).toLong)
    def toF: GMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    def mapF(fun: Int => Float) = new IMat3F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(xz)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat, (fun(yz)).toFloat, (fun(zx)).toFloat, (fun(zy)).toFloat, (fun(zz)).toFloat)
    def toD: GMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def mapD(fun: Int => Double) = new IMat3D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(xz)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble, (fun(yz)).toDouble, (fun(zx)).toDouble, (fun(zy)).toDouble, (fun(zz)).toDouble)
    def imm = new IMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mut = new MMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def unary_-() = new IMat3I(-xx, -xy, -xz, -yx, -yy, -yz, -zx, -zy, -zz)
    def +(x0: Int) = new IMat3I(xx + x0, xy + x0, xz + x0, yx + x0, yy + x0, yz + x0, zx + x0, zy + x0, zz + x0)
    def +(x0: Long) = new IMat3L((xx).toLong + x0, (xy).toLong + x0, (xz).toLong + x0, (yx).toLong + x0, (yy).toLong + x0, (yz).toLong + x0, (zx).toLong + x0, (zy).toLong + x0, (zz).toLong + x0)
    def +(x0: Float) = new IMat3F((xx).toFloat + x0, (xy).toFloat + x0, (xz).toFloat + x0, (yx).toFloat + x0, (yy).toFloat + x0, (yz).toFloat + x0, (zx).toFloat + x0, (zy).toFloat + x0, (zz).toFloat + x0)
    def +(x0: Double) = new IMat3D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0)
    def +(sg33: GMat3S) = new IMat3I(xx + (sg33.xx).toInt, xy + (sg33.xy).toInt, xz + (sg33.xz).toInt, yx + (sg33.yx).toInt, yy + (sg33.yy).toInt, yz + (sg33.yz).toInt, zx + (sg33.zx).toInt, zy + (sg33.zy).toInt, zz + (sg33.zz).toInt)
    def +(ig33: GMat3I) = new IMat3I(xx + ig33.xx, xy + ig33.xy, xz + ig33.xz, yx + ig33.yx, yy + ig33.yy, yz + ig33.yz, zx + ig33.zx, zy + ig33.zy, zz + ig33.zz)
    def +(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int) = new IMat3I(xx + xx0, xy + xy0, xz + xz0, yx + yx0, yy + yy0, yz + yz0, zx + zx0, zy + zy0, zz + zz0)
    def +(lg33: GMat3L) = new IMat3L((xx).toLong + lg33.xx, (xy).toLong + lg33.xy, (xz).toLong + lg33.xz, (yx).toLong + lg33.yx, (yy).toLong + lg33.yy, (yz).toLong + lg33.yz, (zx).toLong + lg33.zx, (zy).toLong + lg33.zy, (zz).toLong + lg33.zz)
    def +(fg33: GMat3F) = new IMat3F((xx).toFloat + fg33.xx, (xy).toFloat + fg33.xy, (xz).toFloat + fg33.xz, (yx).toFloat + fg33.yx, (yy).toFloat + fg33.yy, (yz).toFloat + fg33.yz, (zx).toFloat + fg33.zx, (zy).toFloat + fg33.zy, (zz).toFloat + fg33.zz)
    def +(dg33: GMat3D) = new IMat3D((xx).toDouble + dg33.xx, (xy).toDouble + dg33.xy, (xz).toDouble + dg33.xz, (yx).toDouble + dg33.yx, (yy).toDouble + dg33.yy, (yz).toDouble + dg33.yz, (zx).toDouble + dg33.zx, (zy).toDouble + dg33.zy, (zz).toDouble + dg33.zz)
    def -(x0: Int) = new IMat3I(xx - x0, xy - x0, xz - x0, yx - x0, yy - x0, yz - x0, zx - x0, zy - x0, zz - x0)
    def -(x0: Long) = new IMat3L((xx).toLong - x0, (xy).toLong - x0, (xz).toLong - x0, (yx).toLong - x0, (yy).toLong - x0, (yz).toLong - x0, (zx).toLong - x0, (zy).toLong - x0, (zz).toLong - x0)
    def -(x0: Float) = new IMat3F((xx).toFloat - x0, (xy).toFloat - x0, (xz).toFloat - x0, (yx).toFloat - x0, (yy).toFloat - x0, (yz).toFloat - x0, (zx).toFloat - x0, (zy).toFloat - x0, (zz).toFloat - x0)
    def -(x0: Double) = new IMat3D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0)
    def -(sg33: GMat3S) = new IMat3I(xx - (sg33.xx).toInt, xy - (sg33.xy).toInt, xz - (sg33.xz).toInt, yx - (sg33.yx).toInt, yy - (sg33.yy).toInt, yz - (sg33.yz).toInt, zx - (sg33.zx).toInt, zy - (sg33.zy).toInt, zz - (sg33.zz).toInt)
    def -(ig33: GMat3I) = new IMat3I(xx - ig33.xx, xy - ig33.xy, xz - ig33.xz, yx - ig33.yx, yy - ig33.yy, yz - ig33.yz, zx - ig33.zx, zy - ig33.zy, zz - ig33.zz)
    def -(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int) = new IMat3I(xx - xx0, xy - xy0, xz - xz0, yx - yx0, yy - yy0, yz - yz0, zx - zx0, zy - zy0, zz - zz0)
    def -(lg33: GMat3L) = new IMat3L((xx).toLong - lg33.xx, (xy).toLong - lg33.xy, (xz).toLong - lg33.xz, (yx).toLong - lg33.yx, (yy).toLong - lg33.yy, (yz).toLong - lg33.yz, (zx).toLong - lg33.zx, (zy).toLong - lg33.zy, (zz).toLong - lg33.zz)
    def -(fg33: GMat3F) = new IMat3F((xx).toFloat - fg33.xx, (xy).toFloat - fg33.xy, (xz).toFloat - fg33.xz, (yx).toFloat - fg33.yx, (yy).toFloat - fg33.yy, (yz).toFloat - fg33.yz, (zx).toFloat - fg33.zx, (zy).toFloat - fg33.zy, (zz).toFloat - fg33.zz)
    def -(dg33: GMat3D) = new IMat3D((xx).toDouble - dg33.xx, (xy).toDouble - dg33.xy, (xz).toDouble - dg33.xz, (yx).toDouble - dg33.yx, (yy).toDouble - dg33.yy, (yz).toDouble - dg33.yz, (zx).toDouble - dg33.zx, (zy).toDouble - dg33.zy, (zz).toDouble - dg33.zz)
    def *(x0: Int) = new IMat3I(xx * x0, xy * x0, xz * x0, yx * x0, yy * x0, yz * x0, zx * x0, zy * x0, zz * x0)
    def *(x0: Long) = new IMat3L((xx).toLong * x0, (xy).toLong * x0, (xz).toLong * x0, (yx).toLong * x0, (yy).toLong * x0, (yz).toLong * x0, (zx).toLong * x0, (zy).toLong * x0, (zz).toLong * x0)
    def *(x0: Float) = new IMat3F((xx).toFloat * x0, (xy).toFloat * x0, (xz).toFloat * x0, (yx).toFloat * x0, (yy).toFloat * x0, (yz).toFloat * x0, (zx).toFloat * x0, (zy).toFloat * x0, (zz).toFloat * x0)
    def *(x0: Double) = new IMat3D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0)
    def *(sg33: GMat3S) = new IMat3I(xx * (sg33.xx).toInt, xy * (sg33.xy).toInt, xz * (sg33.xz).toInt, yx * (sg33.yx).toInt, yy * (sg33.yy).toInt, yz * (sg33.yz).toInt, zx * (sg33.zx).toInt, zy * (sg33.zy).toInt, zz * (sg33.zz).toInt)
    def *(ig33: GMat3I) = new IMat3I(xx * ig33.xx, xy * ig33.xy, xz * ig33.xz, yx * ig33.yx, yy * ig33.yy, yz * ig33.yz, zx * ig33.zx, zy * ig33.zy, zz * ig33.zz)
    def *(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int) = new IMat3I(xx * xx0, xy * xy0, xz * xz0, yx * yx0, yy * yy0, yz * yz0, zx * zx0, zy * zy0, zz * zz0)
    def *(lg33: GMat3L) = new IMat3L((xx).toLong * lg33.xx, (xy).toLong * lg33.xy, (xz).toLong * lg33.xz, (yx).toLong * lg33.yx, (yy).toLong * lg33.yy, (yz).toLong * lg33.yz, (zx).toLong * lg33.zx, (zy).toLong * lg33.zy, (zz).toLong * lg33.zz)
    def *(fg33: GMat3F) = new IMat3F((xx).toFloat * fg33.xx, (xy).toFloat * fg33.xy, (xz).toFloat * fg33.xz, (yx).toFloat * fg33.yx, (yy).toFloat * fg33.yy, (yz).toFloat * fg33.yz, (zx).toFloat * fg33.zx, (zy).toFloat * fg33.zy, (zz).toFloat * fg33.zz)
    def *(dg33: GMat3D) = new IMat3D((xx).toDouble * dg33.xx, (xy).toDouble * dg33.xy, (xz).toDouble * dg33.xz, (yx).toDouble * dg33.yx, (yy).toDouble * dg33.yy, (yz).toDouble * dg33.yz, (zx).toDouble * dg33.zx, (zy).toDouble * dg33.zy, (zz).toDouble * dg33.zz)
    def /(x0: Int) = new IMat3I(xx / x0, xy / x0, xz / x0, yx / x0, yy / x0, yz / x0, zx / x0, zy / x0, zz / x0)
    def /(x0: Long) = new IMat3L((xx).toLong / x0, (xy).toLong / x0, (xz).toLong / x0, (yx).toLong / x0, (yy).toLong / x0, (yz).toLong / x0, (zx).toLong / x0, (zy).toLong / x0, (zz).toLong / x0)
    def /(x0: Float) = new IMat3F((xx).toFloat / x0, (xy).toFloat / x0, (xz).toFloat / x0, (yx).toFloat / x0, (yy).toFloat / x0, (yz).toFloat / x0, (zx).toFloat / x0, (zy).toFloat / x0, (zz).toFloat / x0)
    def /(x0: Double) = new IMat3D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0)
    def /(sg33: GMat3S) = new IMat3I(xx / (sg33.xx).toInt, xy / (sg33.xy).toInt, xz / (sg33.xz).toInt, yx / (sg33.yx).toInt, yy / (sg33.yy).toInt, yz / (sg33.yz).toInt, zx / (sg33.zx).toInt, zy / (sg33.zy).toInt, zz / (sg33.zz).toInt)
    def /(ig33: GMat3I) = new IMat3I(xx / ig33.xx, xy / ig33.xy, xz / ig33.xz, yx / ig33.yx, yy / ig33.yy, yz / ig33.yz, zx / ig33.zx, zy / ig33.zy, zz / ig33.zz)
    def /(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int) = new IMat3I(xx / xx0, xy / xy0, xz / xz0, yx / yx0, yy / yy0, yz / yz0, zx / zx0, zy / zy0, zz / zz0)
    def /(lg33: GMat3L) = new IMat3L((xx).toLong / lg33.xx, (xy).toLong / lg33.xy, (xz).toLong / lg33.xz, (yx).toLong / lg33.yx, (yy).toLong / lg33.yy, (yz).toLong / lg33.yz, (zx).toLong / lg33.zx, (zy).toLong / lg33.zy, (zz).toLong / lg33.zz)
    def /(fg33: GMat3F) = new IMat3F((xx).toFloat / fg33.xx, (xy).toFloat / fg33.xy, (xz).toFloat / fg33.xz, (yx).toFloat / fg33.yx, (yy).toFloat / fg33.yy, (yz).toFloat / fg33.yz, (zx).toFloat / fg33.zx, (zy).toFloat / fg33.zy, (zz).toFloat / fg33.zz)
    def /(dg33: GMat3D) = new IMat3D((xx).toDouble / dg33.xx, (xy).toDouble / dg33.xy, (xz).toDouble / dg33.xz, (yx).toDouble / dg33.yx, (yy).toDouble / dg33.yy, (yz).toDouble / dg33.yz, (zx).toDouble / dg33.zx, (zy).toDouble / dg33.zy, (zz).toDouble / dg33.zz)
    def max(x0: Int) = new IMat3I(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0))
    def max(x0: Long) = new IMat3L(math.max((xx).toLong,x0), math.max((xy).toLong,x0), math.max((xz).toLong,x0), math.max((yx).toLong,x0), math.max((yy).toLong,x0), math.max((yz).toLong,x0), math.max((zx).toLong,x0), math.max((zy).toLong,x0), math.max((zz).toLong,x0))
    def max(x0: Float) = new IMat3F(math.max((xx).toFloat,x0), math.max((xy).toFloat,x0), math.max((xz).toFloat,x0), math.max((yx).toFloat,x0), math.max((yy).toFloat,x0), math.max((yz).toFloat,x0), math.max((zx).toFloat,x0), math.max((zy).toFloat,x0), math.max((zz).toFloat,x0))
    def max(x0: Double) = new IMat3D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0))
    def max(sg33: GMat3S) = new IMat3I(math.max(xx,(sg33.xx).toInt), math.max(xy,(sg33.xy).toInt), math.max(xz,(sg33.xz).toInt), math.max(yx,(sg33.yx).toInt), math.max(yy,(sg33.yy).toInt), math.max(yz,(sg33.yz).toInt), math.max(zx,(sg33.zx).toInt), math.max(zy,(sg33.zy).toInt), math.max(zz,(sg33.zz).toInt))
    def max(ig33: GMat3I) = new IMat3I(math.max(xx,ig33.xx), math.max(xy,ig33.xy), math.max(xz,ig33.xz), math.max(yx,ig33.yx), math.max(yy,ig33.yy), math.max(yz,ig33.yz), math.max(zx,ig33.zx), math.max(zy,ig33.zy), math.max(zz,ig33.zz))
    def max(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int) = new IMat3I(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0))
    def max(lg33: GMat3L) = new IMat3L(math.max((xx).toLong,lg33.xx), math.max((xy).toLong,lg33.xy), math.max((xz).toLong,lg33.xz), math.max((yx).toLong,lg33.yx), math.max((yy).toLong,lg33.yy), math.max((yz).toLong,lg33.yz), math.max((zx).toLong,lg33.zx), math.max((zy).toLong,lg33.zy), math.max((zz).toLong,lg33.zz))
    def max(fg33: GMat3F) = new IMat3F(math.max((xx).toFloat,fg33.xx), math.max((xy).toFloat,fg33.xy), math.max((xz).toFloat,fg33.xz), math.max((yx).toFloat,fg33.yx), math.max((yy).toFloat,fg33.yy), math.max((yz).toFloat,fg33.yz), math.max((zx).toFloat,fg33.zx), math.max((zy).toFloat,fg33.zy), math.max((zz).toFloat,fg33.zz))
    def max(dg33: GMat3D) = new IMat3D(math.max((xx).toDouble,dg33.xx), math.max((xy).toDouble,dg33.xy), math.max((xz).toDouble,dg33.xz), math.max((yx).toDouble,dg33.yx), math.max((yy).toDouble,dg33.yy), math.max((yz).toDouble,dg33.yz), math.max((zx).toDouble,dg33.zx), math.max((zy).toDouble,dg33.zy), math.max((zz).toDouble,dg33.zz))
    def min(x0: Int) = new IMat3I(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0))
    def min(x0: Long) = new IMat3L(math.min((xx).toLong,x0), math.min((xy).toLong,x0), math.min((xz).toLong,x0), math.min((yx).toLong,x0), math.min((yy).toLong,x0), math.min((yz).toLong,x0), math.min((zx).toLong,x0), math.min((zy).toLong,x0), math.min((zz).toLong,x0))
    def min(x0: Float) = new IMat3F(math.min((xx).toFloat,x0), math.min((xy).toFloat,x0), math.min((xz).toFloat,x0), math.min((yx).toFloat,x0), math.min((yy).toFloat,x0), math.min((yz).toFloat,x0), math.min((zx).toFloat,x0), math.min((zy).toFloat,x0), math.min((zz).toFloat,x0))
    def min(x0: Double) = new IMat3D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0))
    def min(sg33: GMat3S) = new IMat3I(math.min(xx,(sg33.xx).toInt), math.min(xy,(sg33.xy).toInt), math.min(xz,(sg33.xz).toInt), math.min(yx,(sg33.yx).toInt), math.min(yy,(sg33.yy).toInt), math.min(yz,(sg33.yz).toInt), math.min(zx,(sg33.zx).toInt), math.min(zy,(sg33.zy).toInt), math.min(zz,(sg33.zz).toInt))
    def min(ig33: GMat3I) = new IMat3I(math.min(xx,ig33.xx), math.min(xy,ig33.xy), math.min(xz,ig33.xz), math.min(yx,ig33.yx), math.min(yy,ig33.yy), math.min(yz,ig33.yz), math.min(zx,ig33.zx), math.min(zy,ig33.zy), math.min(zz,ig33.zz))
    def min(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int) = new IMat3I(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0))
    def min(lg33: GMat3L) = new IMat3L(math.min((xx).toLong,lg33.xx), math.min((xy).toLong,lg33.xy), math.min((xz).toLong,lg33.xz), math.min((yx).toLong,lg33.yx), math.min((yy).toLong,lg33.yy), math.min((yz).toLong,lg33.yz), math.min((zx).toLong,lg33.zx), math.min((zy).toLong,lg33.zy), math.min((zz).toLong,lg33.zz))
    def min(fg33: GMat3F) = new IMat3F(math.min((xx).toFloat,fg33.xx), math.min((xy).toFloat,fg33.xy), math.min((xz).toFloat,fg33.xz), math.min((yx).toFloat,fg33.yx), math.min((yy).toFloat,fg33.yy), math.min((yz).toFloat,fg33.yz), math.min((zx).toFloat,fg33.zx), math.min((zy).toFloat,fg33.zy), math.min((zz).toFloat,fg33.zz))
    def min(dg33: GMat3D) = new IMat3D(math.min((xx).toDouble,dg33.xx), math.min((xy).toDouble,dg33.xy), math.min((xz).toDouble,dg33.xz), math.min((yx).toDouble,dg33.yx), math.min((yy).toDouble,dg33.yy), math.min((yz).toDouble,dg33.yz), math.min((zx).toDouble,dg33.zx), math.min((zy).toDouble,dg33.zy), math.min((zz).toDouble,dg33.zz))
    def operate(sg33: GMat3S)(fun: (Int,Int)=>Int) = new IMat3I(fun(xx,(sg33.xx).toInt), fun(xy,(sg33.xy).toInt), fun(xz,(sg33.xz).toInt), fun(yx,(sg33.yx).toInt), fun(yy,(sg33.yy).toInt), fun(yz,(sg33.yz).toInt), fun(zx,(sg33.zx).toInt), fun(zy,(sg33.zy).toInt), fun(zz,(sg33.zz).toInt))
    def operate(ig33: GMat3I)(fun: (Int,Int)=>Int) = new IMat3I(fun(xx,ig33.xx), fun(xy,ig33.xy), fun(xz,ig33.xz), fun(yx,ig33.yx), fun(yy,ig33.yy), fun(yz,ig33.yz), fun(zx,ig33.zx), fun(zy,ig33.zy), fun(zz,ig33.zz))
    def operate(lg33: GMat3L)(fun: (Long,Long)=>Long) = new IMat3L(fun((xx).toLong,lg33.xx), fun((xy).toLong,lg33.xy), fun((xz).toLong,lg33.xz), fun((yx).toLong,lg33.yx), fun((yy).toLong,lg33.yy), fun((yz).toLong,lg33.yz), fun((zx).toLong,lg33.zx), fun((zy).toLong,lg33.zy), fun((zz).toLong,lg33.zz))
    def operate(fg33: GMat3F)(fun: (Float,Float)=>Float) = new IMat3F(fun((xx).toFloat,fg33.xx), fun((xy).toFloat,fg33.xy), fun((xz).toFloat,fg33.xz), fun((yx).toFloat,fg33.yx), fun((yy).toFloat,fg33.yy), fun((yz).toFloat,fg33.yz), fun((zx).toFloat,fg33.zx), fun((zy).toFloat,fg33.zy), fun((zz).toFloat,fg33.zz))
    def operate(dg33: GMat3D)(fun: (Double,Double)=>Double) = new IMat3D(fun((xx).toDouble,dg33.xx), fun((xy).toDouble,dg33.xy), fun((xz).toDouble,dg33.xz), fun((yx).toDouble,dg33.yx), fun((yy).toDouble,dg33.yy), fun((yz).toDouble,dg33.yz), fun((zx).toDouble,dg33.zx), fun((zy).toDouble,dg33.zy), fun((zz).toDouble,dg33.zz))
    def fold(zero: Int)(fun: (Int,Int)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Long)(fun: (Long,Int)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Float)(fun: (Float,Int)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Double)(fun: (Double,Int)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def reduce(fun: (Int,Int)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),yx),yy),yz),zx),zy),zz)
    def ===(ig33: GMat3I) = xx==ig33.xx && xy==ig33.xy && xz==ig33.xz && yx==ig33.yx && yy==ig33.yy && yz==ig33.yz && zx==ig33.zx && zy==ig33.zy && zz==ig33.zz
    def ===(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int) = xx==xx0 && xy==xy0 && xz==xz0 && yx==yx0 && yy==yy0 && yz==yz0 && zx==zx0 && zy==zy0 && zz==zz0
    def det = xx*(yy*zz - yz*zy) + xy*(yz*zx - yx*zz) + xz*(yx*zy - yy*zx)
    def trace = new IVec3I(xx, yy, zz)
    def xRow = new IVec3I(xx, xy, xz)
    def xCol = new IVec3I(xx, yx, zx)
    def yRow = new IVec3I(yx, yy, yz)
    def yCol = new IVec3I(xy, yy, zy)
    def zRow = new IVec3I(zx, zy, zz)
    def zCol = new IVec3I(xz, yz, zz)
    def t = new IMat3I(xx, yx, zx, xy, yy, zy, xz, yz, zz)
    def **(sg3: GVec3S) = new IVec3I(xx*(sg3.x).toInt+xy*(sg3.y).toInt+xz*(sg3.z).toInt, yx*(sg3.x).toInt+yy*(sg3.y).toInt+yz*(sg3.z).toInt, zx*(sg3.x).toInt+zy*(sg3.y).toInt+zz*(sg3.z).toInt)
    def **(ig3: GVec3I) = new IVec3I(xx*ig3.x+xy*ig3.y+xz*ig3.z, yx*ig3.x+yy*ig3.y+yz*ig3.z, zx*ig3.x+zy*ig3.y+zz*ig3.z)
    def **(lg3: GVec3L) = new IVec3L((xx).toLong*lg3.x+(xy).toLong*lg3.y+(xz).toLong*lg3.z, (yx).toLong*lg3.x+(yy).toLong*lg3.y+(yz).toLong*lg3.z, (zx).toLong*lg3.x+(zy).toLong*lg3.y+(zz).toLong*lg3.z)
    def **(fg3: GVec3F) = new IVec3F((xx).toFloat*fg3.x+(xy).toFloat*fg3.y+(xz).toFloat*fg3.z, (yx).toFloat*fg3.x+(yy).toFloat*fg3.y+(yz).toFloat*fg3.z, (zx).toFloat*fg3.x+(zy).toFloat*fg3.y+(zz).toFloat*fg3.z)
    def **(dg3: GVec3D) = new IVec3D((xx).toDouble*dg3.x+(xy).toDouble*dg3.y+(xz).toDouble*dg3.z, (yx).toDouble*dg3.x+(yy).toDouble*dg3.y+(yz).toDouble*dg3.z, (zx).toDouble*dg3.x+(zy).toDouble*dg3.y+(zz).toDouble*dg3.z)
    def **(sg33: GMat3S) = new IMat3I(xx*(sg33.xx).toInt+xy*(sg33.yx).toInt+xz*(sg33.zx).toInt, xx*(sg33.xy).toInt+xy*(sg33.yy).toInt+xz*(sg33.zy).toInt, xx*(sg33.xz).toInt+xy*(sg33.yz).toInt+xz*(sg33.zz).toInt, yx*(sg33.xx).toInt+yy*(sg33.yx).toInt+yz*(sg33.zx).toInt, yx*(sg33.xy).toInt+yy*(sg33.yy).toInt+yz*(sg33.zy).toInt, yx*(sg33.xz).toInt+yy*(sg33.yz).toInt+yz*(sg33.zz).toInt, zx*(sg33.xx).toInt+zy*(sg33.yx).toInt+zz*(sg33.zx).toInt, zx*(sg33.xy).toInt+zy*(sg33.yy).toInt+zz*(sg33.zy).toInt, zx*(sg33.xz).toInt+zy*(sg33.yz).toInt+zz*(sg33.zz).toInt)
    def **(ig33: GMat3I) = new IMat3I(xx*ig33.xx+xy*ig33.yx+xz*ig33.zx, xx*ig33.xy+xy*ig33.yy+xz*ig33.zy, xx*ig33.xz+xy*ig33.yz+xz*ig33.zz, yx*ig33.xx+yy*ig33.yx+yz*ig33.zx, yx*ig33.xy+yy*ig33.yy+yz*ig33.zy, yx*ig33.xz+yy*ig33.yz+yz*ig33.zz, zx*ig33.xx+zy*ig33.yx+zz*ig33.zx, zx*ig33.xy+zy*ig33.yy+zz*ig33.zy, zx*ig33.xz+zy*ig33.yz+zz*ig33.zz)
    def **(lg33: GMat3L) = new IMat3L((xx).toLong*lg33.xx+(xy).toLong*lg33.yx+(xz).toLong*lg33.zx, (xx).toLong*lg33.xy+(xy).toLong*lg33.yy+(xz).toLong*lg33.zy, (xx).toLong*lg33.xz+(xy).toLong*lg33.yz+(xz).toLong*lg33.zz, (yx).toLong*lg33.xx+(yy).toLong*lg33.yx+(yz).toLong*lg33.zx, (yx).toLong*lg33.xy+(yy).toLong*lg33.yy+(yz).toLong*lg33.zy, (yx).toLong*lg33.xz+(yy).toLong*lg33.yz+(yz).toLong*lg33.zz, (zx).toLong*lg33.xx+(zy).toLong*lg33.yx+(zz).toLong*lg33.zx, (zx).toLong*lg33.xy+(zy).toLong*lg33.yy+(zz).toLong*lg33.zy, (zx).toLong*lg33.xz+(zy).toLong*lg33.yz+(zz).toLong*lg33.zz)
    def **(fg33: GMat3F) = new IMat3F((xx).toFloat*fg33.xx+(xy).toFloat*fg33.yx+(xz).toFloat*fg33.zx, (xx).toFloat*fg33.xy+(xy).toFloat*fg33.yy+(xz).toFloat*fg33.zy, (xx).toFloat*fg33.xz+(xy).toFloat*fg33.yz+(xz).toFloat*fg33.zz, (yx).toFloat*fg33.xx+(yy).toFloat*fg33.yx+(yz).toFloat*fg33.zx, (yx).toFloat*fg33.xy+(yy).toFloat*fg33.yy+(yz).toFloat*fg33.zy, (yx).toFloat*fg33.xz+(yy).toFloat*fg33.yz+(yz).toFloat*fg33.zz, (zx).toFloat*fg33.xx+(zy).toFloat*fg33.yx+(zz).toFloat*fg33.zx, (zx).toFloat*fg33.xy+(zy).toFloat*fg33.yy+(zz).toFloat*fg33.zy, (zx).toFloat*fg33.xz+(zy).toFloat*fg33.yz+(zz).toFloat*fg33.zz)
    def **(dg33: GMat3D) = new IMat3D((xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx, (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy, (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz, (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx, (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy, (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz, (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx, (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy, (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz)
  } // class GMat3I

  object GMat3I {
    def apply(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): GMat3I = new IMat3I(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): GMat3I = IMat3I.parse(str)
    val identity: GMat3I = IMat3I.identity
    val zero: GMat3I = IMat3I.zero
    def traced(ig3: GVec3I) = new IMat3I(ig3.x, 0, 0, 0, ig3.y, 0, 0, 0, ig3.z)
  } // object GMat3I


  abstract class GMat3L extends Cloneable {
    def xx: Long
    def xy: Long
    def xz: Long
    def yx: Long
    def yy: Long
    def yz: Long
    def zx: Long
    def zy: Long
    def zz: Long
    override def toString = "["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]"
    override def hashCode = ((((((((zz.##)*16777619 ^ zy.##)*16777619 ^ zx.##)*16777619 ^ yz.##)*16777619 ^ yy.##)*16777619 ^ yx.##)*16777619 ^ xz.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg33: GMat3S => {xx==sg33.xx && xy==sg33.xy && xz==sg33.xz && yx==sg33.yx && yy==sg33.yy && yz==sg33.yz && zx==sg33.zx && zy==sg33.zy && zz==sg33.zz }; case ig33: GMat3I => {xx==ig33.xx && xy==ig33.xy && xz==ig33.xz && yx==ig33.yx && yy==ig33.yy && yz==ig33.yz && zx==ig33.zx && zy==ig33.zy && zz==ig33.zz }; case lg33: GMat3L => {xx==lg33.xx && xy==lg33.xy && xz==lg33.xz && yx==lg33.yx && yy==lg33.yy && yz==lg33.yz && zx==lg33.zx && zy==lg33.zy && zz==lg33.zz }; case fg33: GMat3F => {xx==fg33.xx && xy==fg33.xy && xz==fg33.xz && yx==fg33.yx && yy==fg33.yy && yz==fg33.yz && zx==fg33.zx && zy==fg33.zy && zz==fg33.zz }; case dg33: GMat3D => {xx==dg33.xx && xy==dg33.xy && xz==dg33.xz && yx==dg33.yx && yy==dg33.yy && yz==dg33.yz && zx==dg33.zx && zy==dg33.zy && zz==dg33.zz }; case _ => false }
    override def clone(): GMat3L = new IMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def toS: GMat3S = new IMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    def toI: GMat3I = new IMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    def mapI(fun: Long => Int) = new IMat3I((fun(xx)).toInt, (fun(xy)).toInt, (fun(xz)).toInt, (fun(yx)).toInt, (fun(yy)).toInt, (fun(yz)).toInt, (fun(zx)).toInt, (fun(zy)).toInt, (fun(zz)).toInt)
    def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz): GMat3L = new IMat3L(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def trim: GMat2L = new IMat2L(xx, xy, yx, yy)
    def pad(padding: Long = 1): GMat4L = new IMat4L(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapL(fun: Long => Long) = new IMat3L(fun(xx), fun(xy), fun(xz), fun(yx), fun(yy), fun(yz), fun(zx), fun(zy), fun(zz))
    def toF: GMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    def mapF(fun: Long => Float) = new IMat3F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(xz)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat, (fun(yz)).toFloat, (fun(zx)).toFloat, (fun(zy)).toFloat, (fun(zz)).toFloat)
    def toD: GMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def mapD(fun: Long => Double) = new IMat3D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(xz)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble, (fun(yz)).toDouble, (fun(zx)).toDouble, (fun(zy)).toDouble, (fun(zz)).toDouble)
    def imm = new IMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mut = new MMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def unary_-() = new IMat3L(-xx, -xy, -xz, -yx, -yy, -yz, -zx, -zy, -zz)
    def +(x0: Long) = new IMat3L(xx + x0, xy + x0, xz + x0, yx + x0, yy + x0, yz + x0, zx + x0, zy + x0, zz + x0)
    def +(x0: Double) = new IMat3D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0)
    def +(sg33: GMat3S) = new IMat3L(xx + (sg33.xx).toLong, xy + (sg33.xy).toLong, xz + (sg33.xz).toLong, yx + (sg33.yx).toLong, yy + (sg33.yy).toLong, yz + (sg33.yz).toLong, zx + (sg33.zx).toLong, zy + (sg33.zy).toLong, zz + (sg33.zz).toLong)
    def +(ig33: GMat3I) = new IMat3L(xx + (ig33.xx).toLong, xy + (ig33.xy).toLong, xz + (ig33.xz).toLong, yx + (ig33.yx).toLong, yy + (ig33.yy).toLong, yz + (ig33.yz).toLong, zx + (ig33.zx).toLong, zy + (ig33.zy).toLong, zz + (ig33.zz).toLong)
    def +(lg33: GMat3L) = new IMat3L(xx + lg33.xx, xy + lg33.xy, xz + lg33.xz, yx + lg33.yx, yy + lg33.yy, yz + lg33.yz, zx + lg33.zx, zy + lg33.zy, zz + lg33.zz)
    def +(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long) = new IMat3L(xx + xx0, xy + xy0, xz + xz0, yx + yx0, yy + yy0, yz + yz0, zx + zx0, zy + zy0, zz + zz0)
    def +(fg33: GMat3F) = new IMat3D((xx).toDouble + (fg33.xx).toDouble, (xy).toDouble + (fg33.xy).toDouble, (xz).toDouble + (fg33.xz).toDouble, (yx).toDouble + (fg33.yx).toDouble, (yy).toDouble + (fg33.yy).toDouble, (yz).toDouble + (fg33.yz).toDouble, (zx).toDouble + (fg33.zx).toDouble, (zy).toDouble + (fg33.zy).toDouble, (zz).toDouble + (fg33.zz).toDouble)
    def +(dg33: GMat3D) = new IMat3D((xx).toDouble + dg33.xx, (xy).toDouble + dg33.xy, (xz).toDouble + dg33.xz, (yx).toDouble + dg33.yx, (yy).toDouble + dg33.yy, (yz).toDouble + dg33.yz, (zx).toDouble + dg33.zx, (zy).toDouble + dg33.zy, (zz).toDouble + dg33.zz)
    def -(x0: Long) = new IMat3L(xx - x0, xy - x0, xz - x0, yx - x0, yy - x0, yz - x0, zx - x0, zy - x0, zz - x0)
    def -(x0: Double) = new IMat3D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0)
    def -(sg33: GMat3S) = new IMat3L(xx - (sg33.xx).toLong, xy - (sg33.xy).toLong, xz - (sg33.xz).toLong, yx - (sg33.yx).toLong, yy - (sg33.yy).toLong, yz - (sg33.yz).toLong, zx - (sg33.zx).toLong, zy - (sg33.zy).toLong, zz - (sg33.zz).toLong)
    def -(ig33: GMat3I) = new IMat3L(xx - (ig33.xx).toLong, xy - (ig33.xy).toLong, xz - (ig33.xz).toLong, yx - (ig33.yx).toLong, yy - (ig33.yy).toLong, yz - (ig33.yz).toLong, zx - (ig33.zx).toLong, zy - (ig33.zy).toLong, zz - (ig33.zz).toLong)
    def -(lg33: GMat3L) = new IMat3L(xx - lg33.xx, xy - lg33.xy, xz - lg33.xz, yx - lg33.yx, yy - lg33.yy, yz - lg33.yz, zx - lg33.zx, zy - lg33.zy, zz - lg33.zz)
    def -(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long) = new IMat3L(xx - xx0, xy - xy0, xz - xz0, yx - yx0, yy - yy0, yz - yz0, zx - zx0, zy - zy0, zz - zz0)
    def -(fg33: GMat3F) = new IMat3D((xx).toDouble - (fg33.xx).toDouble, (xy).toDouble - (fg33.xy).toDouble, (xz).toDouble - (fg33.xz).toDouble, (yx).toDouble - (fg33.yx).toDouble, (yy).toDouble - (fg33.yy).toDouble, (yz).toDouble - (fg33.yz).toDouble, (zx).toDouble - (fg33.zx).toDouble, (zy).toDouble - (fg33.zy).toDouble, (zz).toDouble - (fg33.zz).toDouble)
    def -(dg33: GMat3D) = new IMat3D((xx).toDouble - dg33.xx, (xy).toDouble - dg33.xy, (xz).toDouble - dg33.xz, (yx).toDouble - dg33.yx, (yy).toDouble - dg33.yy, (yz).toDouble - dg33.yz, (zx).toDouble - dg33.zx, (zy).toDouble - dg33.zy, (zz).toDouble - dg33.zz)
    def *(x0: Long) = new IMat3L(xx * x0, xy * x0, xz * x0, yx * x0, yy * x0, yz * x0, zx * x0, zy * x0, zz * x0)
    def *(x0: Double) = new IMat3D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0)
    def *(sg33: GMat3S) = new IMat3L(xx * (sg33.xx).toLong, xy * (sg33.xy).toLong, xz * (sg33.xz).toLong, yx * (sg33.yx).toLong, yy * (sg33.yy).toLong, yz * (sg33.yz).toLong, zx * (sg33.zx).toLong, zy * (sg33.zy).toLong, zz * (sg33.zz).toLong)
    def *(ig33: GMat3I) = new IMat3L(xx * (ig33.xx).toLong, xy * (ig33.xy).toLong, xz * (ig33.xz).toLong, yx * (ig33.yx).toLong, yy * (ig33.yy).toLong, yz * (ig33.yz).toLong, zx * (ig33.zx).toLong, zy * (ig33.zy).toLong, zz * (ig33.zz).toLong)
    def *(lg33: GMat3L) = new IMat3L(xx * lg33.xx, xy * lg33.xy, xz * lg33.xz, yx * lg33.yx, yy * lg33.yy, yz * lg33.yz, zx * lg33.zx, zy * lg33.zy, zz * lg33.zz)
    def *(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long) = new IMat3L(xx * xx0, xy * xy0, xz * xz0, yx * yx0, yy * yy0, yz * yz0, zx * zx0, zy * zy0, zz * zz0)
    def *(fg33: GMat3F) = new IMat3D((xx).toDouble * (fg33.xx).toDouble, (xy).toDouble * (fg33.xy).toDouble, (xz).toDouble * (fg33.xz).toDouble, (yx).toDouble * (fg33.yx).toDouble, (yy).toDouble * (fg33.yy).toDouble, (yz).toDouble * (fg33.yz).toDouble, (zx).toDouble * (fg33.zx).toDouble, (zy).toDouble * (fg33.zy).toDouble, (zz).toDouble * (fg33.zz).toDouble)
    def *(dg33: GMat3D) = new IMat3D((xx).toDouble * dg33.xx, (xy).toDouble * dg33.xy, (xz).toDouble * dg33.xz, (yx).toDouble * dg33.yx, (yy).toDouble * dg33.yy, (yz).toDouble * dg33.yz, (zx).toDouble * dg33.zx, (zy).toDouble * dg33.zy, (zz).toDouble * dg33.zz)
    def /(x0: Long) = new IMat3L(xx / x0, xy / x0, xz / x0, yx / x0, yy / x0, yz / x0, zx / x0, zy / x0, zz / x0)
    def /(x0: Double) = new IMat3D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0)
    def /(sg33: GMat3S) = new IMat3L(xx / (sg33.xx).toLong, xy / (sg33.xy).toLong, xz / (sg33.xz).toLong, yx / (sg33.yx).toLong, yy / (sg33.yy).toLong, yz / (sg33.yz).toLong, zx / (sg33.zx).toLong, zy / (sg33.zy).toLong, zz / (sg33.zz).toLong)
    def /(ig33: GMat3I) = new IMat3L(xx / (ig33.xx).toLong, xy / (ig33.xy).toLong, xz / (ig33.xz).toLong, yx / (ig33.yx).toLong, yy / (ig33.yy).toLong, yz / (ig33.yz).toLong, zx / (ig33.zx).toLong, zy / (ig33.zy).toLong, zz / (ig33.zz).toLong)
    def /(lg33: GMat3L) = new IMat3L(xx / lg33.xx, xy / lg33.xy, xz / lg33.xz, yx / lg33.yx, yy / lg33.yy, yz / lg33.yz, zx / lg33.zx, zy / lg33.zy, zz / lg33.zz)
    def /(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long) = new IMat3L(xx / xx0, xy / xy0, xz / xz0, yx / yx0, yy / yy0, yz / yz0, zx / zx0, zy / zy0, zz / zz0)
    def /(fg33: GMat3F) = new IMat3D((xx).toDouble / (fg33.xx).toDouble, (xy).toDouble / (fg33.xy).toDouble, (xz).toDouble / (fg33.xz).toDouble, (yx).toDouble / (fg33.yx).toDouble, (yy).toDouble / (fg33.yy).toDouble, (yz).toDouble / (fg33.yz).toDouble, (zx).toDouble / (fg33.zx).toDouble, (zy).toDouble / (fg33.zy).toDouble, (zz).toDouble / (fg33.zz).toDouble)
    def /(dg33: GMat3D) = new IMat3D((xx).toDouble / dg33.xx, (xy).toDouble / dg33.xy, (xz).toDouble / dg33.xz, (yx).toDouble / dg33.yx, (yy).toDouble / dg33.yy, (yz).toDouble / dg33.yz, (zx).toDouble / dg33.zx, (zy).toDouble / dg33.zy, (zz).toDouble / dg33.zz)
    def max(x0: Long) = new IMat3L(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0))
    def max(x0: Double) = new IMat3D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0))
    def max(sg33: GMat3S) = new IMat3L(math.max(xx,(sg33.xx).toLong), math.max(xy,(sg33.xy).toLong), math.max(xz,(sg33.xz).toLong), math.max(yx,(sg33.yx).toLong), math.max(yy,(sg33.yy).toLong), math.max(yz,(sg33.yz).toLong), math.max(zx,(sg33.zx).toLong), math.max(zy,(sg33.zy).toLong), math.max(zz,(sg33.zz).toLong))
    def max(ig33: GMat3I) = new IMat3L(math.max(xx,(ig33.xx).toLong), math.max(xy,(ig33.xy).toLong), math.max(xz,(ig33.xz).toLong), math.max(yx,(ig33.yx).toLong), math.max(yy,(ig33.yy).toLong), math.max(yz,(ig33.yz).toLong), math.max(zx,(ig33.zx).toLong), math.max(zy,(ig33.zy).toLong), math.max(zz,(ig33.zz).toLong))
    def max(lg33: GMat3L) = new IMat3L(math.max(xx,lg33.xx), math.max(xy,lg33.xy), math.max(xz,lg33.xz), math.max(yx,lg33.yx), math.max(yy,lg33.yy), math.max(yz,lg33.yz), math.max(zx,lg33.zx), math.max(zy,lg33.zy), math.max(zz,lg33.zz))
    def max(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long) = new IMat3L(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0))
    def max(fg33: GMat3F) = new IMat3D(math.max((xx).toDouble,(fg33.xx).toDouble), math.max((xy).toDouble,(fg33.xy).toDouble), math.max((xz).toDouble,(fg33.xz).toDouble), math.max((yx).toDouble,(fg33.yx).toDouble), math.max((yy).toDouble,(fg33.yy).toDouble), math.max((yz).toDouble,(fg33.yz).toDouble), math.max((zx).toDouble,(fg33.zx).toDouble), math.max((zy).toDouble,(fg33.zy).toDouble), math.max((zz).toDouble,(fg33.zz).toDouble))
    def max(dg33: GMat3D) = new IMat3D(math.max((xx).toDouble,dg33.xx), math.max((xy).toDouble,dg33.xy), math.max((xz).toDouble,dg33.xz), math.max((yx).toDouble,dg33.yx), math.max((yy).toDouble,dg33.yy), math.max((yz).toDouble,dg33.yz), math.max((zx).toDouble,dg33.zx), math.max((zy).toDouble,dg33.zy), math.max((zz).toDouble,dg33.zz))
    def min(x0: Long) = new IMat3L(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0))
    def min(x0: Double) = new IMat3D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0))
    def min(sg33: GMat3S) = new IMat3L(math.min(xx,(sg33.xx).toLong), math.min(xy,(sg33.xy).toLong), math.min(xz,(sg33.xz).toLong), math.min(yx,(sg33.yx).toLong), math.min(yy,(sg33.yy).toLong), math.min(yz,(sg33.yz).toLong), math.min(zx,(sg33.zx).toLong), math.min(zy,(sg33.zy).toLong), math.min(zz,(sg33.zz).toLong))
    def min(ig33: GMat3I) = new IMat3L(math.min(xx,(ig33.xx).toLong), math.min(xy,(ig33.xy).toLong), math.min(xz,(ig33.xz).toLong), math.min(yx,(ig33.yx).toLong), math.min(yy,(ig33.yy).toLong), math.min(yz,(ig33.yz).toLong), math.min(zx,(ig33.zx).toLong), math.min(zy,(ig33.zy).toLong), math.min(zz,(ig33.zz).toLong))
    def min(lg33: GMat3L) = new IMat3L(math.min(xx,lg33.xx), math.min(xy,lg33.xy), math.min(xz,lg33.xz), math.min(yx,lg33.yx), math.min(yy,lg33.yy), math.min(yz,lg33.yz), math.min(zx,lg33.zx), math.min(zy,lg33.zy), math.min(zz,lg33.zz))
    def min(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long) = new IMat3L(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0))
    def min(fg33: GMat3F) = new IMat3D(math.min((xx).toDouble,(fg33.xx).toDouble), math.min((xy).toDouble,(fg33.xy).toDouble), math.min((xz).toDouble,(fg33.xz).toDouble), math.min((yx).toDouble,(fg33.yx).toDouble), math.min((yy).toDouble,(fg33.yy).toDouble), math.min((yz).toDouble,(fg33.yz).toDouble), math.min((zx).toDouble,(fg33.zx).toDouble), math.min((zy).toDouble,(fg33.zy).toDouble), math.min((zz).toDouble,(fg33.zz).toDouble))
    def min(dg33: GMat3D) = new IMat3D(math.min((xx).toDouble,dg33.xx), math.min((xy).toDouble,dg33.xy), math.min((xz).toDouble,dg33.xz), math.min((yx).toDouble,dg33.yx), math.min((yy).toDouble,dg33.yy), math.min((yz).toDouble,dg33.yz), math.min((zx).toDouble,dg33.zx), math.min((zy).toDouble,dg33.zy), math.min((zz).toDouble,dg33.zz))
    def operate(sg33: GMat3S)(fun: (Long,Long)=>Long) = new IMat3L(fun(xx,(sg33.xx).toLong), fun(xy,(sg33.xy).toLong), fun(xz,(sg33.xz).toLong), fun(yx,(sg33.yx).toLong), fun(yy,(sg33.yy).toLong), fun(yz,(sg33.yz).toLong), fun(zx,(sg33.zx).toLong), fun(zy,(sg33.zy).toLong), fun(zz,(sg33.zz).toLong))
    def operate(ig33: GMat3I)(fun: (Long,Long)=>Long) = new IMat3L(fun(xx,(ig33.xx).toLong), fun(xy,(ig33.xy).toLong), fun(xz,(ig33.xz).toLong), fun(yx,(ig33.yx).toLong), fun(yy,(ig33.yy).toLong), fun(yz,(ig33.yz).toLong), fun(zx,(ig33.zx).toLong), fun(zy,(ig33.zy).toLong), fun(zz,(ig33.zz).toLong))
    def operate(lg33: GMat3L)(fun: (Long,Long)=>Long) = new IMat3L(fun(xx,lg33.xx), fun(xy,lg33.xy), fun(xz,lg33.xz), fun(yx,lg33.yx), fun(yy,lg33.yy), fun(yz,lg33.yz), fun(zx,lg33.zx), fun(zy,lg33.zy), fun(zz,lg33.zz))
    def operate(fg33: GMat3F)(fun: (Double,Double)=>Double) = new IMat3D(fun((xx).toDouble,(fg33.xx).toDouble), fun((xy).toDouble,(fg33.xy).toDouble), fun((xz).toDouble,(fg33.xz).toDouble), fun((yx).toDouble,(fg33.yx).toDouble), fun((yy).toDouble,(fg33.yy).toDouble), fun((yz).toDouble,(fg33.yz).toDouble), fun((zx).toDouble,(fg33.zx).toDouble), fun((zy).toDouble,(fg33.zy).toDouble), fun((zz).toDouble,(fg33.zz).toDouble))
    def operate(dg33: GMat3D)(fun: (Double,Double)=>Double) = new IMat3D(fun((xx).toDouble,dg33.xx), fun((xy).toDouble,dg33.xy), fun((xz).toDouble,dg33.xz), fun((yx).toDouble,dg33.yx), fun((yy).toDouble,dg33.yy), fun((yz).toDouble,dg33.yz), fun((zx).toDouble,dg33.zx), fun((zy).toDouble,dg33.zy), fun((zz).toDouble,dg33.zz))
    def fold(zero: Int)(fun: (Int,Long)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Long)(fun: (Long,Long)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Float)(fun: (Float,Long)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Double)(fun: (Double,Long)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def reduce(fun: (Long,Long)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),yx),yy),yz),zx),zy),zz)
    def ===(lg33: GMat3L) = xx==lg33.xx && xy==lg33.xy && xz==lg33.xz && yx==lg33.yx && yy==lg33.yy && yz==lg33.yz && zx==lg33.zx && zy==lg33.zy && zz==lg33.zz
    def ===(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long) = xx==xx0 && xy==xy0 && xz==xz0 && yx==yx0 && yy==yy0 && yz==yz0 && zx==zx0 && zy==zy0 && zz==zz0
    def det = xx*(yy*zz - yz*zy) + xy*(yz*zx - yx*zz) + xz*(yx*zy - yy*zx)
    def trace = new IVec3L(xx, yy, zz)
    def xRow = new IVec3L(xx, xy, xz)
    def xCol = new IVec3L(xx, yx, zx)
    def yRow = new IVec3L(yx, yy, yz)
    def yCol = new IVec3L(xy, yy, zy)
    def zRow = new IVec3L(zx, zy, zz)
    def zCol = new IVec3L(xz, yz, zz)
    def t = new IMat3L(xx, yx, zx, xy, yy, zy, xz, yz, zz)
    def **(sg3: GVec3S) = new IVec3L(xx*(sg3.x).toLong+xy*(sg3.y).toLong+xz*(sg3.z).toLong, yx*(sg3.x).toLong+yy*(sg3.y).toLong+yz*(sg3.z).toLong, zx*(sg3.x).toLong+zy*(sg3.y).toLong+zz*(sg3.z).toLong)
    def **(ig3: GVec3I) = new IVec3L(xx*(ig3.x).toLong+xy*(ig3.y).toLong+xz*(ig3.z).toLong, yx*(ig3.x).toLong+yy*(ig3.y).toLong+yz*(ig3.z).toLong, zx*(ig3.x).toLong+zy*(ig3.y).toLong+zz*(ig3.z).toLong)
    def **(lg3: GVec3L) = new IVec3L(xx*lg3.x+xy*lg3.y+xz*lg3.z, yx*lg3.x+yy*lg3.y+yz*lg3.z, zx*lg3.x+zy*lg3.y+zz*lg3.z)
    def **(fg3: GVec3F) = new IVec3D((xx).toDouble*(fg3.x).toDouble+(xy).toDouble*(fg3.y).toDouble+(xz).toDouble*(fg3.z).toDouble, (yx).toDouble*(fg3.x).toDouble+(yy).toDouble*(fg3.y).toDouble+(yz).toDouble*(fg3.z).toDouble, (zx).toDouble*(fg3.x).toDouble+(zy).toDouble*(fg3.y).toDouble+(zz).toDouble*(fg3.z).toDouble)
    def **(dg3: GVec3D) = new IVec3D((xx).toDouble*dg3.x+(xy).toDouble*dg3.y+(xz).toDouble*dg3.z, (yx).toDouble*dg3.x+(yy).toDouble*dg3.y+(yz).toDouble*dg3.z, (zx).toDouble*dg3.x+(zy).toDouble*dg3.y+(zz).toDouble*dg3.z)
    def **(sg33: GMat3S) = new IMat3L(xx*(sg33.xx).toLong+xy*(sg33.yx).toLong+xz*(sg33.zx).toLong, xx*(sg33.xy).toLong+xy*(sg33.yy).toLong+xz*(sg33.zy).toLong, xx*(sg33.xz).toLong+xy*(sg33.yz).toLong+xz*(sg33.zz).toLong, yx*(sg33.xx).toLong+yy*(sg33.yx).toLong+yz*(sg33.zx).toLong, yx*(sg33.xy).toLong+yy*(sg33.yy).toLong+yz*(sg33.zy).toLong, yx*(sg33.xz).toLong+yy*(sg33.yz).toLong+yz*(sg33.zz).toLong, zx*(sg33.xx).toLong+zy*(sg33.yx).toLong+zz*(sg33.zx).toLong, zx*(sg33.xy).toLong+zy*(sg33.yy).toLong+zz*(sg33.zy).toLong, zx*(sg33.xz).toLong+zy*(sg33.yz).toLong+zz*(sg33.zz).toLong)
    def **(ig33: GMat3I) = new IMat3L(xx*(ig33.xx).toLong+xy*(ig33.yx).toLong+xz*(ig33.zx).toLong, xx*(ig33.xy).toLong+xy*(ig33.yy).toLong+xz*(ig33.zy).toLong, xx*(ig33.xz).toLong+xy*(ig33.yz).toLong+xz*(ig33.zz).toLong, yx*(ig33.xx).toLong+yy*(ig33.yx).toLong+yz*(ig33.zx).toLong, yx*(ig33.xy).toLong+yy*(ig33.yy).toLong+yz*(ig33.zy).toLong, yx*(ig33.xz).toLong+yy*(ig33.yz).toLong+yz*(ig33.zz).toLong, zx*(ig33.xx).toLong+zy*(ig33.yx).toLong+zz*(ig33.zx).toLong, zx*(ig33.xy).toLong+zy*(ig33.yy).toLong+zz*(ig33.zy).toLong, zx*(ig33.xz).toLong+zy*(ig33.yz).toLong+zz*(ig33.zz).toLong)
    def **(lg33: GMat3L) = new IMat3L(xx*lg33.xx+xy*lg33.yx+xz*lg33.zx, xx*lg33.xy+xy*lg33.yy+xz*lg33.zy, xx*lg33.xz+xy*lg33.yz+xz*lg33.zz, yx*lg33.xx+yy*lg33.yx+yz*lg33.zx, yx*lg33.xy+yy*lg33.yy+yz*lg33.zy, yx*lg33.xz+yy*lg33.yz+yz*lg33.zz, zx*lg33.xx+zy*lg33.yx+zz*lg33.zx, zx*lg33.xy+zy*lg33.yy+zz*lg33.zy, zx*lg33.xz+zy*lg33.yz+zz*lg33.zz)
    def **(fg33: GMat3F) = new IMat3D((xx).toDouble*(fg33.xx).toDouble+(xy).toDouble*(fg33.yx).toDouble+(xz).toDouble*(fg33.zx).toDouble, (xx).toDouble*(fg33.xy).toDouble+(xy).toDouble*(fg33.yy).toDouble+(xz).toDouble*(fg33.zy).toDouble, (xx).toDouble*(fg33.xz).toDouble+(xy).toDouble*(fg33.yz).toDouble+(xz).toDouble*(fg33.zz).toDouble, (yx).toDouble*(fg33.xx).toDouble+(yy).toDouble*(fg33.yx).toDouble+(yz).toDouble*(fg33.zx).toDouble, (yx).toDouble*(fg33.xy).toDouble+(yy).toDouble*(fg33.yy).toDouble+(yz).toDouble*(fg33.zy).toDouble, (yx).toDouble*(fg33.xz).toDouble+(yy).toDouble*(fg33.yz).toDouble+(yz).toDouble*(fg33.zz).toDouble, (zx).toDouble*(fg33.xx).toDouble+(zy).toDouble*(fg33.yx).toDouble+(zz).toDouble*(fg33.zx).toDouble, (zx).toDouble*(fg33.xy).toDouble+(zy).toDouble*(fg33.yy).toDouble+(zz).toDouble*(fg33.zy).toDouble, (zx).toDouble*(fg33.xz).toDouble+(zy).toDouble*(fg33.yz).toDouble+(zz).toDouble*(fg33.zz).toDouble)
    def **(dg33: GMat3D) = new IMat3D((xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx, (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy, (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz, (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx, (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy, (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz, (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx, (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy, (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz)
  } // class GMat3L

  object GMat3L {
    def apply(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): GMat3L = new IMat3L(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): GMat3L = IMat3L.parse(str)
    val identity: GMat3L = IMat3L.identity
    val zero: GMat3L = IMat3L.zero
    def traced(lg3: GVec3L) = new IMat3L(lg3.x, 0, 0, 0, lg3.y, 0, 0, 0, lg3.z)
  } // object GMat3L


  abstract class GMat3F extends Cloneable {
    def xx: Float
    def xy: Float
    def xz: Float
    def yx: Float
    def yy: Float
    def yz: Float
    def zx: Float
    def zy: Float
    def zz: Float
    override def toString = "["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]"
    override def hashCode = ((((((((zz.##)*16777619 ^ zy.##)*16777619 ^ zx.##)*16777619 ^ yz.##)*16777619 ^ yy.##)*16777619 ^ yx.##)*16777619 ^ xz.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg33: GMat3S => {xx==sg33.xx && xy==sg33.xy && xz==sg33.xz && yx==sg33.yx && yy==sg33.yy && yz==sg33.yz && zx==sg33.zx && zy==sg33.zy && zz==sg33.zz }; case ig33: GMat3I => {xx==ig33.xx && xy==ig33.xy && xz==ig33.xz && yx==ig33.yx && yy==ig33.yy && yz==ig33.yz && zx==ig33.zx && zy==ig33.zy && zz==ig33.zz }; case lg33: GMat3L => {xx==lg33.xx && xy==lg33.xy && xz==lg33.xz && yx==lg33.yx && yy==lg33.yy && yz==lg33.yz && zx==lg33.zx && zy==lg33.zy && zz==lg33.zz }; case fg33: GMat3F => {xx==fg33.xx && xy==fg33.xy && xz==fg33.xz && yx==fg33.yx && yy==fg33.yy && yz==fg33.yz && zx==fg33.zx && zy==fg33.zy && zz==fg33.zz }; case dg33: GMat3D => {xx==dg33.xx && xy==dg33.xy && xz==dg33.xz && yx==dg33.yx && yy==dg33.yy && yz==dg33.yz && zx==dg33.zx && zy==dg33.zy && zz==dg33.zz }; case _ => false }
    override def clone(): GMat3F = new IMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def toS: GMat3S = new IMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    def toI: GMat3I = new IMat3I(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    def mapI(fun: Float => Int) = new IMat3I(math.round(fun(xx)), math.round(fun(xy)), math.round(fun(xz)), math.round(fun(yx)), math.round(fun(yy)), math.round(fun(yz)), math.round(fun(zx)), math.round(fun(zy)), math.round(fun(zz)))
    def toL: GMat3L = new IMat3L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble))
    def mapL(fun: Float => Long) = new IMat3L(math.round((fun(xx)).toDouble), math.round((fun(xy)).toDouble), math.round((fun(xz)).toDouble), math.round((fun(yx)).toDouble), math.round((fun(yy)).toDouble), math.round((fun(yz)).toDouble), math.round((fun(zx)).toDouble), math.round((fun(zy)).toDouble), math.round((fun(zz)).toDouble))
    def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz): GMat3F = new IMat3F(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def trim: GMat2F = new IMat2F(xx, xy, yx, yy)
    def pad(padding: Float = 1): GMat4F = new IMat4F(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapF(fun: Float => Float) = new IMat3F(fun(xx), fun(xy), fun(xz), fun(yx), fun(yy), fun(yz), fun(zx), fun(zy), fun(zz))
    def toD: GMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def mapD(fun: Float => Double) = new IMat3D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(xz)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble, (fun(yz)).toDouble, (fun(zx)).toDouble, (fun(zy)).toDouble, (fun(zz)).toDouble)
    def imm = new IMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mut = new MMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def unary_-() = new IMat3F(-xx, -xy, -xz, -yx, -yy, -yz, -zx, -zy, -zz)
    def +(x0: Long) = new IMat3D((xx).toDouble + (x0).toDouble, (xy).toDouble + (x0).toDouble, (xz).toDouble + (x0).toDouble, (yx).toDouble + (x0).toDouble, (yy).toDouble + (x0).toDouble, (yz).toDouble + (x0).toDouble, (zx).toDouble + (x0).toDouble, (zy).toDouble + (x0).toDouble, (zz).toDouble + (x0).toDouble)
    def +(x0: Float) = new IMat3F(xx + x0, xy + x0, xz + x0, yx + x0, yy + x0, yz + x0, zx + x0, zy + x0, zz + x0)
    def +(x0: Double) = new IMat3D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0)
    def +(sg33: GMat3S) = new IMat3F(xx + (sg33.xx).toFloat, xy + (sg33.xy).toFloat, xz + (sg33.xz).toFloat, yx + (sg33.yx).toFloat, yy + (sg33.yy).toFloat, yz + (sg33.yz).toFloat, zx + (sg33.zx).toFloat, zy + (sg33.zy).toFloat, zz + (sg33.zz).toFloat)
    def +(ig33: GMat3I) = new IMat3F(xx + (ig33.xx).toFloat, xy + (ig33.xy).toFloat, xz + (ig33.xz).toFloat, yx + (ig33.yx).toFloat, yy + (ig33.yy).toFloat, yz + (ig33.yz).toFloat, zx + (ig33.zx).toFloat, zy + (ig33.zy).toFloat, zz + (ig33.zz).toFloat)
    def +(lg33: GMat3L) = new IMat3D((xx).toDouble + (lg33.xx).toDouble, (xy).toDouble + (lg33.xy).toDouble, (xz).toDouble + (lg33.xz).toDouble, (yx).toDouble + (lg33.yx).toDouble, (yy).toDouble + (lg33.yy).toDouble, (yz).toDouble + (lg33.yz).toDouble, (zx).toDouble + (lg33.zx).toDouble, (zy).toDouble + (lg33.zy).toDouble, (zz).toDouble + (lg33.zz).toDouble)
    def +(fg33: GMat3F) = new IMat3F(xx + fg33.xx, xy + fg33.xy, xz + fg33.xz, yx + fg33.yx, yy + fg33.yy, yz + fg33.yz, zx + fg33.zx, zy + fg33.zy, zz + fg33.zz)
    def +(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float) = new IMat3F(xx + xx0, xy + xy0, xz + xz0, yx + yx0, yy + yy0, yz + yz0, zx + zx0, zy + zy0, zz + zz0)
    def +(dg33: GMat3D) = new IMat3D((xx).toDouble + dg33.xx, (xy).toDouble + dg33.xy, (xz).toDouble + dg33.xz, (yx).toDouble + dg33.yx, (yy).toDouble + dg33.yy, (yz).toDouble + dg33.yz, (zx).toDouble + dg33.zx, (zy).toDouble + dg33.zy, (zz).toDouble + dg33.zz)
    def -(x0: Long) = new IMat3D((xx).toDouble - (x0).toDouble, (xy).toDouble - (x0).toDouble, (xz).toDouble - (x0).toDouble, (yx).toDouble - (x0).toDouble, (yy).toDouble - (x0).toDouble, (yz).toDouble - (x0).toDouble, (zx).toDouble - (x0).toDouble, (zy).toDouble - (x0).toDouble, (zz).toDouble - (x0).toDouble)
    def -(x0: Float) = new IMat3F(xx - x0, xy - x0, xz - x0, yx - x0, yy - x0, yz - x0, zx - x0, zy - x0, zz - x0)
    def -(x0: Double) = new IMat3D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0)
    def -(sg33: GMat3S) = new IMat3F(xx - (sg33.xx).toFloat, xy - (sg33.xy).toFloat, xz - (sg33.xz).toFloat, yx - (sg33.yx).toFloat, yy - (sg33.yy).toFloat, yz - (sg33.yz).toFloat, zx - (sg33.zx).toFloat, zy - (sg33.zy).toFloat, zz - (sg33.zz).toFloat)
    def -(ig33: GMat3I) = new IMat3F(xx - (ig33.xx).toFloat, xy - (ig33.xy).toFloat, xz - (ig33.xz).toFloat, yx - (ig33.yx).toFloat, yy - (ig33.yy).toFloat, yz - (ig33.yz).toFloat, zx - (ig33.zx).toFloat, zy - (ig33.zy).toFloat, zz - (ig33.zz).toFloat)
    def -(lg33: GMat3L) = new IMat3D((xx).toDouble - (lg33.xx).toDouble, (xy).toDouble - (lg33.xy).toDouble, (xz).toDouble - (lg33.xz).toDouble, (yx).toDouble - (lg33.yx).toDouble, (yy).toDouble - (lg33.yy).toDouble, (yz).toDouble - (lg33.yz).toDouble, (zx).toDouble - (lg33.zx).toDouble, (zy).toDouble - (lg33.zy).toDouble, (zz).toDouble - (lg33.zz).toDouble)
    def -(fg33: GMat3F) = new IMat3F(xx - fg33.xx, xy - fg33.xy, xz - fg33.xz, yx - fg33.yx, yy - fg33.yy, yz - fg33.yz, zx - fg33.zx, zy - fg33.zy, zz - fg33.zz)
    def -(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float) = new IMat3F(xx - xx0, xy - xy0, xz - xz0, yx - yx0, yy - yy0, yz - yz0, zx - zx0, zy - zy0, zz - zz0)
    def -(dg33: GMat3D) = new IMat3D((xx).toDouble - dg33.xx, (xy).toDouble - dg33.xy, (xz).toDouble - dg33.xz, (yx).toDouble - dg33.yx, (yy).toDouble - dg33.yy, (yz).toDouble - dg33.yz, (zx).toDouble - dg33.zx, (zy).toDouble - dg33.zy, (zz).toDouble - dg33.zz)
    def *(x0: Long) = new IMat3D((xx).toDouble * (x0).toDouble, (xy).toDouble * (x0).toDouble, (xz).toDouble * (x0).toDouble, (yx).toDouble * (x0).toDouble, (yy).toDouble * (x0).toDouble, (yz).toDouble * (x0).toDouble, (zx).toDouble * (x0).toDouble, (zy).toDouble * (x0).toDouble, (zz).toDouble * (x0).toDouble)
    def *(x0: Float) = new IMat3F(xx * x0, xy * x0, xz * x0, yx * x0, yy * x0, yz * x0, zx * x0, zy * x0, zz * x0)
    def *(x0: Double) = new IMat3D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0)
    def *(sg33: GMat3S) = new IMat3F(xx * (sg33.xx).toFloat, xy * (sg33.xy).toFloat, xz * (sg33.xz).toFloat, yx * (sg33.yx).toFloat, yy * (sg33.yy).toFloat, yz * (sg33.yz).toFloat, zx * (sg33.zx).toFloat, zy * (sg33.zy).toFloat, zz * (sg33.zz).toFloat)
    def *(ig33: GMat3I) = new IMat3F(xx * (ig33.xx).toFloat, xy * (ig33.xy).toFloat, xz * (ig33.xz).toFloat, yx * (ig33.yx).toFloat, yy * (ig33.yy).toFloat, yz * (ig33.yz).toFloat, zx * (ig33.zx).toFloat, zy * (ig33.zy).toFloat, zz * (ig33.zz).toFloat)
    def *(lg33: GMat3L) = new IMat3D((xx).toDouble * (lg33.xx).toDouble, (xy).toDouble * (lg33.xy).toDouble, (xz).toDouble * (lg33.xz).toDouble, (yx).toDouble * (lg33.yx).toDouble, (yy).toDouble * (lg33.yy).toDouble, (yz).toDouble * (lg33.yz).toDouble, (zx).toDouble * (lg33.zx).toDouble, (zy).toDouble * (lg33.zy).toDouble, (zz).toDouble * (lg33.zz).toDouble)
    def *(fg33: GMat3F) = new IMat3F(xx * fg33.xx, xy * fg33.xy, xz * fg33.xz, yx * fg33.yx, yy * fg33.yy, yz * fg33.yz, zx * fg33.zx, zy * fg33.zy, zz * fg33.zz)
    def *(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float) = new IMat3F(xx * xx0, xy * xy0, xz * xz0, yx * yx0, yy * yy0, yz * yz0, zx * zx0, zy * zy0, zz * zz0)
    def *(dg33: GMat3D) = new IMat3D((xx).toDouble * dg33.xx, (xy).toDouble * dg33.xy, (xz).toDouble * dg33.xz, (yx).toDouble * dg33.yx, (yy).toDouble * dg33.yy, (yz).toDouble * dg33.yz, (zx).toDouble * dg33.zx, (zy).toDouble * dg33.zy, (zz).toDouble * dg33.zz)
    def /(x0: Long) = new IMat3D((xx).toDouble / (x0).toDouble, (xy).toDouble / (x0).toDouble, (xz).toDouble / (x0).toDouble, (yx).toDouble / (x0).toDouble, (yy).toDouble / (x0).toDouble, (yz).toDouble / (x0).toDouble, (zx).toDouble / (x0).toDouble, (zy).toDouble / (x0).toDouble, (zz).toDouble / (x0).toDouble)
    def /(x0: Float) = new IMat3F(xx / x0, xy / x0, xz / x0, yx / x0, yy / x0, yz / x0, zx / x0, zy / x0, zz / x0)
    def /(x0: Double) = new IMat3D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0)
    def /(sg33: GMat3S) = new IMat3F(xx / (sg33.xx).toFloat, xy / (sg33.xy).toFloat, xz / (sg33.xz).toFloat, yx / (sg33.yx).toFloat, yy / (sg33.yy).toFloat, yz / (sg33.yz).toFloat, zx / (sg33.zx).toFloat, zy / (sg33.zy).toFloat, zz / (sg33.zz).toFloat)
    def /(ig33: GMat3I) = new IMat3F(xx / (ig33.xx).toFloat, xy / (ig33.xy).toFloat, xz / (ig33.xz).toFloat, yx / (ig33.yx).toFloat, yy / (ig33.yy).toFloat, yz / (ig33.yz).toFloat, zx / (ig33.zx).toFloat, zy / (ig33.zy).toFloat, zz / (ig33.zz).toFloat)
    def /(lg33: GMat3L) = new IMat3D((xx).toDouble / (lg33.xx).toDouble, (xy).toDouble / (lg33.xy).toDouble, (xz).toDouble / (lg33.xz).toDouble, (yx).toDouble / (lg33.yx).toDouble, (yy).toDouble / (lg33.yy).toDouble, (yz).toDouble / (lg33.yz).toDouble, (zx).toDouble / (lg33.zx).toDouble, (zy).toDouble / (lg33.zy).toDouble, (zz).toDouble / (lg33.zz).toDouble)
    def /(fg33: GMat3F) = new IMat3F(xx / fg33.xx, xy / fg33.xy, xz / fg33.xz, yx / fg33.yx, yy / fg33.yy, yz / fg33.yz, zx / fg33.zx, zy / fg33.zy, zz / fg33.zz)
    def /(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float) = new IMat3F(xx / xx0, xy / xy0, xz / xz0, yx / yx0, yy / yy0, yz / yz0, zx / zx0, zy / zy0, zz / zz0)
    def /(dg33: GMat3D) = new IMat3D((xx).toDouble / dg33.xx, (xy).toDouble / dg33.xy, (xz).toDouble / dg33.xz, (yx).toDouble / dg33.yx, (yy).toDouble / dg33.yy, (yz).toDouble / dg33.yz, (zx).toDouble / dg33.zx, (zy).toDouble / dg33.zy, (zz).toDouble / dg33.zz)
    def max(x0: Long) = new IMat3D(math.max((xx).toDouble,(x0).toDouble), math.max((xy).toDouble,(x0).toDouble), math.max((xz).toDouble,(x0).toDouble), math.max((yx).toDouble,(x0).toDouble), math.max((yy).toDouble,(x0).toDouble), math.max((yz).toDouble,(x0).toDouble), math.max((zx).toDouble,(x0).toDouble), math.max((zy).toDouble,(x0).toDouble), math.max((zz).toDouble,(x0).toDouble))
    def max(x0: Float) = new IMat3F(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0))
    def max(x0: Double) = new IMat3D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0))
    def max(sg33: GMat3S) = new IMat3F(math.max(xx,(sg33.xx).toFloat), math.max(xy,(sg33.xy).toFloat), math.max(xz,(sg33.xz).toFloat), math.max(yx,(sg33.yx).toFloat), math.max(yy,(sg33.yy).toFloat), math.max(yz,(sg33.yz).toFloat), math.max(zx,(sg33.zx).toFloat), math.max(zy,(sg33.zy).toFloat), math.max(zz,(sg33.zz).toFloat))
    def max(ig33: GMat3I) = new IMat3F(math.max(xx,(ig33.xx).toFloat), math.max(xy,(ig33.xy).toFloat), math.max(xz,(ig33.xz).toFloat), math.max(yx,(ig33.yx).toFloat), math.max(yy,(ig33.yy).toFloat), math.max(yz,(ig33.yz).toFloat), math.max(zx,(ig33.zx).toFloat), math.max(zy,(ig33.zy).toFloat), math.max(zz,(ig33.zz).toFloat))
    def max(lg33: GMat3L) = new IMat3D(math.max((xx).toDouble,(lg33.xx).toDouble), math.max((xy).toDouble,(lg33.xy).toDouble), math.max((xz).toDouble,(lg33.xz).toDouble), math.max((yx).toDouble,(lg33.yx).toDouble), math.max((yy).toDouble,(lg33.yy).toDouble), math.max((yz).toDouble,(lg33.yz).toDouble), math.max((zx).toDouble,(lg33.zx).toDouble), math.max((zy).toDouble,(lg33.zy).toDouble), math.max((zz).toDouble,(lg33.zz).toDouble))
    def max(fg33: GMat3F) = new IMat3F(math.max(xx,fg33.xx), math.max(xy,fg33.xy), math.max(xz,fg33.xz), math.max(yx,fg33.yx), math.max(yy,fg33.yy), math.max(yz,fg33.yz), math.max(zx,fg33.zx), math.max(zy,fg33.zy), math.max(zz,fg33.zz))
    def max(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float) = new IMat3F(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0))
    def max(dg33: GMat3D) = new IMat3D(math.max((xx).toDouble,dg33.xx), math.max((xy).toDouble,dg33.xy), math.max((xz).toDouble,dg33.xz), math.max((yx).toDouble,dg33.yx), math.max((yy).toDouble,dg33.yy), math.max((yz).toDouble,dg33.yz), math.max((zx).toDouble,dg33.zx), math.max((zy).toDouble,dg33.zy), math.max((zz).toDouble,dg33.zz))
    def min(x0: Long) = new IMat3D(math.min((xx).toDouble,(x0).toDouble), math.min((xy).toDouble,(x0).toDouble), math.min((xz).toDouble,(x0).toDouble), math.min((yx).toDouble,(x0).toDouble), math.min((yy).toDouble,(x0).toDouble), math.min((yz).toDouble,(x0).toDouble), math.min((zx).toDouble,(x0).toDouble), math.min((zy).toDouble,(x0).toDouble), math.min((zz).toDouble,(x0).toDouble))
    def min(x0: Float) = new IMat3F(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0))
    def min(x0: Double) = new IMat3D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0))
    def min(sg33: GMat3S) = new IMat3F(math.min(xx,(sg33.xx).toFloat), math.min(xy,(sg33.xy).toFloat), math.min(xz,(sg33.xz).toFloat), math.min(yx,(sg33.yx).toFloat), math.min(yy,(sg33.yy).toFloat), math.min(yz,(sg33.yz).toFloat), math.min(zx,(sg33.zx).toFloat), math.min(zy,(sg33.zy).toFloat), math.min(zz,(sg33.zz).toFloat))
    def min(ig33: GMat3I) = new IMat3F(math.min(xx,(ig33.xx).toFloat), math.min(xy,(ig33.xy).toFloat), math.min(xz,(ig33.xz).toFloat), math.min(yx,(ig33.yx).toFloat), math.min(yy,(ig33.yy).toFloat), math.min(yz,(ig33.yz).toFloat), math.min(zx,(ig33.zx).toFloat), math.min(zy,(ig33.zy).toFloat), math.min(zz,(ig33.zz).toFloat))
    def min(lg33: GMat3L) = new IMat3D(math.min((xx).toDouble,(lg33.xx).toDouble), math.min((xy).toDouble,(lg33.xy).toDouble), math.min((xz).toDouble,(lg33.xz).toDouble), math.min((yx).toDouble,(lg33.yx).toDouble), math.min((yy).toDouble,(lg33.yy).toDouble), math.min((yz).toDouble,(lg33.yz).toDouble), math.min((zx).toDouble,(lg33.zx).toDouble), math.min((zy).toDouble,(lg33.zy).toDouble), math.min((zz).toDouble,(lg33.zz).toDouble))
    def min(fg33: GMat3F) = new IMat3F(math.min(xx,fg33.xx), math.min(xy,fg33.xy), math.min(xz,fg33.xz), math.min(yx,fg33.yx), math.min(yy,fg33.yy), math.min(yz,fg33.yz), math.min(zx,fg33.zx), math.min(zy,fg33.zy), math.min(zz,fg33.zz))
    def min(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float) = new IMat3F(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0))
    def min(dg33: GMat3D) = new IMat3D(math.min((xx).toDouble,dg33.xx), math.min((xy).toDouble,dg33.xy), math.min((xz).toDouble,dg33.xz), math.min((yx).toDouble,dg33.yx), math.min((yy).toDouble,dg33.yy), math.min((yz).toDouble,dg33.yz), math.min((zx).toDouble,dg33.zx), math.min((zy).toDouble,dg33.zy), math.min((zz).toDouble,dg33.zz))
    def operate(sg33: GMat3S)(fun: (Float,Float)=>Float) = new IMat3F(fun(xx,(sg33.xx).toFloat), fun(xy,(sg33.xy).toFloat), fun(xz,(sg33.xz).toFloat), fun(yx,(sg33.yx).toFloat), fun(yy,(sg33.yy).toFloat), fun(yz,(sg33.yz).toFloat), fun(zx,(sg33.zx).toFloat), fun(zy,(sg33.zy).toFloat), fun(zz,(sg33.zz).toFloat))
    def operate(ig33: GMat3I)(fun: (Float,Float)=>Float) = new IMat3F(fun(xx,(ig33.xx).toFloat), fun(xy,(ig33.xy).toFloat), fun(xz,(ig33.xz).toFloat), fun(yx,(ig33.yx).toFloat), fun(yy,(ig33.yy).toFloat), fun(yz,(ig33.yz).toFloat), fun(zx,(ig33.zx).toFloat), fun(zy,(ig33.zy).toFloat), fun(zz,(ig33.zz).toFloat))
    def operate(lg33: GMat3L)(fun: (Double,Double)=>Double) = new IMat3D(fun((xx).toDouble,(lg33.xx).toDouble), fun((xy).toDouble,(lg33.xy).toDouble), fun((xz).toDouble,(lg33.xz).toDouble), fun((yx).toDouble,(lg33.yx).toDouble), fun((yy).toDouble,(lg33.yy).toDouble), fun((yz).toDouble,(lg33.yz).toDouble), fun((zx).toDouble,(lg33.zx).toDouble), fun((zy).toDouble,(lg33.zy).toDouble), fun((zz).toDouble,(lg33.zz).toDouble))
    def operate(fg33: GMat3F)(fun: (Float,Float)=>Float) = new IMat3F(fun(xx,fg33.xx), fun(xy,fg33.xy), fun(xz,fg33.xz), fun(yx,fg33.yx), fun(yy,fg33.yy), fun(yz,fg33.yz), fun(zx,fg33.zx), fun(zy,fg33.zy), fun(zz,fg33.zz))
    def operate(dg33: GMat3D)(fun: (Double,Double)=>Double) = new IMat3D(fun((xx).toDouble,dg33.xx), fun((xy).toDouble,dg33.xy), fun((xz).toDouble,dg33.xz), fun((yx).toDouble,dg33.yx), fun((yy).toDouble,dg33.yy), fun((yz).toDouble,dg33.yz), fun((zx).toDouble,dg33.zx), fun((zy).toDouble,dg33.zy), fun((zz).toDouble,dg33.zz))
    def fold(zero: Int)(fun: (Int,Float)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Long)(fun: (Long,Float)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Float)(fun: (Float,Float)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Double)(fun: (Double,Float)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def reduce(fun: (Float,Float)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),yx),yy),yz),zx),zy),zz)
    def ===(fg33: GMat3F) = xx==fg33.xx && xy==fg33.xy && xz==fg33.xz && yx==fg33.yx && yy==fg33.yy && yz==fg33.yz && zx==fg33.zx && zy==fg33.zy && zz==fg33.zz
    def ===(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float) = xx==xx0 && xy==xy0 && xz==xz0 && yx==yx0 && yy==yy0 && yz==yz0 && zx==zx0 && zy==zy0 && zz==zz0
    def approx(fg33: GMat3F, eps: Float) = ScalarF.close(xx,fg33.xx,eps) && ScalarF.close(xy,fg33.xy,eps) && ScalarF.close(xz,fg33.xz,eps) && ScalarF.close(yx,fg33.yx,eps) && ScalarF.close(yy,fg33.yy,eps) && ScalarF.close(yz,fg33.yz,eps) && ScalarF.close(zx,fg33.zx,eps) && ScalarF.close(zy,fg33.zy,eps) && ScalarF.close(zz,fg33.zz,eps)
    def approx(dg33: GMat3D, eps: Double) = ScalarD.close(xx,dg33.xx,eps) && ScalarD.close(xy,dg33.xy,eps) && ScalarD.close(xz,dg33.xz,eps) && ScalarD.close(yx,dg33.yx,eps) && ScalarD.close(yy,dg33.yy,eps) && ScalarD.close(yz,dg33.yz,eps) && ScalarD.close(zx,dg33.zx,eps) && ScalarD.close(zy,dg33.zy,eps) && ScalarD.close(zz,dg33.zz,eps)
    final def =~=(fg33: GMat3F) = approx(fg33, 1e-10f)
    final def =~=(dg33: GMat3D) = approx(dg33, 1e-10)
    def approx(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float, eps: Float) = ScalarF.close(xx,xx0,eps) && ScalarF.close(xy,xy0,eps) && ScalarF.close(xz,xz0,eps) && ScalarF.close(yx,yx0,eps) && ScalarF.close(yy,yy0,eps) && ScalarF.close(yz,yz0,eps) && ScalarF.close(zx,zx0,eps) && ScalarF.close(zy,zy0,eps) && ScalarF.close(zz,zz0,eps)
    def det = xx*(yy*zz - yz*zy) + xy*(yz*zx - yx*zz) + xz*(yx*zy - yy*zx)
    def trace = new IVec3F(xx, yy, zz)
    def xRow = new IVec3F(xx, xy, xz)
    def xCol = new IVec3F(xx, yx, zx)
    def yRow = new IVec3F(yx, yy, yz)
    def yCol = new IVec3F(xy, yy, zy)
    def zRow = new IVec3F(zx, zy, zz)
    def zCol = new IVec3F(xz, yz, zz)
    def t = new IMat3F(xx, yx, zx, xy, yy, zy, xz, yz, zz)
    def inv = { val idet = 1/det; new IMat3F(idet*(yy*zz - yz*zy), idet*(zy*xz - zz*xy), idet*(xy*yz - xz*yy), idet*(yz*zx - yx*zz), idet*(zz*xx - zx*xz), idet*(xz*yx - xx*yz), idet*(yx*zy - yy*zx), idet*(zx*xy - zy*xx), idet*(xx*yy - xy*yx)) }
    def **(sg3: GVec3S) = new IVec3F(xx*(sg3.x).toFloat+xy*(sg3.y).toFloat+xz*(sg3.z).toFloat, yx*(sg3.x).toFloat+yy*(sg3.y).toFloat+yz*(sg3.z).toFloat, zx*(sg3.x).toFloat+zy*(sg3.y).toFloat+zz*(sg3.z).toFloat)
    def **(ig3: GVec3I) = new IVec3F(xx*(ig3.x).toFloat+xy*(ig3.y).toFloat+xz*(ig3.z).toFloat, yx*(ig3.x).toFloat+yy*(ig3.y).toFloat+yz*(ig3.z).toFloat, zx*(ig3.x).toFloat+zy*(ig3.y).toFloat+zz*(ig3.z).toFloat)
    def **(lg3: GVec3L) = new IVec3D((xx).toDouble*(lg3.x).toDouble+(xy).toDouble*(lg3.y).toDouble+(xz).toDouble*(lg3.z).toDouble, (yx).toDouble*(lg3.x).toDouble+(yy).toDouble*(lg3.y).toDouble+(yz).toDouble*(lg3.z).toDouble, (zx).toDouble*(lg3.x).toDouble+(zy).toDouble*(lg3.y).toDouble+(zz).toDouble*(lg3.z).toDouble)
    def **(fg3: GVec3F) = new IVec3F(xx*fg3.x+xy*fg3.y+xz*fg3.z, yx*fg3.x+yy*fg3.y+yz*fg3.z, zx*fg3.x+zy*fg3.y+zz*fg3.z)
    def **(dg3: GVec3D) = new IVec3D((xx).toDouble*dg3.x+(xy).toDouble*dg3.y+(xz).toDouble*dg3.z, (yx).toDouble*dg3.x+(yy).toDouble*dg3.y+(yz).toDouble*dg3.z, (zx).toDouble*dg3.x+(zy).toDouble*dg3.y+(zz).toDouble*dg3.z)
    def **(sg33: GMat3S) = new IMat3F(xx*(sg33.xx).toFloat+xy*(sg33.yx).toFloat+xz*(sg33.zx).toFloat, xx*(sg33.xy).toFloat+xy*(sg33.yy).toFloat+xz*(sg33.zy).toFloat, xx*(sg33.xz).toFloat+xy*(sg33.yz).toFloat+xz*(sg33.zz).toFloat, yx*(sg33.xx).toFloat+yy*(sg33.yx).toFloat+yz*(sg33.zx).toFloat, yx*(sg33.xy).toFloat+yy*(sg33.yy).toFloat+yz*(sg33.zy).toFloat, yx*(sg33.xz).toFloat+yy*(sg33.yz).toFloat+yz*(sg33.zz).toFloat, zx*(sg33.xx).toFloat+zy*(sg33.yx).toFloat+zz*(sg33.zx).toFloat, zx*(sg33.xy).toFloat+zy*(sg33.yy).toFloat+zz*(sg33.zy).toFloat, zx*(sg33.xz).toFloat+zy*(sg33.yz).toFloat+zz*(sg33.zz).toFloat)
    def **(ig33: GMat3I) = new IMat3F(xx*(ig33.xx).toFloat+xy*(ig33.yx).toFloat+xz*(ig33.zx).toFloat, xx*(ig33.xy).toFloat+xy*(ig33.yy).toFloat+xz*(ig33.zy).toFloat, xx*(ig33.xz).toFloat+xy*(ig33.yz).toFloat+xz*(ig33.zz).toFloat, yx*(ig33.xx).toFloat+yy*(ig33.yx).toFloat+yz*(ig33.zx).toFloat, yx*(ig33.xy).toFloat+yy*(ig33.yy).toFloat+yz*(ig33.zy).toFloat, yx*(ig33.xz).toFloat+yy*(ig33.yz).toFloat+yz*(ig33.zz).toFloat, zx*(ig33.xx).toFloat+zy*(ig33.yx).toFloat+zz*(ig33.zx).toFloat, zx*(ig33.xy).toFloat+zy*(ig33.yy).toFloat+zz*(ig33.zy).toFloat, zx*(ig33.xz).toFloat+zy*(ig33.yz).toFloat+zz*(ig33.zz).toFloat)
    def **(lg33: GMat3L) = new IMat3D((xx).toDouble*(lg33.xx).toDouble+(xy).toDouble*(lg33.yx).toDouble+(xz).toDouble*(lg33.zx).toDouble, (xx).toDouble*(lg33.xy).toDouble+(xy).toDouble*(lg33.yy).toDouble+(xz).toDouble*(lg33.zy).toDouble, (xx).toDouble*(lg33.xz).toDouble+(xy).toDouble*(lg33.yz).toDouble+(xz).toDouble*(lg33.zz).toDouble, (yx).toDouble*(lg33.xx).toDouble+(yy).toDouble*(lg33.yx).toDouble+(yz).toDouble*(lg33.zx).toDouble, (yx).toDouble*(lg33.xy).toDouble+(yy).toDouble*(lg33.yy).toDouble+(yz).toDouble*(lg33.zy).toDouble, (yx).toDouble*(lg33.xz).toDouble+(yy).toDouble*(lg33.yz).toDouble+(yz).toDouble*(lg33.zz).toDouble, (zx).toDouble*(lg33.xx).toDouble+(zy).toDouble*(lg33.yx).toDouble+(zz).toDouble*(lg33.zx).toDouble, (zx).toDouble*(lg33.xy).toDouble+(zy).toDouble*(lg33.yy).toDouble+(zz).toDouble*(lg33.zy).toDouble, (zx).toDouble*(lg33.xz).toDouble+(zy).toDouble*(lg33.yz).toDouble+(zz).toDouble*(lg33.zz).toDouble)
    def **(fg33: GMat3F) = new IMat3F(xx*fg33.xx+xy*fg33.yx+xz*fg33.zx, xx*fg33.xy+xy*fg33.yy+xz*fg33.zy, xx*fg33.xz+xy*fg33.yz+xz*fg33.zz, yx*fg33.xx+yy*fg33.yx+yz*fg33.zx, yx*fg33.xy+yy*fg33.yy+yz*fg33.zy, yx*fg33.xz+yy*fg33.yz+yz*fg33.zz, zx*fg33.xx+zy*fg33.yx+zz*fg33.zx, zx*fg33.xy+zy*fg33.yy+zz*fg33.zy, zx*fg33.xz+zy*fg33.yz+zz*fg33.zz)
    def **(dg33: GMat3D) = new IMat3D((xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx, (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy, (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz, (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx, (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy, (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz, (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx, (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy, (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz)
  } // class GMat3F

  object GMat3F {
    def apply(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): GMat3F = new IMat3F(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): GMat3F = IMat3F.parse(str)
    def xRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat3F(1, 0, 0, 0, (c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat) }
    def yRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat3F((c).toFloat, 0, (s).toFloat, 0, 1, 0, (-s).toFloat, 0, (c).toFloat) }
    def zRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat3F((c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat, 0, 0, 0, 1) }
    def rotation(axis: GVec3F, theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; val fact = 1/axis.len; new IMat3F((c + axis.x*axis.x*fact*fact*(1-c)).toFloat, (axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s).toFloat, (axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s).toFloat, (c + axis.y*axis.y*fact*fact*(1-c)).toFloat, (axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s).toFloat, (axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s).toFloat, (c + axis.z*axis.z*fact*fact*(1-c)).toFloat) }
    val identity: GMat3F = IMat3F.identity
    val zero: GMat3F = IMat3F.zero
    def traced(fg3: GVec3F) = new IMat3F(fg3.x, 0, 0, 0, fg3.y, 0, 0, 0, fg3.z)
  } // object GMat3F


  abstract class GMat3D extends Cloneable {
    def xx: Double
    def xy: Double
    def xz: Double
    def yx: Double
    def yy: Double
    def yz: Double
    def zx: Double
    def zy: Double
    def zz: Double
    override def toString = "["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]"
    override def hashCode = ((((((((zz.##)*16777619 ^ zy.##)*16777619 ^ zx.##)*16777619 ^ yz.##)*16777619 ^ yy.##)*16777619 ^ yx.##)*16777619 ^ xz.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg33: GMat3S => {xx==sg33.xx && xy==sg33.xy && xz==sg33.xz && yx==sg33.yx && yy==sg33.yy && yz==sg33.yz && zx==sg33.zx && zy==sg33.zy && zz==sg33.zz }; case ig33: GMat3I => {xx==ig33.xx && xy==ig33.xy && xz==ig33.xz && yx==ig33.yx && yy==ig33.yy && yz==ig33.yz && zx==ig33.zx && zy==ig33.zy && zz==ig33.zz }; case lg33: GMat3L => {xx==lg33.xx && xy==lg33.xy && xz==lg33.xz && yx==lg33.yx && yy==lg33.yy && yz==lg33.yz && zx==lg33.zx && zy==lg33.zy && zz==lg33.zz }; case fg33: GMat3F => {xx==fg33.xx && xy==fg33.xy && xz==fg33.xz && yx==fg33.yx && yy==fg33.yy && yz==fg33.yz && zx==fg33.zx && zy==fg33.zy && zz==fg33.zz }; case dg33: GMat3D => {xx==dg33.xx && xy==dg33.xy && xz==dg33.xz && yx==dg33.yx && yy==dg33.yy && yz==dg33.yz && zx==dg33.zx && zy==dg33.zy && zz==dg33.zz }; case _ => false }
    override def clone(): GMat3D = new IMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def toS: GMat3S = new IMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    def toI: GMat3I = new IMat3I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt)
    def mapI(fun: Double => Int) = new IMat3I((math.round(fun(xx))).toInt, (math.round(fun(xy))).toInt, (math.round(fun(xz))).toInt, (math.round(fun(yx))).toInt, (math.round(fun(yy))).toInt, (math.round(fun(yz))).toInt, (math.round(fun(zx))).toInt, (math.round(fun(zy))).toInt, (math.round(fun(zz))).toInt)
    def toL: GMat3L = new IMat3L(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    def mapL(fun: Double => Long) = new IMat3L(math.round(fun(xx)), math.round(fun(xy)), math.round(fun(xz)), math.round(fun(yx)), math.round(fun(yy)), math.round(fun(yz)), math.round(fun(zx)), math.round(fun(zy)), math.round(fun(zz)))
    def toF: GMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    def mapF(fun: Double => Float) = new IMat3F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(xz)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat, (fun(yz)).toFloat, (fun(zx)).toFloat, (fun(zy)).toFloat, (fun(zz)).toFloat)
    def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz): GMat3D = new IMat3D(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def trim: GMat2D = new IMat2D(xx, xy, yx, yy)
    def pad(padding: Double = 1): GMat4D = new IMat4D(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapD(fun: Double => Double) = new IMat3D(fun(xx), fun(xy), fun(xz), fun(yx), fun(yy), fun(yz), fun(zx), fun(zy), fun(zz))
    def imm = new IMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mut = new MMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def unary_-() = new IMat3D(-xx, -xy, -xz, -yx, -yy, -yz, -zx, -zy, -zz)
    def +(x0: Double) = new IMat3D(xx + x0, xy + x0, xz + x0, yx + x0, yy + x0, yz + x0, zx + x0, zy + x0, zz + x0)
    def +(sg33: GMat3S) = new IMat3D(xx + (sg33.xx).toDouble, xy + (sg33.xy).toDouble, xz + (sg33.xz).toDouble, yx + (sg33.yx).toDouble, yy + (sg33.yy).toDouble, yz + (sg33.yz).toDouble, zx + (sg33.zx).toDouble, zy + (sg33.zy).toDouble, zz + (sg33.zz).toDouble)
    def +(ig33: GMat3I) = new IMat3D(xx + (ig33.xx).toDouble, xy + (ig33.xy).toDouble, xz + (ig33.xz).toDouble, yx + (ig33.yx).toDouble, yy + (ig33.yy).toDouble, yz + (ig33.yz).toDouble, zx + (ig33.zx).toDouble, zy + (ig33.zy).toDouble, zz + (ig33.zz).toDouble)
    def +(lg33: GMat3L) = new IMat3D(xx + (lg33.xx).toDouble, xy + (lg33.xy).toDouble, xz + (lg33.xz).toDouble, yx + (lg33.yx).toDouble, yy + (lg33.yy).toDouble, yz + (lg33.yz).toDouble, zx + (lg33.zx).toDouble, zy + (lg33.zy).toDouble, zz + (lg33.zz).toDouble)
    def +(fg33: GMat3F) = new IMat3D(xx + (fg33.xx).toDouble, xy + (fg33.xy).toDouble, xz + (fg33.xz).toDouble, yx + (fg33.yx).toDouble, yy + (fg33.yy).toDouble, yz + (fg33.yz).toDouble, zx + (fg33.zx).toDouble, zy + (fg33.zy).toDouble, zz + (fg33.zz).toDouble)
    def +(dg33: GMat3D) = new IMat3D(xx + dg33.xx, xy + dg33.xy, xz + dg33.xz, yx + dg33.yx, yy + dg33.yy, yz + dg33.yz, zx + dg33.zx, zy + dg33.zy, zz + dg33.zz)
    def +(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double) = new IMat3D(xx + xx0, xy + xy0, xz + xz0, yx + yx0, yy + yy0, yz + yz0, zx + zx0, zy + zy0, zz + zz0)
    def -(x0: Double) = new IMat3D(xx - x0, xy - x0, xz - x0, yx - x0, yy - x0, yz - x0, zx - x0, zy - x0, zz - x0)
    def -(sg33: GMat3S) = new IMat3D(xx - (sg33.xx).toDouble, xy - (sg33.xy).toDouble, xz - (sg33.xz).toDouble, yx - (sg33.yx).toDouble, yy - (sg33.yy).toDouble, yz - (sg33.yz).toDouble, zx - (sg33.zx).toDouble, zy - (sg33.zy).toDouble, zz - (sg33.zz).toDouble)
    def -(ig33: GMat3I) = new IMat3D(xx - (ig33.xx).toDouble, xy - (ig33.xy).toDouble, xz - (ig33.xz).toDouble, yx - (ig33.yx).toDouble, yy - (ig33.yy).toDouble, yz - (ig33.yz).toDouble, zx - (ig33.zx).toDouble, zy - (ig33.zy).toDouble, zz - (ig33.zz).toDouble)
    def -(lg33: GMat3L) = new IMat3D(xx - (lg33.xx).toDouble, xy - (lg33.xy).toDouble, xz - (lg33.xz).toDouble, yx - (lg33.yx).toDouble, yy - (lg33.yy).toDouble, yz - (lg33.yz).toDouble, zx - (lg33.zx).toDouble, zy - (lg33.zy).toDouble, zz - (lg33.zz).toDouble)
    def -(fg33: GMat3F) = new IMat3D(xx - (fg33.xx).toDouble, xy - (fg33.xy).toDouble, xz - (fg33.xz).toDouble, yx - (fg33.yx).toDouble, yy - (fg33.yy).toDouble, yz - (fg33.yz).toDouble, zx - (fg33.zx).toDouble, zy - (fg33.zy).toDouble, zz - (fg33.zz).toDouble)
    def -(dg33: GMat3D) = new IMat3D(xx - dg33.xx, xy - dg33.xy, xz - dg33.xz, yx - dg33.yx, yy - dg33.yy, yz - dg33.yz, zx - dg33.zx, zy - dg33.zy, zz - dg33.zz)
    def -(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double) = new IMat3D(xx - xx0, xy - xy0, xz - xz0, yx - yx0, yy - yy0, yz - yz0, zx - zx0, zy - zy0, zz - zz0)
    def *(x0: Double) = new IMat3D(xx * x0, xy * x0, xz * x0, yx * x0, yy * x0, yz * x0, zx * x0, zy * x0, zz * x0)
    def *(sg33: GMat3S) = new IMat3D(xx * (sg33.xx).toDouble, xy * (sg33.xy).toDouble, xz * (sg33.xz).toDouble, yx * (sg33.yx).toDouble, yy * (sg33.yy).toDouble, yz * (sg33.yz).toDouble, zx * (sg33.zx).toDouble, zy * (sg33.zy).toDouble, zz * (sg33.zz).toDouble)
    def *(ig33: GMat3I) = new IMat3D(xx * (ig33.xx).toDouble, xy * (ig33.xy).toDouble, xz * (ig33.xz).toDouble, yx * (ig33.yx).toDouble, yy * (ig33.yy).toDouble, yz * (ig33.yz).toDouble, zx * (ig33.zx).toDouble, zy * (ig33.zy).toDouble, zz * (ig33.zz).toDouble)
    def *(lg33: GMat3L) = new IMat3D(xx * (lg33.xx).toDouble, xy * (lg33.xy).toDouble, xz * (lg33.xz).toDouble, yx * (lg33.yx).toDouble, yy * (lg33.yy).toDouble, yz * (lg33.yz).toDouble, zx * (lg33.zx).toDouble, zy * (lg33.zy).toDouble, zz * (lg33.zz).toDouble)
    def *(fg33: GMat3F) = new IMat3D(xx * (fg33.xx).toDouble, xy * (fg33.xy).toDouble, xz * (fg33.xz).toDouble, yx * (fg33.yx).toDouble, yy * (fg33.yy).toDouble, yz * (fg33.yz).toDouble, zx * (fg33.zx).toDouble, zy * (fg33.zy).toDouble, zz * (fg33.zz).toDouble)
    def *(dg33: GMat3D) = new IMat3D(xx * dg33.xx, xy * dg33.xy, xz * dg33.xz, yx * dg33.yx, yy * dg33.yy, yz * dg33.yz, zx * dg33.zx, zy * dg33.zy, zz * dg33.zz)
    def *(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double) = new IMat3D(xx * xx0, xy * xy0, xz * xz0, yx * yx0, yy * yy0, yz * yz0, zx * zx0, zy * zy0, zz * zz0)
    def /(x0: Double) = new IMat3D(xx / x0, xy / x0, xz / x0, yx / x0, yy / x0, yz / x0, zx / x0, zy / x0, zz / x0)
    def /(sg33: GMat3S) = new IMat3D(xx / (sg33.xx).toDouble, xy / (sg33.xy).toDouble, xz / (sg33.xz).toDouble, yx / (sg33.yx).toDouble, yy / (sg33.yy).toDouble, yz / (sg33.yz).toDouble, zx / (sg33.zx).toDouble, zy / (sg33.zy).toDouble, zz / (sg33.zz).toDouble)
    def /(ig33: GMat3I) = new IMat3D(xx / (ig33.xx).toDouble, xy / (ig33.xy).toDouble, xz / (ig33.xz).toDouble, yx / (ig33.yx).toDouble, yy / (ig33.yy).toDouble, yz / (ig33.yz).toDouble, zx / (ig33.zx).toDouble, zy / (ig33.zy).toDouble, zz / (ig33.zz).toDouble)
    def /(lg33: GMat3L) = new IMat3D(xx / (lg33.xx).toDouble, xy / (lg33.xy).toDouble, xz / (lg33.xz).toDouble, yx / (lg33.yx).toDouble, yy / (lg33.yy).toDouble, yz / (lg33.yz).toDouble, zx / (lg33.zx).toDouble, zy / (lg33.zy).toDouble, zz / (lg33.zz).toDouble)
    def /(fg33: GMat3F) = new IMat3D(xx / (fg33.xx).toDouble, xy / (fg33.xy).toDouble, xz / (fg33.xz).toDouble, yx / (fg33.yx).toDouble, yy / (fg33.yy).toDouble, yz / (fg33.yz).toDouble, zx / (fg33.zx).toDouble, zy / (fg33.zy).toDouble, zz / (fg33.zz).toDouble)
    def /(dg33: GMat3D) = new IMat3D(xx / dg33.xx, xy / dg33.xy, xz / dg33.xz, yx / dg33.yx, yy / dg33.yy, yz / dg33.yz, zx / dg33.zx, zy / dg33.zy, zz / dg33.zz)
    def /(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double) = new IMat3D(xx / xx0, xy / xy0, xz / xz0, yx / yx0, yy / yy0, yz / yz0, zx / zx0, zy / zy0, zz / zz0)
    def max(x0: Double) = new IMat3D(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0))
    def max(sg33: GMat3S) = new IMat3D(math.max(xx,(sg33.xx).toDouble), math.max(xy,(sg33.xy).toDouble), math.max(xz,(sg33.xz).toDouble), math.max(yx,(sg33.yx).toDouble), math.max(yy,(sg33.yy).toDouble), math.max(yz,(sg33.yz).toDouble), math.max(zx,(sg33.zx).toDouble), math.max(zy,(sg33.zy).toDouble), math.max(zz,(sg33.zz).toDouble))
    def max(ig33: GMat3I) = new IMat3D(math.max(xx,(ig33.xx).toDouble), math.max(xy,(ig33.xy).toDouble), math.max(xz,(ig33.xz).toDouble), math.max(yx,(ig33.yx).toDouble), math.max(yy,(ig33.yy).toDouble), math.max(yz,(ig33.yz).toDouble), math.max(zx,(ig33.zx).toDouble), math.max(zy,(ig33.zy).toDouble), math.max(zz,(ig33.zz).toDouble))
    def max(lg33: GMat3L) = new IMat3D(math.max(xx,(lg33.xx).toDouble), math.max(xy,(lg33.xy).toDouble), math.max(xz,(lg33.xz).toDouble), math.max(yx,(lg33.yx).toDouble), math.max(yy,(lg33.yy).toDouble), math.max(yz,(lg33.yz).toDouble), math.max(zx,(lg33.zx).toDouble), math.max(zy,(lg33.zy).toDouble), math.max(zz,(lg33.zz).toDouble))
    def max(fg33: GMat3F) = new IMat3D(math.max(xx,(fg33.xx).toDouble), math.max(xy,(fg33.xy).toDouble), math.max(xz,(fg33.xz).toDouble), math.max(yx,(fg33.yx).toDouble), math.max(yy,(fg33.yy).toDouble), math.max(yz,(fg33.yz).toDouble), math.max(zx,(fg33.zx).toDouble), math.max(zy,(fg33.zy).toDouble), math.max(zz,(fg33.zz).toDouble))
    def max(dg33: GMat3D) = new IMat3D(math.max(xx,dg33.xx), math.max(xy,dg33.xy), math.max(xz,dg33.xz), math.max(yx,dg33.yx), math.max(yy,dg33.yy), math.max(yz,dg33.yz), math.max(zx,dg33.zx), math.max(zy,dg33.zy), math.max(zz,dg33.zz))
    def max(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double) = new IMat3D(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0))
    def min(x0: Double) = new IMat3D(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0))
    def min(sg33: GMat3S) = new IMat3D(math.min(xx,(sg33.xx).toDouble), math.min(xy,(sg33.xy).toDouble), math.min(xz,(sg33.xz).toDouble), math.min(yx,(sg33.yx).toDouble), math.min(yy,(sg33.yy).toDouble), math.min(yz,(sg33.yz).toDouble), math.min(zx,(sg33.zx).toDouble), math.min(zy,(sg33.zy).toDouble), math.min(zz,(sg33.zz).toDouble))
    def min(ig33: GMat3I) = new IMat3D(math.min(xx,(ig33.xx).toDouble), math.min(xy,(ig33.xy).toDouble), math.min(xz,(ig33.xz).toDouble), math.min(yx,(ig33.yx).toDouble), math.min(yy,(ig33.yy).toDouble), math.min(yz,(ig33.yz).toDouble), math.min(zx,(ig33.zx).toDouble), math.min(zy,(ig33.zy).toDouble), math.min(zz,(ig33.zz).toDouble))
    def min(lg33: GMat3L) = new IMat3D(math.min(xx,(lg33.xx).toDouble), math.min(xy,(lg33.xy).toDouble), math.min(xz,(lg33.xz).toDouble), math.min(yx,(lg33.yx).toDouble), math.min(yy,(lg33.yy).toDouble), math.min(yz,(lg33.yz).toDouble), math.min(zx,(lg33.zx).toDouble), math.min(zy,(lg33.zy).toDouble), math.min(zz,(lg33.zz).toDouble))
    def min(fg33: GMat3F) = new IMat3D(math.min(xx,(fg33.xx).toDouble), math.min(xy,(fg33.xy).toDouble), math.min(xz,(fg33.xz).toDouble), math.min(yx,(fg33.yx).toDouble), math.min(yy,(fg33.yy).toDouble), math.min(yz,(fg33.yz).toDouble), math.min(zx,(fg33.zx).toDouble), math.min(zy,(fg33.zy).toDouble), math.min(zz,(fg33.zz).toDouble))
    def min(dg33: GMat3D) = new IMat3D(math.min(xx,dg33.xx), math.min(xy,dg33.xy), math.min(xz,dg33.xz), math.min(yx,dg33.yx), math.min(yy,dg33.yy), math.min(yz,dg33.yz), math.min(zx,dg33.zx), math.min(zy,dg33.zy), math.min(zz,dg33.zz))
    def min(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double) = new IMat3D(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0))
    def operate(sg33: GMat3S)(fun: (Double,Double)=>Double) = new IMat3D(fun(xx,(sg33.xx).toDouble), fun(xy,(sg33.xy).toDouble), fun(xz,(sg33.xz).toDouble), fun(yx,(sg33.yx).toDouble), fun(yy,(sg33.yy).toDouble), fun(yz,(sg33.yz).toDouble), fun(zx,(sg33.zx).toDouble), fun(zy,(sg33.zy).toDouble), fun(zz,(sg33.zz).toDouble))
    def operate(ig33: GMat3I)(fun: (Double,Double)=>Double) = new IMat3D(fun(xx,(ig33.xx).toDouble), fun(xy,(ig33.xy).toDouble), fun(xz,(ig33.xz).toDouble), fun(yx,(ig33.yx).toDouble), fun(yy,(ig33.yy).toDouble), fun(yz,(ig33.yz).toDouble), fun(zx,(ig33.zx).toDouble), fun(zy,(ig33.zy).toDouble), fun(zz,(ig33.zz).toDouble))
    def operate(lg33: GMat3L)(fun: (Double,Double)=>Double) = new IMat3D(fun(xx,(lg33.xx).toDouble), fun(xy,(lg33.xy).toDouble), fun(xz,(lg33.xz).toDouble), fun(yx,(lg33.yx).toDouble), fun(yy,(lg33.yy).toDouble), fun(yz,(lg33.yz).toDouble), fun(zx,(lg33.zx).toDouble), fun(zy,(lg33.zy).toDouble), fun(zz,(lg33.zz).toDouble))
    def operate(fg33: GMat3F)(fun: (Double,Double)=>Double) = new IMat3D(fun(xx,(fg33.xx).toDouble), fun(xy,(fg33.xy).toDouble), fun(xz,(fg33.xz).toDouble), fun(yx,(fg33.yx).toDouble), fun(yy,(fg33.yy).toDouble), fun(yz,(fg33.yz).toDouble), fun(zx,(fg33.zx).toDouble), fun(zy,(fg33.zy).toDouble), fun(zz,(fg33.zz).toDouble))
    def operate(dg33: GMat3D)(fun: (Double,Double)=>Double) = new IMat3D(fun(xx,dg33.xx), fun(xy,dg33.xy), fun(xz,dg33.xz), fun(yx,dg33.yx), fun(yy,dg33.yy), fun(yz,dg33.yz), fun(zx,dg33.zx), fun(zy,dg33.zy), fun(zz,dg33.zz))
    def fold(zero: Int)(fun: (Int,Double)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Long)(fun: (Long,Double)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Float)(fun: (Float,Double)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def fold(zero: Double)(fun: (Double,Double)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),yx),yy),yz),zx),zy),zz)
    def reduce(fun: (Double,Double)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),yx),yy),yz),zx),zy),zz)
    def ===(dg33: GMat3D) = xx==dg33.xx && xy==dg33.xy && xz==dg33.xz && yx==dg33.yx && yy==dg33.yy && yz==dg33.yz && zx==dg33.zx && zy==dg33.zy && zz==dg33.zz
    def ===(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double) = xx==xx0 && xy==xy0 && xz==xz0 && yx==yx0 && yy==yy0 && yz==yz0 && zx==zx0 && zy==zy0 && zz==zz0
    def approx(fg33: GMat3F, eps: Double) = ScalarD.close(xx,(fg33.xx).toDouble,eps) && ScalarD.close(xy,(fg33.xy).toDouble,eps) && ScalarD.close(xz,(fg33.xz).toDouble,eps) && ScalarD.close(yx,(fg33.yx).toDouble,eps) && ScalarD.close(yy,(fg33.yy).toDouble,eps) && ScalarD.close(yz,(fg33.yz).toDouble,eps) && ScalarD.close(zx,(fg33.zx).toDouble,eps) && ScalarD.close(zy,(fg33.zy).toDouble,eps) && ScalarD.close(zz,(fg33.zz).toDouble,eps)
    def approx(dg33: GMat3D, eps: Double) = ScalarD.close(xx,dg33.xx,eps) && ScalarD.close(xy,dg33.xy,eps) && ScalarD.close(xz,dg33.xz,eps) && ScalarD.close(yx,dg33.yx,eps) && ScalarD.close(yy,dg33.yy,eps) && ScalarD.close(yz,dg33.yz,eps) && ScalarD.close(zx,dg33.zx,eps) && ScalarD.close(zy,dg33.zy,eps) && ScalarD.close(zz,dg33.zz,eps)
    final def =~=(fg33: GMat3F) = approx(fg33, 1e-10)
    final def =~=(dg33: GMat3D) = approx(dg33, 1e-20)
    def approx(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double, eps: Double) = ScalarD.close(xx,xx0,eps) && ScalarD.close(xy,xy0,eps) && ScalarD.close(xz,xz0,eps) && ScalarD.close(yx,yx0,eps) && ScalarD.close(yy,yy0,eps) && ScalarD.close(yz,yz0,eps) && ScalarD.close(zx,zx0,eps) && ScalarD.close(zy,zy0,eps) && ScalarD.close(zz,zz0,eps)
    def det = xx*(yy*zz - yz*zy) + xy*(yz*zx - yx*zz) + xz*(yx*zy - yy*zx)
    def trace = new IVec3D(xx, yy, zz)
    def xRow = new IVec3D(xx, xy, xz)
    def xCol = new IVec3D(xx, yx, zx)
    def yRow = new IVec3D(yx, yy, yz)
    def yCol = new IVec3D(xy, yy, zy)
    def zRow = new IVec3D(zx, zy, zz)
    def zCol = new IVec3D(xz, yz, zz)
    def t = new IMat3D(xx, yx, zx, xy, yy, zy, xz, yz, zz)
    def inv = { val idet = 1/det; new IMat3D(idet*(yy*zz - yz*zy), idet*(zy*xz - zz*xy), idet*(xy*yz - xz*yy), idet*(yz*zx - yx*zz), idet*(zz*xx - zx*xz), idet*(xz*yx - xx*yz), idet*(yx*zy - yy*zx), idet*(zx*xy - zy*xx), idet*(xx*yy - xy*yx)) }
    def **(sg3: GVec3S) = new IVec3D(xx*(sg3.x).toDouble+xy*(sg3.y).toDouble+xz*(sg3.z).toDouble, yx*(sg3.x).toDouble+yy*(sg3.y).toDouble+yz*(sg3.z).toDouble, zx*(sg3.x).toDouble+zy*(sg3.y).toDouble+zz*(sg3.z).toDouble)
    def **(ig3: GVec3I) = new IVec3D(xx*(ig3.x).toDouble+xy*(ig3.y).toDouble+xz*(ig3.z).toDouble, yx*(ig3.x).toDouble+yy*(ig3.y).toDouble+yz*(ig3.z).toDouble, zx*(ig3.x).toDouble+zy*(ig3.y).toDouble+zz*(ig3.z).toDouble)
    def **(lg3: GVec3L) = new IVec3D(xx*(lg3.x).toDouble+xy*(lg3.y).toDouble+xz*(lg3.z).toDouble, yx*(lg3.x).toDouble+yy*(lg3.y).toDouble+yz*(lg3.z).toDouble, zx*(lg3.x).toDouble+zy*(lg3.y).toDouble+zz*(lg3.z).toDouble)
    def **(fg3: GVec3F) = new IVec3D(xx*(fg3.x).toDouble+xy*(fg3.y).toDouble+xz*(fg3.z).toDouble, yx*(fg3.x).toDouble+yy*(fg3.y).toDouble+yz*(fg3.z).toDouble, zx*(fg3.x).toDouble+zy*(fg3.y).toDouble+zz*(fg3.z).toDouble)
    def **(dg3: GVec3D) = new IVec3D(xx*dg3.x+xy*dg3.y+xz*dg3.z, yx*dg3.x+yy*dg3.y+yz*dg3.z, zx*dg3.x+zy*dg3.y+zz*dg3.z)
    def **(sg33: GMat3S) = new IMat3D(xx*(sg33.xx).toDouble+xy*(sg33.yx).toDouble+xz*(sg33.zx).toDouble, xx*(sg33.xy).toDouble+xy*(sg33.yy).toDouble+xz*(sg33.zy).toDouble, xx*(sg33.xz).toDouble+xy*(sg33.yz).toDouble+xz*(sg33.zz).toDouble, yx*(sg33.xx).toDouble+yy*(sg33.yx).toDouble+yz*(sg33.zx).toDouble, yx*(sg33.xy).toDouble+yy*(sg33.yy).toDouble+yz*(sg33.zy).toDouble, yx*(sg33.xz).toDouble+yy*(sg33.yz).toDouble+yz*(sg33.zz).toDouble, zx*(sg33.xx).toDouble+zy*(sg33.yx).toDouble+zz*(sg33.zx).toDouble, zx*(sg33.xy).toDouble+zy*(sg33.yy).toDouble+zz*(sg33.zy).toDouble, zx*(sg33.xz).toDouble+zy*(sg33.yz).toDouble+zz*(sg33.zz).toDouble)
    def **(ig33: GMat3I) = new IMat3D(xx*(ig33.xx).toDouble+xy*(ig33.yx).toDouble+xz*(ig33.zx).toDouble, xx*(ig33.xy).toDouble+xy*(ig33.yy).toDouble+xz*(ig33.zy).toDouble, xx*(ig33.xz).toDouble+xy*(ig33.yz).toDouble+xz*(ig33.zz).toDouble, yx*(ig33.xx).toDouble+yy*(ig33.yx).toDouble+yz*(ig33.zx).toDouble, yx*(ig33.xy).toDouble+yy*(ig33.yy).toDouble+yz*(ig33.zy).toDouble, yx*(ig33.xz).toDouble+yy*(ig33.yz).toDouble+yz*(ig33.zz).toDouble, zx*(ig33.xx).toDouble+zy*(ig33.yx).toDouble+zz*(ig33.zx).toDouble, zx*(ig33.xy).toDouble+zy*(ig33.yy).toDouble+zz*(ig33.zy).toDouble, zx*(ig33.xz).toDouble+zy*(ig33.yz).toDouble+zz*(ig33.zz).toDouble)
    def **(lg33: GMat3L) = new IMat3D(xx*(lg33.xx).toDouble+xy*(lg33.yx).toDouble+xz*(lg33.zx).toDouble, xx*(lg33.xy).toDouble+xy*(lg33.yy).toDouble+xz*(lg33.zy).toDouble, xx*(lg33.xz).toDouble+xy*(lg33.yz).toDouble+xz*(lg33.zz).toDouble, yx*(lg33.xx).toDouble+yy*(lg33.yx).toDouble+yz*(lg33.zx).toDouble, yx*(lg33.xy).toDouble+yy*(lg33.yy).toDouble+yz*(lg33.zy).toDouble, yx*(lg33.xz).toDouble+yy*(lg33.yz).toDouble+yz*(lg33.zz).toDouble, zx*(lg33.xx).toDouble+zy*(lg33.yx).toDouble+zz*(lg33.zx).toDouble, zx*(lg33.xy).toDouble+zy*(lg33.yy).toDouble+zz*(lg33.zy).toDouble, zx*(lg33.xz).toDouble+zy*(lg33.yz).toDouble+zz*(lg33.zz).toDouble)
    def **(fg33: GMat3F) = new IMat3D(xx*(fg33.xx).toDouble+xy*(fg33.yx).toDouble+xz*(fg33.zx).toDouble, xx*(fg33.xy).toDouble+xy*(fg33.yy).toDouble+xz*(fg33.zy).toDouble, xx*(fg33.xz).toDouble+xy*(fg33.yz).toDouble+xz*(fg33.zz).toDouble, yx*(fg33.xx).toDouble+yy*(fg33.yx).toDouble+yz*(fg33.zx).toDouble, yx*(fg33.xy).toDouble+yy*(fg33.yy).toDouble+yz*(fg33.zy).toDouble, yx*(fg33.xz).toDouble+yy*(fg33.yz).toDouble+yz*(fg33.zz).toDouble, zx*(fg33.xx).toDouble+zy*(fg33.yx).toDouble+zz*(fg33.zx).toDouble, zx*(fg33.xy).toDouble+zy*(fg33.yy).toDouble+zz*(fg33.zy).toDouble, zx*(fg33.xz).toDouble+zy*(fg33.yz).toDouble+zz*(fg33.zz).toDouble)
    def **(dg33: GMat3D) = new IMat3D(xx*dg33.xx+xy*dg33.yx+xz*dg33.zx, xx*dg33.xy+xy*dg33.yy+xz*dg33.zy, xx*dg33.xz+xy*dg33.yz+xz*dg33.zz, yx*dg33.xx+yy*dg33.yx+yz*dg33.zx, yx*dg33.xy+yy*dg33.yy+yz*dg33.zy, yx*dg33.xz+yy*dg33.yz+yz*dg33.zz, zx*dg33.xx+zy*dg33.yx+zz*dg33.zx, zx*dg33.xy+zy*dg33.yy+zz*dg33.zy, zx*dg33.xz+zy*dg33.yz+zz*dg33.zz)
  } // class GMat3D

  object GMat3D {
    def apply(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): GMat3D = new IMat3D(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): GMat3D = IMat3D.parse(str)
    def xRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat3D(1, 0, 0, 0, c, -s, 0, s, c) }
    def yRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat3D(c, 0, s, 0, 1, 0, -s, 0, c) }
    def zRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat3D(c, -s, 0, s, c, 0, 0, 0, 1) }
    def rotation(axis: GVec3D, theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); val fact = 1/axis.len; new IMat3D(c + axis.x*axis.x*fact*fact*(1-c), axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s, axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s, axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s, c + axis.y*axis.y*fact*fact*(1-c), axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s, axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s, axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s, c + axis.z*axis.z*fact*fact*(1-c)) }
    val identity: GMat3D = IMat3D.identity
    val zero: GMat3D = IMat3D.zero
    def traced(dg3: GVec3D) = new IMat3D(dg3.x, 0, 0, 0, dg3.y, 0, 0, 0, dg3.z)
  } // object GMat3D


  final case class IMat3S(val xx: Short, val xy: Short, val xz: Short, val yx: Short, val yy: Short, val yz: Short, val zx: Short, val zy: Short, val zz: Short) extends GMat3S {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat3S = new IMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz): IMat3S = new IMat3S(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: IMat2S = new IMat2S(xx, xy, yx, yy)
    override def pad(padding: Short = 1): IMat4S = new IMat4S(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toI: IMat3I = new IMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def toL: IMat3L = new IMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: IMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: IMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class IMat3S

  object IMat3S {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat3S = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toShort); new IMat3S(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8)) }
    val identity = new IMat3S(1, 0, 0, 0, 1, 0, 0, 0, 1)
    val zero = new IMat3S(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(sg3: GVec3S) = new IMat3S(sg3.x, 0, 0, 0, sg3.y, 0, 0, 0, sg3.z)
  } // object IMat3S


  final case class IMat3I(val xx: Int, val xy: Int, val xz: Int, val yx: Int, val yy: Int, val yz: Int, val zx: Int, val zy: Int, val zz: Int) extends GMat3I {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat3I = new IMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: IMat3S = new IMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz): IMat3I = new IMat3I(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: IMat2I = new IMat2I(xx, xy, yx, yy)
    override def pad(padding: Int = 1): IMat4I = new IMat4I(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toL: IMat3L = new IMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: IMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: IMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class IMat3I

  object IMat3I {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat3I = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toInt); new IMat3I(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8)) }
    val identity = new IMat3I(1, 0, 0, 0, 1, 0, 0, 0, 1)
    val zero = new IMat3I(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(ig3: GVec3I) = new IMat3I(ig3.x, 0, 0, 0, ig3.y, 0, 0, 0, ig3.z)
  } // object IMat3I


  final case class IMat3L(val xx: Long, val xy: Long, val xz: Long, val yx: Long, val yy: Long, val yz: Long, val zx: Long, val zy: Long, val zz: Long) extends GMat3L {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat3L = new IMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: IMat3S = new IMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def toI: IMat3I = new IMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz): IMat3L = new IMat3L(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: IMat2L = new IMat2L(xx, xy, yx, yy)
    override def pad(padding: Long = 1): IMat4L = new IMat4L(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toF: IMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: IMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class IMat3L

  object IMat3L {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat3L = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toLong); new IMat3L(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8)) }
    val identity = new IMat3L(1, 0, 0, 0, 1, 0, 0, 0, 1)
    val zero = new IMat3L(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(lg3: GVec3L) = new IMat3L(lg3.x, 0, 0, 0, lg3.y, 0, 0, 0, lg3.z)
  } // object IMat3L


  final case class IMat3F(val xx: Float, val xy: Float, val xz: Float, val yx: Float, val yy: Float, val yz: Float, val zx: Float, val zy: Float, val zz: Float) extends GMat3F {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat3F = new IMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: IMat3S = new IMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: IMat3I = new IMat3I(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toL: IMat3L = new IMat3L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz): IMat3F = new IMat3F(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: IMat2F = new IMat2F(xx, xy, yx, yy)
    override def pad(padding: Float = 1): IMat4F = new IMat4F(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mat = this
    override def imm = this
    override def toD: IMat3D = new IMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class IMat3F

  object IMat3F {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat3F = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toFloat); new IMat3F(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8)) }
    def xRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat3F(1, 0, 0, 0, (c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat) }
    def yRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat3F((c).toFloat, 0, (s).toFloat, 0, 1, 0, (-s).toFloat, 0, (c).toFloat) }
    def zRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new IMat3F((c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat, 0, 0, 0, 1) }
    def rotation(axis: GVec3F, theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; val fact = 1/axis.len; new IMat3F((c + axis.x*axis.x*fact*fact*(1-c)).toFloat, (axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s).toFloat, (axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s).toFloat, (c + axis.y*axis.y*fact*fact*(1-c)).toFloat, (axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s).toFloat, (axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s).toFloat, (c + axis.z*axis.z*fact*fact*(1-c)).toFloat) }
    val identity = new IMat3F(1, 0, 0, 0, 1, 0, 0, 0, 1)
    val zero = new IMat3F(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(fg3: GVec3F) = new IMat3F(fg3.x, 0, 0, 0, fg3.y, 0, 0, 0, fg3.z)
  } // object IMat3F


  final case class IMat3D(val xx: Double, val xy: Double, val xz: Double, val yx: Double, val yy: Double, val yz: Double, val zx: Double, val zy: Double, val zz: Double) extends GMat3D {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat3D = new IMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: IMat3S = new IMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: IMat3I = new IMat3I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt)
    override def toL: IMat3L = new IMat3L(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toF: IMat3F = new IMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz): IMat3D = new IMat3D(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: IMat2D = new IMat2D(xx, xy, yx, yy)
    override def pad(padding: Double = 1): IMat4D = new IMat4D(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mat = this
    override def imm = this
  } // class IMat3D

  object IMat3D {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat3D = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toDouble); new IMat3D(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8)) }
    def xRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat3D(1, 0, 0, 0, c, -s, 0, s, c) }
    def yRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat3D(c, 0, s, 0, 1, 0, -s, 0, c) }
    def zRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new IMat3D(c, -s, 0, s, c, 0, 0, 0, 1) }
    def rotation(axis: GVec3D, theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); val fact = 1/axis.len; new IMat3D(c + axis.x*axis.x*fact*fact*(1-c), axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s, axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s, axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s, c + axis.y*axis.y*fact*fact*(1-c), axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s, axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s, axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s, c + axis.z*axis.z*fact*fact*(1-c)) }
    val identity = new IMat3D(1, 0, 0, 0, 1, 0, 0, 0, 1)
    val zero = new IMat3D(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(dg3: GVec3D) = new IMat3D(dg3.x, 0, 0, 0, dg3.y, 0, 0, 0, dg3.z)
  } // object IMat3D


  abstract class AMat3S extends GMat3S {
    def xx_=(xx0: Short): Unit
    def xy_=(xy0: Short): Unit
    def xz_=(xz0: Short): Unit
    def yx_=(yx0: Short): Unit
    def yy_=(yy0: Short): Unit
    def yz_=(yz0: Short): Unit
    def zx_=(zx0: Short): Unit
    def zy_=(zy0: Short): Unit
    def zz_=(zz0: Short): Unit
    override def clone(): AMat3S = new MMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz): AMat3S = new MMat3S(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: AMat2S = new MMat2S(xx, xy, yx, yy)
    override def pad(padding: Short = 1): AMat4S = new MMat4S(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    override def toI: AMat3I = new MMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def toL: AMat3L = new MMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: AMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: AMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def negEq: this.type = { xx = (-xx).toShort; xy = (-xy).toShort; xz = (-xz).toShort; yx = (-yx).toShort; yy = (-yy).toShort; yz = (-yz).toShort; zx = (-zx).toShort; zy = (-zy).toShort; zz = (-zz).toShort; this }
    def :~(x0: Short): this.type = { xx = x0; xy = x0; xz = x0; yx = x0; yy = x0; yz = x0; zx = x0; zy = x0; zz = x0; this }
    def :~~(x0: Int): this.type = { xx = (x0).toShort; xy = (x0).toShort; xz = (x0).toShort; yx = (x0).toShort; yy = (x0).toShort; yz = (x0).toShort; zx = (x0).toShort; zy = (x0).toShort; zz = (x0).toShort; this }
    def :~~(x0: Long): this.type = { xx = (x0).toShort; xy = (x0).toShort; xz = (x0).toShort; yx = (x0).toShort; yy = (x0).toShort; yz = (x0).toShort; zx = (x0).toShort; zy = (x0).toShort; zz = (x0).toShort; this }
    def :~~(x0: Float): this.type = { xx = (math.round(x0)).toShort; xy = (math.round(x0)).toShort; xz = (math.round(x0)).toShort; yx = (math.round(x0)).toShort; yy = (math.round(x0)).toShort; yz = (math.round(x0)).toShort; zx = (math.round(x0)).toShort; zy = (math.round(x0)).toShort; zz = (math.round(x0)).toShort; this }
    def :~~(x0: Double): this.type = { xx = (math.round(x0)).toShort; xy = (math.round(x0)).toShort; xz = (math.round(x0)).toShort; yx = (math.round(x0)).toShort; yy = (math.round(x0)).toShort; yz = (math.round(x0)).toShort; zx = (math.round(x0)).toShort; zy = (math.round(x0)).toShort; zz = (math.round(x0)).toShort; this }
    def :~(sg33: GMat3S): this.type = { xx = sg33.xx; xy = sg33.xy; xz = sg33.xz; yx = sg33.yx; yy = sg33.yy; yz = sg33.yz; zx = sg33.zx; zy = sg33.zy; zz = sg33.zz; this }
    def :~(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): this.type = { xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def :~~(ig33: GMat3I): this.type = { xx = (ig33.xx).toShort; xy = (ig33.xy).toShort; xz = (ig33.xz).toShort; yx = (ig33.yx).toShort; yy = (ig33.yy).toShort; yz = (ig33.yz).toShort; zx = (ig33.zx).toShort; zy = (ig33.zy).toShort; zz = (ig33.zz).toShort; this }
    def :~~(lg33: GMat3L): this.type = { xx = (lg33.xx).toShort; xy = (lg33.xy).toShort; xz = (lg33.xz).toShort; yx = (lg33.yx).toShort; yy = (lg33.yy).toShort; yz = (lg33.yz).toShort; zx = (lg33.zx).toShort; zy = (lg33.zy).toShort; zz = (lg33.zz).toShort; this }
    def :~~(fg33: GMat3F): this.type = { xx = (math.round(fg33.xx)).toShort; xy = (math.round(fg33.xy)).toShort; xz = (math.round(fg33.xz)).toShort; yx = (math.round(fg33.yx)).toShort; yy = (math.round(fg33.yy)).toShort; yz = (math.round(fg33.yz)).toShort; zx = (math.round(fg33.zx)).toShort; zy = (math.round(fg33.zy)).toShort; zz = (math.round(fg33.zz)).toShort; this }
    def :~~(dg33: GMat3D): this.type = { xx = (math.round(dg33.xx)).toShort; xy = (math.round(dg33.xy)).toShort; xz = (math.round(dg33.xz)).toShort; yx = (math.round(dg33.yx)).toShort; yy = (math.round(dg33.yy)).toShort; yz = (math.round(dg33.yz)).toShort; zx = (math.round(dg33.zx)).toShort; zy = (math.round(dg33.zy)).toShort; zz = (math.round(dg33.zz)).toShort; this }
    def +~(x0: Short): this.type = { xx = (xx + x0).toShort; xy = (xy + x0).toShort; xz = (xz + x0).toShort; yx = (yx + x0).toShort; yy = (yy + x0).toShort; yz = (yz + x0).toShort; zx = (zx + x0).toShort; zy = (zy + x0).toShort; zz = (zz + x0).toShort; this }
    def +~~(x0: Int): this.type = { xx = ((xx).toInt + x0).toShort; xy = ((xy).toInt + x0).toShort; xz = ((xz).toInt + x0).toShort; yx = ((yx).toInt + x0).toShort; yy = ((yy).toInt + x0).toShort; yz = ((yz).toInt + x0).toShort; zx = ((zx).toInt + x0).toShort; zy = ((zy).toInt + x0).toShort; zz = ((zz).toInt + x0).toShort; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toLong + x0).toShort; xy = ((xy).toLong + x0).toShort; xz = ((xz).toLong + x0).toShort; yx = ((yx).toLong + x0).toShort; yy = ((yy).toLong + x0).toShort; yz = ((yz).toLong + x0).toShort; zx = ((zx).toLong + x0).toShort; zy = ((zy).toLong + x0).toShort; zz = ((zz).toLong + x0).toShort; this }
    def +~~(x0: Float): this.type = { xx = (math.round((xx).toFloat + x0)).toShort; xy = (math.round((xy).toFloat + x0)).toShort; xz = (math.round((xz).toFloat + x0)).toShort; yx = (math.round((yx).toFloat + x0)).toShort; yy = (math.round((yy).toFloat + x0)).toShort; yz = (math.round((yz).toFloat + x0)).toShort; zx = (math.round((zx).toFloat + x0)).toShort; zy = (math.round((zy).toFloat + x0)).toShort; zz = (math.round((zz).toFloat + x0)).toShort; this }
    def +~~(x0: Double): this.type = { xx = (math.round((xx).toDouble + x0)).toShort; xy = (math.round((xy).toDouble + x0)).toShort; xz = (math.round((xz).toDouble + x0)).toShort; yx = (math.round((yx).toDouble + x0)).toShort; yy = (math.round((yy).toDouble + x0)).toShort; yz = (math.round((yz).toDouble + x0)).toShort; zx = (math.round((zx).toDouble + x0)).toShort; zy = (math.round((zy).toDouble + x0)).toShort; zz = (math.round((zz).toDouble + x0)).toShort; this }
    def +~(sg33: GMat3S): this.type = { xx = (xx + sg33.xx).toShort; xy = (xy + sg33.xy).toShort; xz = (xz + sg33.xz).toShort; yx = (yx + sg33.yx).toShort; yy = (yy + sg33.yy).toShort; yz = (yz + sg33.yz).toShort; zx = (zx + sg33.zx).toShort; zy = (zy + sg33.zy).toShort; zz = (zz + sg33.zz).toShort; this }
    def +~(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): this.type = { xx = (xx + xx0).toShort; xy = (xy + xy0).toShort; xz = (xz + xz0).toShort; yx = (yx + yx0).toShort; yy = (yy + yy0).toShort; yz = (yz + yz0).toShort; zx = (zx + zx0).toShort; zy = (zy + zy0).toShort; zz = (zz + zz0).toShort; this }
    def +~~(ig33: GMat3I): this.type = { xx = ((xx).toInt + ig33.xx).toShort; xy = ((xy).toInt + ig33.xy).toShort; xz = ((xz).toInt + ig33.xz).toShort; yx = ((yx).toInt + ig33.yx).toShort; yy = ((yy).toInt + ig33.yy).toShort; yz = ((yz).toInt + ig33.yz).toShort; zx = ((zx).toInt + ig33.zx).toShort; zy = ((zy).toInt + ig33.zy).toShort; zz = ((zz).toInt + ig33.zz).toShort; this }
    def +~~(lg33: GMat3L): this.type = { xx = ((xx).toLong + lg33.xx).toShort; xy = ((xy).toLong + lg33.xy).toShort; xz = ((xz).toLong + lg33.xz).toShort; yx = ((yx).toLong + lg33.yx).toShort; yy = ((yy).toLong + lg33.yy).toShort; yz = ((yz).toLong + lg33.yz).toShort; zx = ((zx).toLong + lg33.zx).toShort; zy = ((zy).toLong + lg33.zy).toShort; zz = ((zz).toLong + lg33.zz).toShort; this }
    def +~~(fg33: GMat3F): this.type = { xx = (math.round((xx).toFloat + fg33.xx)).toShort; xy = (math.round((xy).toFloat + fg33.xy)).toShort; xz = (math.round((xz).toFloat + fg33.xz)).toShort; yx = (math.round((yx).toFloat + fg33.yx)).toShort; yy = (math.round((yy).toFloat + fg33.yy)).toShort; yz = (math.round((yz).toFloat + fg33.yz)).toShort; zx = (math.round((zx).toFloat + fg33.zx)).toShort; zy = (math.round((zy).toFloat + fg33.zy)).toShort; zz = (math.round((zz).toFloat + fg33.zz)).toShort; this }
    def +~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble + dg33.xx)).toShort; xy = (math.round((xy).toDouble + dg33.xy)).toShort; xz = (math.round((xz).toDouble + dg33.xz)).toShort; yx = (math.round((yx).toDouble + dg33.yx)).toShort; yy = (math.round((yy).toDouble + dg33.yy)).toShort; yz = (math.round((yz).toDouble + dg33.yz)).toShort; zx = (math.round((zx).toDouble + dg33.zx)).toShort; zy = (math.round((zy).toDouble + dg33.zy)).toShort; zz = (math.round((zz).toDouble + dg33.zz)).toShort; this }
    def -~(x0: Short): this.type = { xx = (xx - x0).toShort; xy = (xy - x0).toShort; xz = (xz - x0).toShort; yx = (yx - x0).toShort; yy = (yy - x0).toShort; yz = (yz - x0).toShort; zx = (zx - x0).toShort; zy = (zy - x0).toShort; zz = (zz - x0).toShort; this }
    def -~~(x0: Int): this.type = { xx = ((xx).toInt - x0).toShort; xy = ((xy).toInt - x0).toShort; xz = ((xz).toInt - x0).toShort; yx = ((yx).toInt - x0).toShort; yy = ((yy).toInt - x0).toShort; yz = ((yz).toInt - x0).toShort; zx = ((zx).toInt - x0).toShort; zy = ((zy).toInt - x0).toShort; zz = ((zz).toInt - x0).toShort; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toLong - x0).toShort; xy = ((xy).toLong - x0).toShort; xz = ((xz).toLong - x0).toShort; yx = ((yx).toLong - x0).toShort; yy = ((yy).toLong - x0).toShort; yz = ((yz).toLong - x0).toShort; zx = ((zx).toLong - x0).toShort; zy = ((zy).toLong - x0).toShort; zz = ((zz).toLong - x0).toShort; this }
    def -~~(x0: Float): this.type = { xx = (math.round((xx).toFloat - x0)).toShort; xy = (math.round((xy).toFloat - x0)).toShort; xz = (math.round((xz).toFloat - x0)).toShort; yx = (math.round((yx).toFloat - x0)).toShort; yy = (math.round((yy).toFloat - x0)).toShort; yz = (math.round((yz).toFloat - x0)).toShort; zx = (math.round((zx).toFloat - x0)).toShort; zy = (math.round((zy).toFloat - x0)).toShort; zz = (math.round((zz).toFloat - x0)).toShort; this }
    def -~~(x0: Double): this.type = { xx = (math.round((xx).toDouble - x0)).toShort; xy = (math.round((xy).toDouble - x0)).toShort; xz = (math.round((xz).toDouble - x0)).toShort; yx = (math.round((yx).toDouble - x0)).toShort; yy = (math.round((yy).toDouble - x0)).toShort; yz = (math.round((yz).toDouble - x0)).toShort; zx = (math.round((zx).toDouble - x0)).toShort; zy = (math.round((zy).toDouble - x0)).toShort; zz = (math.round((zz).toDouble - x0)).toShort; this }
    def -~(sg33: GMat3S): this.type = { xx = (xx - sg33.xx).toShort; xy = (xy - sg33.xy).toShort; xz = (xz - sg33.xz).toShort; yx = (yx - sg33.yx).toShort; yy = (yy - sg33.yy).toShort; yz = (yz - sg33.yz).toShort; zx = (zx - sg33.zx).toShort; zy = (zy - sg33.zy).toShort; zz = (zz - sg33.zz).toShort; this }
    def -~(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): this.type = { xx = (xx - xx0).toShort; xy = (xy - xy0).toShort; xz = (xz - xz0).toShort; yx = (yx - yx0).toShort; yy = (yy - yy0).toShort; yz = (yz - yz0).toShort; zx = (zx - zx0).toShort; zy = (zy - zy0).toShort; zz = (zz - zz0).toShort; this }
    def -~~(ig33: GMat3I): this.type = { xx = ((xx).toInt - ig33.xx).toShort; xy = ((xy).toInt - ig33.xy).toShort; xz = ((xz).toInt - ig33.xz).toShort; yx = ((yx).toInt - ig33.yx).toShort; yy = ((yy).toInt - ig33.yy).toShort; yz = ((yz).toInt - ig33.yz).toShort; zx = ((zx).toInt - ig33.zx).toShort; zy = ((zy).toInt - ig33.zy).toShort; zz = ((zz).toInt - ig33.zz).toShort; this }
    def -~~(lg33: GMat3L): this.type = { xx = ((xx).toLong - lg33.xx).toShort; xy = ((xy).toLong - lg33.xy).toShort; xz = ((xz).toLong - lg33.xz).toShort; yx = ((yx).toLong - lg33.yx).toShort; yy = ((yy).toLong - lg33.yy).toShort; yz = ((yz).toLong - lg33.yz).toShort; zx = ((zx).toLong - lg33.zx).toShort; zy = ((zy).toLong - lg33.zy).toShort; zz = ((zz).toLong - lg33.zz).toShort; this }
    def -~~(fg33: GMat3F): this.type = { xx = (math.round((xx).toFloat - fg33.xx)).toShort; xy = (math.round((xy).toFloat - fg33.xy)).toShort; xz = (math.round((xz).toFloat - fg33.xz)).toShort; yx = (math.round((yx).toFloat - fg33.yx)).toShort; yy = (math.round((yy).toFloat - fg33.yy)).toShort; yz = (math.round((yz).toFloat - fg33.yz)).toShort; zx = (math.round((zx).toFloat - fg33.zx)).toShort; zy = (math.round((zy).toFloat - fg33.zy)).toShort; zz = (math.round((zz).toFloat - fg33.zz)).toShort; this }
    def -~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble - dg33.xx)).toShort; xy = (math.round((xy).toDouble - dg33.xy)).toShort; xz = (math.round((xz).toDouble - dg33.xz)).toShort; yx = (math.round((yx).toDouble - dg33.yx)).toShort; yy = (math.round((yy).toDouble - dg33.yy)).toShort; yz = (math.round((yz).toDouble - dg33.yz)).toShort; zx = (math.round((zx).toDouble - dg33.zx)).toShort; zy = (math.round((zy).toDouble - dg33.zy)).toShort; zz = (math.round((zz).toDouble - dg33.zz)).toShort; this }
    def *~(x0: Short): this.type = { xx = (xx * x0).toShort; xy = (xy * x0).toShort; xz = (xz * x0).toShort; yx = (yx * x0).toShort; yy = (yy * x0).toShort; yz = (yz * x0).toShort; zx = (zx * x0).toShort; zy = (zy * x0).toShort; zz = (zz * x0).toShort; this }
    def *~~(x0: Int): this.type = { xx = ((xx).toInt * x0).toShort; xy = ((xy).toInt * x0).toShort; xz = ((xz).toInt * x0).toShort; yx = ((yx).toInt * x0).toShort; yy = ((yy).toInt * x0).toShort; yz = ((yz).toInt * x0).toShort; zx = ((zx).toInt * x0).toShort; zy = ((zy).toInt * x0).toShort; zz = ((zz).toInt * x0).toShort; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toLong * x0).toShort; xy = ((xy).toLong * x0).toShort; xz = ((xz).toLong * x0).toShort; yx = ((yx).toLong * x0).toShort; yy = ((yy).toLong * x0).toShort; yz = ((yz).toLong * x0).toShort; zx = ((zx).toLong * x0).toShort; zy = ((zy).toLong * x0).toShort; zz = ((zz).toLong * x0).toShort; this }
    def *~~(x0: Float): this.type = { xx = (math.round((xx).toFloat * x0)).toShort; xy = (math.round((xy).toFloat * x0)).toShort; xz = (math.round((xz).toFloat * x0)).toShort; yx = (math.round((yx).toFloat * x0)).toShort; yy = (math.round((yy).toFloat * x0)).toShort; yz = (math.round((yz).toFloat * x0)).toShort; zx = (math.round((zx).toFloat * x0)).toShort; zy = (math.round((zy).toFloat * x0)).toShort; zz = (math.round((zz).toFloat * x0)).toShort; this }
    def *~~(x0: Double): this.type = { xx = (math.round((xx).toDouble * x0)).toShort; xy = (math.round((xy).toDouble * x0)).toShort; xz = (math.round((xz).toDouble * x0)).toShort; yx = (math.round((yx).toDouble * x0)).toShort; yy = (math.round((yy).toDouble * x0)).toShort; yz = (math.round((yz).toDouble * x0)).toShort; zx = (math.round((zx).toDouble * x0)).toShort; zy = (math.round((zy).toDouble * x0)).toShort; zz = (math.round((zz).toDouble * x0)).toShort; this }
    def *~(sg33: GMat3S): this.type = { xx = (xx * sg33.xx).toShort; xy = (xy * sg33.xy).toShort; xz = (xz * sg33.xz).toShort; yx = (yx * sg33.yx).toShort; yy = (yy * sg33.yy).toShort; yz = (yz * sg33.yz).toShort; zx = (zx * sg33.zx).toShort; zy = (zy * sg33.zy).toShort; zz = (zz * sg33.zz).toShort; this }
    def *~(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): this.type = { xx = (xx * xx0).toShort; xy = (xy * xy0).toShort; xz = (xz * xz0).toShort; yx = (yx * yx0).toShort; yy = (yy * yy0).toShort; yz = (yz * yz0).toShort; zx = (zx * zx0).toShort; zy = (zy * zy0).toShort; zz = (zz * zz0).toShort; this }
    def *~~(ig33: GMat3I): this.type = { xx = ((xx).toInt * ig33.xx).toShort; xy = ((xy).toInt * ig33.xy).toShort; xz = ((xz).toInt * ig33.xz).toShort; yx = ((yx).toInt * ig33.yx).toShort; yy = ((yy).toInt * ig33.yy).toShort; yz = ((yz).toInt * ig33.yz).toShort; zx = ((zx).toInt * ig33.zx).toShort; zy = ((zy).toInt * ig33.zy).toShort; zz = ((zz).toInt * ig33.zz).toShort; this }
    def *~~(lg33: GMat3L): this.type = { xx = ((xx).toLong * lg33.xx).toShort; xy = ((xy).toLong * lg33.xy).toShort; xz = ((xz).toLong * lg33.xz).toShort; yx = ((yx).toLong * lg33.yx).toShort; yy = ((yy).toLong * lg33.yy).toShort; yz = ((yz).toLong * lg33.yz).toShort; zx = ((zx).toLong * lg33.zx).toShort; zy = ((zy).toLong * lg33.zy).toShort; zz = ((zz).toLong * lg33.zz).toShort; this }
    def *~~(fg33: GMat3F): this.type = { xx = (math.round((xx).toFloat * fg33.xx)).toShort; xy = (math.round((xy).toFloat * fg33.xy)).toShort; xz = (math.round((xz).toFloat * fg33.xz)).toShort; yx = (math.round((yx).toFloat * fg33.yx)).toShort; yy = (math.round((yy).toFloat * fg33.yy)).toShort; yz = (math.round((yz).toFloat * fg33.yz)).toShort; zx = (math.round((zx).toFloat * fg33.zx)).toShort; zy = (math.round((zy).toFloat * fg33.zy)).toShort; zz = (math.round((zz).toFloat * fg33.zz)).toShort; this }
    def *~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble * dg33.xx)).toShort; xy = (math.round((xy).toDouble * dg33.xy)).toShort; xz = (math.round((xz).toDouble * dg33.xz)).toShort; yx = (math.round((yx).toDouble * dg33.yx)).toShort; yy = (math.round((yy).toDouble * dg33.yy)).toShort; yz = (math.round((yz).toDouble * dg33.yz)).toShort; zx = (math.round((zx).toDouble * dg33.zx)).toShort; zy = (math.round((zy).toDouble * dg33.zy)).toShort; zz = (math.round((zz).toDouble * dg33.zz)).toShort; this }
    def /~(x0: Short): this.type = { xx = (xx / x0).toShort; xy = (xy / x0).toShort; xz = (xz / x0).toShort; yx = (yx / x0).toShort; yy = (yy / x0).toShort; yz = (yz / x0).toShort; zx = (zx / x0).toShort; zy = (zy / x0).toShort; zz = (zz / x0).toShort; this }
    def /~~(x0: Int): this.type = { xx = ((xx).toInt / x0).toShort; xy = ((xy).toInt / x0).toShort; xz = ((xz).toInt / x0).toShort; yx = ((yx).toInt / x0).toShort; yy = ((yy).toInt / x0).toShort; yz = ((yz).toInt / x0).toShort; zx = ((zx).toInt / x0).toShort; zy = ((zy).toInt / x0).toShort; zz = ((zz).toInt / x0).toShort; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toLong / x0).toShort; xy = ((xy).toLong / x0).toShort; xz = ((xz).toLong / x0).toShort; yx = ((yx).toLong / x0).toShort; yy = ((yy).toLong / x0).toShort; yz = ((yz).toLong / x0).toShort; zx = ((zx).toLong / x0).toShort; zy = ((zy).toLong / x0).toShort; zz = ((zz).toLong / x0).toShort; this }
    def /~~(x0: Float): this.type = { xx = (math.round((xx).toFloat / x0)).toShort; xy = (math.round((xy).toFloat / x0)).toShort; xz = (math.round((xz).toFloat / x0)).toShort; yx = (math.round((yx).toFloat / x0)).toShort; yy = (math.round((yy).toFloat / x0)).toShort; yz = (math.round((yz).toFloat / x0)).toShort; zx = (math.round((zx).toFloat / x0)).toShort; zy = (math.round((zy).toFloat / x0)).toShort; zz = (math.round((zz).toFloat / x0)).toShort; this }
    def /~~(x0: Double): this.type = { xx = (math.round((xx).toDouble / x0)).toShort; xy = (math.round((xy).toDouble / x0)).toShort; xz = (math.round((xz).toDouble / x0)).toShort; yx = (math.round((yx).toDouble / x0)).toShort; yy = (math.round((yy).toDouble / x0)).toShort; yz = (math.round((yz).toDouble / x0)).toShort; zx = (math.round((zx).toDouble / x0)).toShort; zy = (math.round((zy).toDouble / x0)).toShort; zz = (math.round((zz).toDouble / x0)).toShort; this }
    def /~(sg33: GMat3S): this.type = { xx = (xx / sg33.xx).toShort; xy = (xy / sg33.xy).toShort; xz = (xz / sg33.xz).toShort; yx = (yx / sg33.yx).toShort; yy = (yy / sg33.yy).toShort; yz = (yz / sg33.yz).toShort; zx = (zx / sg33.zx).toShort; zy = (zy / sg33.zy).toShort; zz = (zz / sg33.zz).toShort; this }
    def /~(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): this.type = { xx = (xx / xx0).toShort; xy = (xy / xy0).toShort; xz = (xz / xz0).toShort; yx = (yx / yx0).toShort; yy = (yy / yy0).toShort; yz = (yz / yz0).toShort; zx = (zx / zx0).toShort; zy = (zy / zy0).toShort; zz = (zz / zz0).toShort; this }
    def /~~(ig33: GMat3I): this.type = { xx = ((xx).toInt / ig33.xx).toShort; xy = ((xy).toInt / ig33.xy).toShort; xz = ((xz).toInt / ig33.xz).toShort; yx = ((yx).toInt / ig33.yx).toShort; yy = ((yy).toInt / ig33.yy).toShort; yz = ((yz).toInt / ig33.yz).toShort; zx = ((zx).toInt / ig33.zx).toShort; zy = ((zy).toInt / ig33.zy).toShort; zz = ((zz).toInt / ig33.zz).toShort; this }
    def /~~(lg33: GMat3L): this.type = { xx = ((xx).toLong / lg33.xx).toShort; xy = ((xy).toLong / lg33.xy).toShort; xz = ((xz).toLong / lg33.xz).toShort; yx = ((yx).toLong / lg33.yx).toShort; yy = ((yy).toLong / lg33.yy).toShort; yz = ((yz).toLong / lg33.yz).toShort; zx = ((zx).toLong / lg33.zx).toShort; zy = ((zy).toLong / lg33.zy).toShort; zz = ((zz).toLong / lg33.zz).toShort; this }
    def /~~(fg33: GMat3F): this.type = { xx = (math.round((xx).toFloat / fg33.xx)).toShort; xy = (math.round((xy).toFloat / fg33.xy)).toShort; xz = (math.round((xz).toFloat / fg33.xz)).toShort; yx = (math.round((yx).toFloat / fg33.yx)).toShort; yy = (math.round((yy).toFloat / fg33.yy)).toShort; yz = (math.round((yz).toFloat / fg33.yz)).toShort; zx = (math.round((zx).toFloat / fg33.zx)).toShort; zy = (math.round((zy).toFloat / fg33.zy)).toShort; zz = (math.round((zz).toFloat / fg33.zz)).toShort; this }
    def /~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble / dg33.xx)).toShort; xy = (math.round((xy).toDouble / dg33.xy)).toShort; xz = (math.round((xz).toDouble / dg33.xz)).toShort; yx = (math.round((yx).toDouble / dg33.yx)).toShort; yy = (math.round((yy).toDouble / dg33.yy)).toShort; yz = (math.round((yz).toDouble / dg33.yz)).toShort; zx = (math.round((zx).toDouble / dg33.zx)).toShort; zy = (math.round((zy).toDouble / dg33.zy)).toShort; zz = (math.round((zz).toDouble / dg33.zz)).toShort; this }
    def maxEq(x0: Short): this.type = { xx = (math.max(xx,x0)).toShort; xy = (math.max(xy,x0)).toShort; xz = (math.max(xz,x0)).toShort; yx = (math.max(yx,x0)).toShort; yy = (math.max(yy,x0)).toShort; yz = (math.max(yz,x0)).toShort; zx = (math.max(zx,x0)).toShort; zy = (math.max(zy,x0)).toShort; zz = (math.max(zz,x0)).toShort; this }
    def maxEqCast(x0: Int): this.type = { xx = (math.max((xx).toInt,x0)).toShort; xy = (math.max((xy).toInt,x0)).toShort; xz = (math.max((xz).toInt,x0)).toShort; yx = (math.max((yx).toInt,x0)).toShort; yy = (math.max((yy).toInt,x0)).toShort; yz = (math.max((yz).toInt,x0)).toShort; zx = (math.max((zx).toInt,x0)).toShort; zy = (math.max((zy).toInt,x0)).toShort; zz = (math.max((zz).toInt,x0)).toShort; this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toLong,x0)).toShort; xy = (math.max((xy).toLong,x0)).toShort; xz = (math.max((xz).toLong,x0)).toShort; yx = (math.max((yx).toLong,x0)).toShort; yy = (math.max((yy).toLong,x0)).toShort; yz = (math.max((yz).toLong,x0)).toShort; zx = (math.max((zx).toLong,x0)).toShort; zy = (math.max((zy).toLong,x0)).toShort; zz = (math.max((zz).toLong,x0)).toShort; this }
    def maxEqCast(x0: Float): this.type = { xx = (math.round(math.max((xx).toFloat,x0))).toShort; xy = (math.round(math.max((xy).toFloat,x0))).toShort; xz = (math.round(math.max((xz).toFloat,x0))).toShort; yx = (math.round(math.max((yx).toFloat,x0))).toShort; yy = (math.round(math.max((yy).toFloat,x0))).toShort; yz = (math.round(math.max((yz).toFloat,x0))).toShort; zx = (math.round(math.max((zx).toFloat,x0))).toShort; zy = (math.round(math.max((zy).toFloat,x0))).toShort; zz = (math.round(math.max((zz).toFloat,x0))).toShort; this }
    def maxEqCast(x0: Double): this.type = { xx = (math.round(math.max((xx).toDouble,x0))).toShort; xy = (math.round(math.max((xy).toDouble,x0))).toShort; xz = (math.round(math.max((xz).toDouble,x0))).toShort; yx = (math.round(math.max((yx).toDouble,x0))).toShort; yy = (math.round(math.max((yy).toDouble,x0))).toShort; yz = (math.round(math.max((yz).toDouble,x0))).toShort; zx = (math.round(math.max((zx).toDouble,x0))).toShort; zy = (math.round(math.max((zy).toDouble,x0))).toShort; zz = (math.round(math.max((zz).toDouble,x0))).toShort; this }
    def maxEq(sg33: GMat3S): this.type = { xx = (math.max(xx,sg33.xx)).toShort; xy = (math.max(xy,sg33.xy)).toShort; xz = (math.max(xz,sg33.xz)).toShort; yx = (math.max(yx,sg33.yx)).toShort; yy = (math.max(yy,sg33.yy)).toShort; yz = (math.max(yz,sg33.yz)).toShort; zx = (math.max(zx,sg33.zx)).toShort; zy = (math.max(zy,sg33.zy)).toShort; zz = (math.max(zz,sg33.zz)).toShort; this }
    def maxEq(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): this.type = { xx = (math.max(xx,xx0)).toShort; xy = (math.max(xy,xy0)).toShort; xz = (math.max(xz,xz0)).toShort; yx = (math.max(yx,yx0)).toShort; yy = (math.max(yy,yy0)).toShort; yz = (math.max(yz,yz0)).toShort; zx = (math.max(zx,zx0)).toShort; zy = (math.max(zy,zy0)).toShort; zz = (math.max(zz,zz0)).toShort; this }
    def maxEqCast(ig33: GMat3I): this.type = { xx = (math.max((xx).toInt,ig33.xx)).toShort; xy = (math.max((xy).toInt,ig33.xy)).toShort; xz = (math.max((xz).toInt,ig33.xz)).toShort; yx = (math.max((yx).toInt,ig33.yx)).toShort; yy = (math.max((yy).toInt,ig33.yy)).toShort; yz = (math.max((yz).toInt,ig33.yz)).toShort; zx = (math.max((zx).toInt,ig33.zx)).toShort; zy = (math.max((zy).toInt,ig33.zy)).toShort; zz = (math.max((zz).toInt,ig33.zz)).toShort; this }
    def maxEqCast(lg33: GMat3L): this.type = { xx = (math.max((xx).toLong,lg33.xx)).toShort; xy = (math.max((xy).toLong,lg33.xy)).toShort; xz = (math.max((xz).toLong,lg33.xz)).toShort; yx = (math.max((yx).toLong,lg33.yx)).toShort; yy = (math.max((yy).toLong,lg33.yy)).toShort; yz = (math.max((yz).toLong,lg33.yz)).toShort; zx = (math.max((zx).toLong,lg33.zx)).toShort; zy = (math.max((zy).toLong,lg33.zy)).toShort; zz = (math.max((zz).toLong,lg33.zz)).toShort; this }
    def maxEqCast(fg33: GMat3F): this.type = { xx = (math.round(math.max((xx).toFloat,fg33.xx))).toShort; xy = (math.round(math.max((xy).toFloat,fg33.xy))).toShort; xz = (math.round(math.max((xz).toFloat,fg33.xz))).toShort; yx = (math.round(math.max((yx).toFloat,fg33.yx))).toShort; yy = (math.round(math.max((yy).toFloat,fg33.yy))).toShort; yz = (math.round(math.max((yz).toFloat,fg33.yz))).toShort; zx = (math.round(math.max((zx).toFloat,fg33.zx))).toShort; zy = (math.round(math.max((zy).toFloat,fg33.zy))).toShort; zz = (math.round(math.max((zz).toFloat,fg33.zz))).toShort; this }
    def maxEqCast(dg33: GMat3D): this.type = { xx = (math.round(math.max((xx).toDouble,dg33.xx))).toShort; xy = (math.round(math.max((xy).toDouble,dg33.xy))).toShort; xz = (math.round(math.max((xz).toDouble,dg33.xz))).toShort; yx = (math.round(math.max((yx).toDouble,dg33.yx))).toShort; yy = (math.round(math.max((yy).toDouble,dg33.yy))).toShort; yz = (math.round(math.max((yz).toDouble,dg33.yz))).toShort; zx = (math.round(math.max((zx).toDouble,dg33.zx))).toShort; zy = (math.round(math.max((zy).toDouble,dg33.zy))).toShort; zz = (math.round(math.max((zz).toDouble,dg33.zz))).toShort; this }
    def minEq(x0: Short): this.type = { xx = (math.min(xx,x0)).toShort; xy = (math.min(xy,x0)).toShort; xz = (math.min(xz,x0)).toShort; yx = (math.min(yx,x0)).toShort; yy = (math.min(yy,x0)).toShort; yz = (math.min(yz,x0)).toShort; zx = (math.min(zx,x0)).toShort; zy = (math.min(zy,x0)).toShort; zz = (math.min(zz,x0)).toShort; this }
    def minEqCast(x0: Int): this.type = { xx = (math.min((xx).toInt,x0)).toShort; xy = (math.min((xy).toInt,x0)).toShort; xz = (math.min((xz).toInt,x0)).toShort; yx = (math.min((yx).toInt,x0)).toShort; yy = (math.min((yy).toInt,x0)).toShort; yz = (math.min((yz).toInt,x0)).toShort; zx = (math.min((zx).toInt,x0)).toShort; zy = (math.min((zy).toInt,x0)).toShort; zz = (math.min((zz).toInt,x0)).toShort; this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toLong,x0)).toShort; xy = (math.min((xy).toLong,x0)).toShort; xz = (math.min((xz).toLong,x0)).toShort; yx = (math.min((yx).toLong,x0)).toShort; yy = (math.min((yy).toLong,x0)).toShort; yz = (math.min((yz).toLong,x0)).toShort; zx = (math.min((zx).toLong,x0)).toShort; zy = (math.min((zy).toLong,x0)).toShort; zz = (math.min((zz).toLong,x0)).toShort; this }
    def minEqCast(x0: Float): this.type = { xx = (math.round(math.min((xx).toFloat,x0))).toShort; xy = (math.round(math.min((xy).toFloat,x0))).toShort; xz = (math.round(math.min((xz).toFloat,x0))).toShort; yx = (math.round(math.min((yx).toFloat,x0))).toShort; yy = (math.round(math.min((yy).toFloat,x0))).toShort; yz = (math.round(math.min((yz).toFloat,x0))).toShort; zx = (math.round(math.min((zx).toFloat,x0))).toShort; zy = (math.round(math.min((zy).toFloat,x0))).toShort; zz = (math.round(math.min((zz).toFloat,x0))).toShort; this }
    def minEqCast(x0: Double): this.type = { xx = (math.round(math.min((xx).toDouble,x0))).toShort; xy = (math.round(math.min((xy).toDouble,x0))).toShort; xz = (math.round(math.min((xz).toDouble,x0))).toShort; yx = (math.round(math.min((yx).toDouble,x0))).toShort; yy = (math.round(math.min((yy).toDouble,x0))).toShort; yz = (math.round(math.min((yz).toDouble,x0))).toShort; zx = (math.round(math.min((zx).toDouble,x0))).toShort; zy = (math.round(math.min((zy).toDouble,x0))).toShort; zz = (math.round(math.min((zz).toDouble,x0))).toShort; this }
    def minEq(sg33: GMat3S): this.type = { xx = (math.min(xx,sg33.xx)).toShort; xy = (math.min(xy,sg33.xy)).toShort; xz = (math.min(xz,sg33.xz)).toShort; yx = (math.min(yx,sg33.yx)).toShort; yy = (math.min(yy,sg33.yy)).toShort; yz = (math.min(yz,sg33.yz)).toShort; zx = (math.min(zx,sg33.zx)).toShort; zy = (math.min(zy,sg33.zy)).toShort; zz = (math.min(zz,sg33.zz)).toShort; this }
    def minEq(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): this.type = { xx = (math.min(xx,xx0)).toShort; xy = (math.min(xy,xy0)).toShort; xz = (math.min(xz,xz0)).toShort; yx = (math.min(yx,yx0)).toShort; yy = (math.min(yy,yy0)).toShort; yz = (math.min(yz,yz0)).toShort; zx = (math.min(zx,zx0)).toShort; zy = (math.min(zy,zy0)).toShort; zz = (math.min(zz,zz0)).toShort; this }
    def minEqCast(ig33: GMat3I): this.type = { xx = (math.min((xx).toInt,ig33.xx)).toShort; xy = (math.min((xy).toInt,ig33.xy)).toShort; xz = (math.min((xz).toInt,ig33.xz)).toShort; yx = (math.min((yx).toInt,ig33.yx)).toShort; yy = (math.min((yy).toInt,ig33.yy)).toShort; yz = (math.min((yz).toInt,ig33.yz)).toShort; zx = (math.min((zx).toInt,ig33.zx)).toShort; zy = (math.min((zy).toInt,ig33.zy)).toShort; zz = (math.min((zz).toInt,ig33.zz)).toShort; this }
    def minEqCast(lg33: GMat3L): this.type = { xx = (math.min((xx).toLong,lg33.xx)).toShort; xy = (math.min((xy).toLong,lg33.xy)).toShort; xz = (math.min((xz).toLong,lg33.xz)).toShort; yx = (math.min((yx).toLong,lg33.yx)).toShort; yy = (math.min((yy).toLong,lg33.yy)).toShort; yz = (math.min((yz).toLong,lg33.yz)).toShort; zx = (math.min((zx).toLong,lg33.zx)).toShort; zy = (math.min((zy).toLong,lg33.zy)).toShort; zz = (math.min((zz).toLong,lg33.zz)).toShort; this }
    def minEqCast(fg33: GMat3F): this.type = { xx = (math.round(math.min((xx).toFloat,fg33.xx))).toShort; xy = (math.round(math.min((xy).toFloat,fg33.xy))).toShort; xz = (math.round(math.min((xz).toFloat,fg33.xz))).toShort; yx = (math.round(math.min((yx).toFloat,fg33.yx))).toShort; yy = (math.round(math.min((yy).toFloat,fg33.yy))).toShort; yz = (math.round(math.min((yz).toFloat,fg33.yz))).toShort; zx = (math.round(math.min((zx).toFloat,fg33.zx))).toShort; zy = (math.round(math.min((zy).toFloat,fg33.zy))).toShort; zz = (math.round(math.min((zz).toFloat,fg33.zz))).toShort; this }
    def minEqCast(dg33: GMat3D): this.type = { xx = (math.round(math.min((xx).toDouble,dg33.xx))).toShort; xy = (math.round(math.min((xy).toDouble,dg33.xy))).toShort; xz = (math.round(math.min((xz).toDouble,dg33.xz))).toShort; yx = (math.round(math.min((yx).toDouble,dg33.yx))).toShort; yy = (math.round(math.min((yy).toDouble,dg33.yy))).toShort; yz = (math.round(math.min((yz).toDouble,dg33.yz))).toShort; zx = (math.round(math.min((zx).toDouble,dg33.zx))).toShort; zy = (math.round(math.min((zy).toDouble,dg33.zy))).toShort; zz = (math.round(math.min((zz).toDouble,dg33.zz))).toShort; this }
    def operateEq(sg33: GMat3S)(fun: (Short,Short)=>Short) = { xx = (fun(xx,sg33.xx)).toShort; xy = (fun(xy,sg33.xy)).toShort; xz = (fun(xz,sg33.xz)).toShort; yx = (fun(yx,sg33.yx)).toShort; yy = (fun(yy,sg33.yy)).toShort; yz = (fun(yz,sg33.yz)).toShort; zx = (fun(zx,sg33.zx)).toShort; zy = (fun(zy,sg33.zy)).toShort; zz = (fun(zz,sg33.zz)).toShort; this }
    def operateEqCast(ig33: GMat3I)(fun: (Int,Int)=>Int) = { xx = (fun((xx).toInt,ig33.xx)).toShort; xy = (fun((xy).toInt,ig33.xy)).toShort; xz = (fun((xz).toInt,ig33.xz)).toShort; yx = (fun((yx).toInt,ig33.yx)).toShort; yy = (fun((yy).toInt,ig33.yy)).toShort; yz = (fun((yz).toInt,ig33.yz)).toShort; zx = (fun((zx).toInt,ig33.zx)).toShort; zy = (fun((zy).toInt,ig33.zy)).toShort; zz = (fun((zz).toInt,ig33.zz)).toShort; this }
    def operateEqCast(lg33: GMat3L)(fun: (Long,Long)=>Long) = { xx = (fun((xx).toLong,lg33.xx)).toShort; xy = (fun((xy).toLong,lg33.xy)).toShort; xz = (fun((xz).toLong,lg33.xz)).toShort; yx = (fun((yx).toLong,lg33.yx)).toShort; yy = (fun((yy).toLong,lg33.yy)).toShort; yz = (fun((yz).toLong,lg33.yz)).toShort; zx = (fun((zx).toLong,lg33.zx)).toShort; zy = (fun((zy).toLong,lg33.zy)).toShort; zz = (fun((zz).toLong,lg33.zz)).toShort; this }
    def operateEqCast(fg33: GMat3F)(fun: (Float,Float)=>Float) = { xx = (math.round(fun((xx).toFloat,fg33.xx))).toShort; xy = (math.round(fun((xy).toFloat,fg33.xy))).toShort; xz = (math.round(fun((xz).toFloat,fg33.xz))).toShort; yx = (math.round(fun((yx).toFloat,fg33.yx))).toShort; yy = (math.round(fun((yy).toFloat,fg33.yy))).toShort; yz = (math.round(fun((yz).toFloat,fg33.yz))).toShort; zx = (math.round(fun((zx).toFloat,fg33.zx))).toShort; zy = (math.round(fun((zy).toFloat,fg33.zy))).toShort; zz = (math.round(fun((zz).toFloat,fg33.zz))).toShort; this }
    def operateEqCast(dg33: GMat3D)(fun: (Double,Double)=>Double) = { xx = (math.round(fun((xx).toDouble,dg33.xx))).toShort; xy = (math.round(fun((xy).toDouble,dg33.xy))).toShort; xz = (math.round(fun((xz).toDouble,dg33.xz))).toShort; yx = (math.round(fun((yx).toDouble,dg33.yx))).toShort; yy = (math.round(fun((yy).toDouble,dg33.yy))).toShort; yz = (math.round(fun((yz).toDouble,dg33.yz))).toShort; zx = (math.round(fun((zx).toDouble,dg33.zx))).toShort; zy = (math.round(fun((zy).toDouble,dg33.zy))).toShort; zz = (math.round(fun((zz).toDouble,dg33.zz))).toShort; this }
    def :|~(sg3: GVec3S) = { xx = sg3.x; xy = sg3.x; xz = sg3.x; yx = sg3.y; yy = sg3.y; yz = sg3.y; zx = sg3.z; zy = sg3.z; zz = sg3.z; this }
    def :-~(sg3: GVec3S) = { xx = sg3.x; xy = sg3.y; xz = sg3.z; yx = sg3.x; yy = sg3.y; yz = sg3.z; zx = sg3.x; zy = sg3.y; zz = sg3.z; this }
    def :|~~(ig3: GVec3I) = { xx = (ig3.x).toShort; xy = (ig3.x).toShort; xz = (ig3.x).toShort; yx = (ig3.y).toShort; yy = (ig3.y).toShort; yz = (ig3.y).toShort; zx = (ig3.z).toShort; zy = (ig3.z).toShort; zz = (ig3.z).toShort; this }
    def :-~~(ig3: GVec3I) = { xx = (ig3.x).toShort; xy = (ig3.y).toShort; xz = (ig3.z).toShort; yx = (ig3.x).toShort; yy = (ig3.y).toShort; yz = (ig3.z).toShort; zx = (ig3.x).toShort; zy = (ig3.y).toShort; zz = (ig3.z).toShort; this }
    def :|~~(lg3: GVec3L) = { xx = (lg3.x).toShort; xy = (lg3.x).toShort; xz = (lg3.x).toShort; yx = (lg3.y).toShort; yy = (lg3.y).toShort; yz = (lg3.y).toShort; zx = (lg3.z).toShort; zy = (lg3.z).toShort; zz = (lg3.z).toShort; this }
    def :-~~(lg3: GVec3L) = { xx = (lg3.x).toShort; xy = (lg3.y).toShort; xz = (lg3.z).toShort; yx = (lg3.x).toShort; yy = (lg3.y).toShort; yz = (lg3.z).toShort; zx = (lg3.x).toShort; zy = (lg3.y).toShort; zz = (lg3.z).toShort; this }
    def :|~~(fg3: GVec3F) = { xx = (math.round(fg3.x)).toShort; xy = (math.round(fg3.x)).toShort; xz = (math.round(fg3.x)).toShort; yx = (math.round(fg3.y)).toShort; yy = (math.round(fg3.y)).toShort; yz = (math.round(fg3.y)).toShort; zx = (math.round(fg3.z)).toShort; zy = (math.round(fg3.z)).toShort; zz = (math.round(fg3.z)).toShort; this }
    def :-~~(fg3: GVec3F) = { xx = (math.round(fg3.x)).toShort; xy = (math.round(fg3.y)).toShort; xz = (math.round(fg3.z)).toShort; yx = (math.round(fg3.x)).toShort; yy = (math.round(fg3.y)).toShort; yz = (math.round(fg3.z)).toShort; zx = (math.round(fg3.x)).toShort; zy = (math.round(fg3.y)).toShort; zz = (math.round(fg3.z)).toShort; this }
    def :|~~(dg3: GVec3D) = { xx = (math.round(dg3.x)).toShort; xy = (math.round(dg3.x)).toShort; xz = (math.round(dg3.x)).toShort; yx = (math.round(dg3.y)).toShort; yy = (math.round(dg3.y)).toShort; yz = (math.round(dg3.y)).toShort; zx = (math.round(dg3.z)).toShort; zy = (math.round(dg3.z)).toShort; zz = (math.round(dg3.z)).toShort; this }
    def :-~~(dg3: GVec3D) = { xx = (math.round(dg3.x)).toShort; xy = (math.round(dg3.y)).toShort; xz = (math.round(dg3.z)).toShort; yx = (math.round(dg3.x)).toShort; yy = (math.round(dg3.y)).toShort; yz = (math.round(dg3.z)).toShort; zx = (math.round(dg3.x)).toShort; zy = (math.round(dg3.y)).toShort; zz = (math.round(dg3.z)).toShort; this }
    def **~(sg33: GMat3S) = {val xx0 = xx*sg33.xx+xy*sg33.yx+xz*sg33.zx; val xy0 = xx*sg33.xy+xy*sg33.yy+xz*sg33.zy; val xz0 = xx*sg33.xz+xy*sg33.yz+xz*sg33.zz; val yx0 = yx*sg33.xx+yy*sg33.yx+yz*sg33.zx; val yy0 = yx*sg33.xy+yy*sg33.yy+yz*sg33.zy; val yz0 = yx*sg33.xz+yy*sg33.yz+yz*sg33.zz; val zx0 = zx*sg33.xx+zy*sg33.yx+zz*sg33.zx; val zy0 = zx*sg33.xy+zy*sg33.yy+zz*sg33.zy; val zz0 = zx*sg33.xz+zy*sg33.yz+zz*sg33.zz; xx = (xx0).toShort; xy = (xy0).toShort; xz = (xz0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; yz = (yz0).toShort; zx = (zx0).toShort; zy = (zy0).toShort; zz = (zz0).toShort; this }
    def **~~(ig33: GMat3I) = {val xx0 = (xx).toInt*ig33.xx+(xy).toInt*ig33.yx+(xz).toInt*ig33.zx; val xy0 = (xx).toInt*ig33.xy+(xy).toInt*ig33.yy+(xz).toInt*ig33.zy; val xz0 = (xx).toInt*ig33.xz+(xy).toInt*ig33.yz+(xz).toInt*ig33.zz; val yx0 = (yx).toInt*ig33.xx+(yy).toInt*ig33.yx+(yz).toInt*ig33.zx; val yy0 = (yx).toInt*ig33.xy+(yy).toInt*ig33.yy+(yz).toInt*ig33.zy; val yz0 = (yx).toInt*ig33.xz+(yy).toInt*ig33.yz+(yz).toInt*ig33.zz; val zx0 = (zx).toInt*ig33.xx+(zy).toInt*ig33.yx+(zz).toInt*ig33.zx; val zy0 = (zx).toInt*ig33.xy+(zy).toInt*ig33.yy+(zz).toInt*ig33.zy; val zz0 = (zx).toInt*ig33.xz+(zy).toInt*ig33.yz+(zz).toInt*ig33.zz; xx = (xx0).toShort; xy = (xy0).toShort; xz = (xz0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; yz = (yz0).toShort; zx = (zx0).toShort; zy = (zy0).toShort; zz = (zz0).toShort; this }
    def **~~(lg33: GMat3L) = {val xx0 = (xx).toLong*lg33.xx+(xy).toLong*lg33.yx+(xz).toLong*lg33.zx; val xy0 = (xx).toLong*lg33.xy+(xy).toLong*lg33.yy+(xz).toLong*lg33.zy; val xz0 = (xx).toLong*lg33.xz+(xy).toLong*lg33.yz+(xz).toLong*lg33.zz; val yx0 = (yx).toLong*lg33.xx+(yy).toLong*lg33.yx+(yz).toLong*lg33.zx; val yy0 = (yx).toLong*lg33.xy+(yy).toLong*lg33.yy+(yz).toLong*lg33.zy; val yz0 = (yx).toLong*lg33.xz+(yy).toLong*lg33.yz+(yz).toLong*lg33.zz; val zx0 = (zx).toLong*lg33.xx+(zy).toLong*lg33.yx+(zz).toLong*lg33.zx; val zy0 = (zx).toLong*lg33.xy+(zy).toLong*lg33.yy+(zz).toLong*lg33.zy; val zz0 = (zx).toLong*lg33.xz+(zy).toLong*lg33.yz+(zz).toLong*lg33.zz; xx = (xx0).toShort; xy = (xy0).toShort; xz = (xz0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; yz = (yz0).toShort; zx = (zx0).toShort; zy = (zy0).toShort; zz = (zz0).toShort; this }
    def **~~(fg33: GMat3F) = {val xx0 = (xx).toFloat*fg33.xx+(xy).toFloat*fg33.yx+(xz).toFloat*fg33.zx; val xy0 = (xx).toFloat*fg33.xy+(xy).toFloat*fg33.yy+(xz).toFloat*fg33.zy; val xz0 = (xx).toFloat*fg33.xz+(xy).toFloat*fg33.yz+(xz).toFloat*fg33.zz; val yx0 = (yx).toFloat*fg33.xx+(yy).toFloat*fg33.yx+(yz).toFloat*fg33.zx; val yy0 = (yx).toFloat*fg33.xy+(yy).toFloat*fg33.yy+(yz).toFloat*fg33.zy; val yz0 = (yx).toFloat*fg33.xz+(yy).toFloat*fg33.yz+(yz).toFloat*fg33.zz; val zx0 = (zx).toFloat*fg33.xx+(zy).toFloat*fg33.yx+(zz).toFloat*fg33.zx; val zy0 = (zx).toFloat*fg33.xy+(zy).toFloat*fg33.yy+(zz).toFloat*fg33.zy; val zz0 = (zx).toFloat*fg33.xz+(zy).toFloat*fg33.yz+(zz).toFloat*fg33.zz; xx = (math.round(xx0)).toShort; xy = (math.round(xy0)).toShort; xz = (math.round(xz0)).toShort; yx = (math.round(yx0)).toShort; yy = (math.round(yy0)).toShort; yz = (math.round(yz0)).toShort; zx = (math.round(zx0)).toShort; zy = (math.round(zy0)).toShort; zz = (math.round(zz0)).toShort; this }
    def **~~(dg33: GMat3D) = {val xx0 = (xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx; val xy0 = (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy; val xz0 = (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz; val yx0 = (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx; val yy0 = (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy; val yz0 = (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz; val zx0 = (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx; val zy0 = (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy; val zz0 = (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz; xx = (math.round(xx0)).toShort; xy = (math.round(xy0)).toShort; xz = (math.round(xz0)).toShort; yx = (math.round(yx0)).toShort; yy = (math.round(yy0)).toShort; yz = (math.round(yz0)).toShort; zx = (math.round(zx0)).toShort; zy = (math.round(zy0)).toShort; zz = (math.round(zz0)).toShort; this }
    class RowViewX extends AVec3S { def x = xx; def x_=(x0: Short) { xx = x0 }; def y = xy; def y_=(x0: Short) { xy = x0 }; def z = xz; def z_=(x0: Short) { xz = x0 } }
    class ColViewX extends AVec3S { def x = xx; def x_=(x0: Short) { xx = x0 }; def y = yx; def y_=(x0: Short) { yx = x0 }; def z = zx; def z_=(x0: Short) { zx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec3S { def x = yx; def x_=(x0: Short) { yx = x0 }; def y = yy; def y_=(x0: Short) { yy = x0 }; def z = yz; def z_=(x0: Short) { yz = x0 } }
    class ColViewY extends AVec3S { def x = xy; def x_=(x0: Short) { xy = x0 }; def y = yy; def y_=(x0: Short) { yy = x0 }; def z = zy; def z_=(x0: Short) { zy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec3S { def x = zx; def x_=(x0: Short) { zx = x0 }; def y = zy; def y_=(x0: Short) { zy = x0 }; def z = zz; def z_=(x0: Short) { zz = x0 } }
    class ColViewZ extends AVec3S { def x = xz; def x_=(x0: Short) { xz = x0 }; def y = yz; def y_=(x0: Short) { yz = x0 }; def z = zz; def z_=(x0: Short) { zz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = yz; yz = zy; zy = temp; this }
  } // class AMat3S

  object AMat3S {
    def apply(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): AMat3S = new MMat3S(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): AMat3S = IMat3S.parse(str).mut
    def identity: AMat3S = MMat3S.identity
    def zero: AMat3S = MMat3S.zero
    def traced(sg3: GVec3S) = new MMat3S(sg3.x, 0, 0, 0, sg3.y, 0, 0, 0, sg3.z)
  } // object AMat3S


  abstract class AMat3I extends GMat3I {
    def xx_=(xx0: Int): Unit
    def xy_=(xy0: Int): Unit
    def xz_=(xz0: Int): Unit
    def yx_=(yx0: Int): Unit
    def yy_=(yy0: Int): Unit
    def yz_=(yz0: Int): Unit
    def zx_=(zx0: Int): Unit
    def zy_=(zy0: Int): Unit
    def zz_=(zz0: Int): Unit
    override def clone(): AMat3I = new MMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: AMat3S = new MMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz): AMat3I = new MMat3I(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: AMat2I = new MMat2I(xx, xy, yx, yy)
    override def pad(padding: Int = 1): AMat4I = new MMat4I(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapEq(fun: Int => Int): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); yx = fun(yx); yy = fun(yy); yz = fun(yz); zx = fun(zx); zy = fun(zy); zz = fun(zz); this }
    override def toL: AMat3L = new MMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: AMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: AMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; yx = -yx; yy = -yy; yz = -yz; zx = -zx; zy = -zy; zz = -zz; this }
    def :~(x0: Int): this.type = { xx = x0; xy = x0; xz = x0; yx = x0; yy = x0; yz = x0; zx = x0; zy = x0; zz = x0; this }
    def :~~(x0: Long): this.type = { xx = (x0).toInt; xy = (x0).toInt; xz = (x0).toInt; yx = (x0).toInt; yy = (x0).toInt; yz = (x0).toInt; zx = (x0).toInt; zy = (x0).toInt; zz = (x0).toInt; this }
    def :~~(x0: Float): this.type = { xx = math.round(x0); xy = math.round(x0); xz = math.round(x0); yx = math.round(x0); yy = math.round(x0); yz = math.round(x0); zx = math.round(x0); zy = math.round(x0); zz = math.round(x0); this }
    def :~~(x0: Double): this.type = { xx = (math.round(x0)).toInt; xy = (math.round(x0)).toInt; xz = (math.round(x0)).toInt; yx = (math.round(x0)).toInt; yy = (math.round(x0)).toInt; yz = (math.round(x0)).toInt; zx = (math.round(x0)).toInt; zy = (math.round(x0)).toInt; zz = (math.round(x0)).toInt; this }
    def :~(sg33: GMat3S): this.type = { xx = (sg33.xx).toInt; xy = (sg33.xy).toInt; xz = (sg33.xz).toInt; yx = (sg33.yx).toInt; yy = (sg33.yy).toInt; yz = (sg33.yz).toInt; zx = (sg33.zx).toInt; zy = (sg33.zy).toInt; zz = (sg33.zz).toInt; this }
    def :~(ig33: GMat3I): this.type = { xx = ig33.xx; xy = ig33.xy; xz = ig33.xz; yx = ig33.yx; yy = ig33.yy; yz = ig33.yz; zx = ig33.zx; zy = ig33.zy; zz = ig33.zz; this }
    def :~(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): this.type = { xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def :~~(lg33: GMat3L): this.type = { xx = (lg33.xx).toInt; xy = (lg33.xy).toInt; xz = (lg33.xz).toInt; yx = (lg33.yx).toInt; yy = (lg33.yy).toInt; yz = (lg33.yz).toInt; zx = (lg33.zx).toInt; zy = (lg33.zy).toInt; zz = (lg33.zz).toInt; this }
    def :~~(fg33: GMat3F): this.type = { xx = math.round(fg33.xx); xy = math.round(fg33.xy); xz = math.round(fg33.xz); yx = math.round(fg33.yx); yy = math.round(fg33.yy); yz = math.round(fg33.yz); zx = math.round(fg33.zx); zy = math.round(fg33.zy); zz = math.round(fg33.zz); this }
    def :~~(dg33: GMat3D): this.type = { xx = (math.round(dg33.xx)).toInt; xy = (math.round(dg33.xy)).toInt; xz = (math.round(dg33.xz)).toInt; yx = (math.round(dg33.yx)).toInt; yy = (math.round(dg33.yy)).toInt; yz = (math.round(dg33.yz)).toInt; zx = (math.round(dg33.zx)).toInt; zy = (math.round(dg33.zy)).toInt; zz = (math.round(dg33.zz)).toInt; this }
    def +~(x0: Int): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toLong + x0).toInt; xy = ((xy).toLong + x0).toInt; xz = ((xz).toLong + x0).toInt; yx = ((yx).toLong + x0).toInt; yy = ((yy).toLong + x0).toInt; yz = ((yz).toLong + x0).toInt; zx = ((zx).toLong + x0).toInt; zy = ((zy).toLong + x0).toInt; zz = ((zz).toLong + x0).toInt; this }
    def +~~(x0: Float): this.type = { xx = math.round((xx).toFloat + x0); xy = math.round((xy).toFloat + x0); xz = math.round((xz).toFloat + x0); yx = math.round((yx).toFloat + x0); yy = math.round((yy).toFloat + x0); yz = math.round((yz).toFloat + x0); zx = math.round((zx).toFloat + x0); zy = math.round((zy).toFloat + x0); zz = math.round((zz).toFloat + x0); this }
    def +~~(x0: Double): this.type = { xx = (math.round((xx).toDouble + x0)).toInt; xy = (math.round((xy).toDouble + x0)).toInt; xz = (math.round((xz).toDouble + x0)).toInt; yx = (math.round((yx).toDouble + x0)).toInt; yy = (math.round((yy).toDouble + x0)).toInt; yz = (math.round((yz).toDouble + x0)).toInt; zx = (math.round((zx).toDouble + x0)).toInt; zy = (math.round((zy).toDouble + x0)).toInt; zz = (math.round((zz).toDouble + x0)).toInt; this }
    def +~(sg33: GMat3S): this.type = { xx = xx + (sg33.xx).toInt; xy = xy + (sg33.xy).toInt; xz = xz + (sg33.xz).toInt; yx = yx + (sg33.yx).toInt; yy = yy + (sg33.yy).toInt; yz = yz + (sg33.yz).toInt; zx = zx + (sg33.zx).toInt; zy = zy + (sg33.zy).toInt; zz = zz + (sg33.zz).toInt; this }
    def +~(ig33: GMat3I): this.type = { xx = xx + ig33.xx; xy = xy + ig33.xy; xz = xz + ig33.xz; yx = yx + ig33.yx; yy = yy + ig33.yy; yz = yz + ig33.yz; zx = zx + ig33.zx; zy = zy + ig33.zy; zz = zz + ig33.zz; this }
    def +~(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; this }
    def +~~(lg33: GMat3L): this.type = { xx = ((xx).toLong + lg33.xx).toInt; xy = ((xy).toLong + lg33.xy).toInt; xz = ((xz).toLong + lg33.xz).toInt; yx = ((yx).toLong + lg33.yx).toInt; yy = ((yy).toLong + lg33.yy).toInt; yz = ((yz).toLong + lg33.yz).toInt; zx = ((zx).toLong + lg33.zx).toInt; zy = ((zy).toLong + lg33.zy).toInt; zz = ((zz).toLong + lg33.zz).toInt; this }
    def +~~(fg33: GMat3F): this.type = { xx = math.round((xx).toFloat + fg33.xx); xy = math.round((xy).toFloat + fg33.xy); xz = math.round((xz).toFloat + fg33.xz); yx = math.round((yx).toFloat + fg33.yx); yy = math.round((yy).toFloat + fg33.yy); yz = math.round((yz).toFloat + fg33.yz); zx = math.round((zx).toFloat + fg33.zx); zy = math.round((zy).toFloat + fg33.zy); zz = math.round((zz).toFloat + fg33.zz); this }
    def +~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble + dg33.xx)).toInt; xy = (math.round((xy).toDouble + dg33.xy)).toInt; xz = (math.round((xz).toDouble + dg33.xz)).toInt; yx = (math.round((yx).toDouble + dg33.yx)).toInt; yy = (math.round((yy).toDouble + dg33.yy)).toInt; yz = (math.round((yz).toDouble + dg33.yz)).toInt; zx = (math.round((zx).toDouble + dg33.zx)).toInt; zy = (math.round((zy).toDouble + dg33.zy)).toInt; zz = (math.round((zz).toDouble + dg33.zz)).toInt; this }
    def -~(x0: Int): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toLong - x0).toInt; xy = ((xy).toLong - x0).toInt; xz = ((xz).toLong - x0).toInt; yx = ((yx).toLong - x0).toInt; yy = ((yy).toLong - x0).toInt; yz = ((yz).toLong - x0).toInt; zx = ((zx).toLong - x0).toInt; zy = ((zy).toLong - x0).toInt; zz = ((zz).toLong - x0).toInt; this }
    def -~~(x0: Float): this.type = { xx = math.round((xx).toFloat - x0); xy = math.round((xy).toFloat - x0); xz = math.round((xz).toFloat - x0); yx = math.round((yx).toFloat - x0); yy = math.round((yy).toFloat - x0); yz = math.round((yz).toFloat - x0); zx = math.round((zx).toFloat - x0); zy = math.round((zy).toFloat - x0); zz = math.round((zz).toFloat - x0); this }
    def -~~(x0: Double): this.type = { xx = (math.round((xx).toDouble - x0)).toInt; xy = (math.round((xy).toDouble - x0)).toInt; xz = (math.round((xz).toDouble - x0)).toInt; yx = (math.round((yx).toDouble - x0)).toInt; yy = (math.round((yy).toDouble - x0)).toInt; yz = (math.round((yz).toDouble - x0)).toInt; zx = (math.round((zx).toDouble - x0)).toInt; zy = (math.round((zy).toDouble - x0)).toInt; zz = (math.round((zz).toDouble - x0)).toInt; this }
    def -~(sg33: GMat3S): this.type = { xx = xx - (sg33.xx).toInt; xy = xy - (sg33.xy).toInt; xz = xz - (sg33.xz).toInt; yx = yx - (sg33.yx).toInt; yy = yy - (sg33.yy).toInt; yz = yz - (sg33.yz).toInt; zx = zx - (sg33.zx).toInt; zy = zy - (sg33.zy).toInt; zz = zz - (sg33.zz).toInt; this }
    def -~(ig33: GMat3I): this.type = { xx = xx - ig33.xx; xy = xy - ig33.xy; xz = xz - ig33.xz; yx = yx - ig33.yx; yy = yy - ig33.yy; yz = yz - ig33.yz; zx = zx - ig33.zx; zy = zy - ig33.zy; zz = zz - ig33.zz; this }
    def -~(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; this }
    def -~~(lg33: GMat3L): this.type = { xx = ((xx).toLong - lg33.xx).toInt; xy = ((xy).toLong - lg33.xy).toInt; xz = ((xz).toLong - lg33.xz).toInt; yx = ((yx).toLong - lg33.yx).toInt; yy = ((yy).toLong - lg33.yy).toInt; yz = ((yz).toLong - lg33.yz).toInt; zx = ((zx).toLong - lg33.zx).toInt; zy = ((zy).toLong - lg33.zy).toInt; zz = ((zz).toLong - lg33.zz).toInt; this }
    def -~~(fg33: GMat3F): this.type = { xx = math.round((xx).toFloat - fg33.xx); xy = math.round((xy).toFloat - fg33.xy); xz = math.round((xz).toFloat - fg33.xz); yx = math.round((yx).toFloat - fg33.yx); yy = math.round((yy).toFloat - fg33.yy); yz = math.round((yz).toFloat - fg33.yz); zx = math.round((zx).toFloat - fg33.zx); zy = math.round((zy).toFloat - fg33.zy); zz = math.round((zz).toFloat - fg33.zz); this }
    def -~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble - dg33.xx)).toInt; xy = (math.round((xy).toDouble - dg33.xy)).toInt; xz = (math.round((xz).toDouble - dg33.xz)).toInt; yx = (math.round((yx).toDouble - dg33.yx)).toInt; yy = (math.round((yy).toDouble - dg33.yy)).toInt; yz = (math.round((yz).toDouble - dg33.yz)).toInt; zx = (math.round((zx).toDouble - dg33.zx)).toInt; zy = (math.round((zy).toDouble - dg33.zy)).toInt; zz = (math.round((zz).toDouble - dg33.zz)).toInt; this }
    def *~(x0: Int): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toLong * x0).toInt; xy = ((xy).toLong * x0).toInt; xz = ((xz).toLong * x0).toInt; yx = ((yx).toLong * x0).toInt; yy = ((yy).toLong * x0).toInt; yz = ((yz).toLong * x0).toInt; zx = ((zx).toLong * x0).toInt; zy = ((zy).toLong * x0).toInt; zz = ((zz).toLong * x0).toInt; this }
    def *~~(x0: Float): this.type = { xx = math.round((xx).toFloat * x0); xy = math.round((xy).toFloat * x0); xz = math.round((xz).toFloat * x0); yx = math.round((yx).toFloat * x0); yy = math.round((yy).toFloat * x0); yz = math.round((yz).toFloat * x0); zx = math.round((zx).toFloat * x0); zy = math.round((zy).toFloat * x0); zz = math.round((zz).toFloat * x0); this }
    def *~~(x0: Double): this.type = { xx = (math.round((xx).toDouble * x0)).toInt; xy = (math.round((xy).toDouble * x0)).toInt; xz = (math.round((xz).toDouble * x0)).toInt; yx = (math.round((yx).toDouble * x0)).toInt; yy = (math.round((yy).toDouble * x0)).toInt; yz = (math.round((yz).toDouble * x0)).toInt; zx = (math.round((zx).toDouble * x0)).toInt; zy = (math.round((zy).toDouble * x0)).toInt; zz = (math.round((zz).toDouble * x0)).toInt; this }
    def *~(sg33: GMat3S): this.type = { xx = xx * (sg33.xx).toInt; xy = xy * (sg33.xy).toInt; xz = xz * (sg33.xz).toInt; yx = yx * (sg33.yx).toInt; yy = yy * (sg33.yy).toInt; yz = yz * (sg33.yz).toInt; zx = zx * (sg33.zx).toInt; zy = zy * (sg33.zy).toInt; zz = zz * (sg33.zz).toInt; this }
    def *~(ig33: GMat3I): this.type = { xx = xx * ig33.xx; xy = xy * ig33.xy; xz = xz * ig33.xz; yx = yx * ig33.yx; yy = yy * ig33.yy; yz = yz * ig33.yz; zx = zx * ig33.zx; zy = zy * ig33.zy; zz = zz * ig33.zz; this }
    def *~(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; this }
    def *~~(lg33: GMat3L): this.type = { xx = ((xx).toLong * lg33.xx).toInt; xy = ((xy).toLong * lg33.xy).toInt; xz = ((xz).toLong * lg33.xz).toInt; yx = ((yx).toLong * lg33.yx).toInt; yy = ((yy).toLong * lg33.yy).toInt; yz = ((yz).toLong * lg33.yz).toInt; zx = ((zx).toLong * lg33.zx).toInt; zy = ((zy).toLong * lg33.zy).toInt; zz = ((zz).toLong * lg33.zz).toInt; this }
    def *~~(fg33: GMat3F): this.type = { xx = math.round((xx).toFloat * fg33.xx); xy = math.round((xy).toFloat * fg33.xy); xz = math.round((xz).toFloat * fg33.xz); yx = math.round((yx).toFloat * fg33.yx); yy = math.round((yy).toFloat * fg33.yy); yz = math.round((yz).toFloat * fg33.yz); zx = math.round((zx).toFloat * fg33.zx); zy = math.round((zy).toFloat * fg33.zy); zz = math.round((zz).toFloat * fg33.zz); this }
    def *~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble * dg33.xx)).toInt; xy = (math.round((xy).toDouble * dg33.xy)).toInt; xz = (math.round((xz).toDouble * dg33.xz)).toInt; yx = (math.round((yx).toDouble * dg33.yx)).toInt; yy = (math.round((yy).toDouble * dg33.yy)).toInt; yz = (math.round((yz).toDouble * dg33.yz)).toInt; zx = (math.round((zx).toDouble * dg33.zx)).toInt; zy = (math.round((zy).toDouble * dg33.zy)).toInt; zz = (math.round((zz).toDouble * dg33.zz)).toInt; this }
    def /~(x0: Int): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toLong / x0).toInt; xy = ((xy).toLong / x0).toInt; xz = ((xz).toLong / x0).toInt; yx = ((yx).toLong / x0).toInt; yy = ((yy).toLong / x0).toInt; yz = ((yz).toLong / x0).toInt; zx = ((zx).toLong / x0).toInt; zy = ((zy).toLong / x0).toInt; zz = ((zz).toLong / x0).toInt; this }
    def /~~(x0: Float): this.type = { xx = math.round((xx).toFloat / x0); xy = math.round((xy).toFloat / x0); xz = math.round((xz).toFloat / x0); yx = math.round((yx).toFloat / x0); yy = math.round((yy).toFloat / x0); yz = math.round((yz).toFloat / x0); zx = math.round((zx).toFloat / x0); zy = math.round((zy).toFloat / x0); zz = math.round((zz).toFloat / x0); this }
    def /~~(x0: Double): this.type = { xx = (math.round((xx).toDouble / x0)).toInt; xy = (math.round((xy).toDouble / x0)).toInt; xz = (math.round((xz).toDouble / x0)).toInt; yx = (math.round((yx).toDouble / x0)).toInt; yy = (math.round((yy).toDouble / x0)).toInt; yz = (math.round((yz).toDouble / x0)).toInt; zx = (math.round((zx).toDouble / x0)).toInt; zy = (math.round((zy).toDouble / x0)).toInt; zz = (math.round((zz).toDouble / x0)).toInt; this }
    def /~(sg33: GMat3S): this.type = { xx = xx / (sg33.xx).toInt; xy = xy / (sg33.xy).toInt; xz = xz / (sg33.xz).toInt; yx = yx / (sg33.yx).toInt; yy = yy / (sg33.yy).toInt; yz = yz / (sg33.yz).toInt; zx = zx / (sg33.zx).toInt; zy = zy / (sg33.zy).toInt; zz = zz / (sg33.zz).toInt; this }
    def /~(ig33: GMat3I): this.type = { xx = xx / ig33.xx; xy = xy / ig33.xy; xz = xz / ig33.xz; yx = yx / ig33.yx; yy = yy / ig33.yy; yz = yz / ig33.yz; zx = zx / ig33.zx; zy = zy / ig33.zy; zz = zz / ig33.zz; this }
    def /~(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; this }
    def /~~(lg33: GMat3L): this.type = { xx = ((xx).toLong / lg33.xx).toInt; xy = ((xy).toLong / lg33.xy).toInt; xz = ((xz).toLong / lg33.xz).toInt; yx = ((yx).toLong / lg33.yx).toInt; yy = ((yy).toLong / lg33.yy).toInt; yz = ((yz).toLong / lg33.yz).toInt; zx = ((zx).toLong / lg33.zx).toInt; zy = ((zy).toLong / lg33.zy).toInt; zz = ((zz).toLong / lg33.zz).toInt; this }
    def /~~(fg33: GMat3F): this.type = { xx = math.round((xx).toFloat / fg33.xx); xy = math.round((xy).toFloat / fg33.xy); xz = math.round((xz).toFloat / fg33.xz); yx = math.round((yx).toFloat / fg33.yx); yy = math.round((yy).toFloat / fg33.yy); yz = math.round((yz).toFloat / fg33.yz); zx = math.round((zx).toFloat / fg33.zx); zy = math.round((zy).toFloat / fg33.zy); zz = math.round((zz).toFloat / fg33.zz); this }
    def /~~(dg33: GMat3D): this.type = { xx = (math.round((xx).toDouble / dg33.xx)).toInt; xy = (math.round((xy).toDouble / dg33.xy)).toInt; xz = (math.round((xz).toDouble / dg33.xz)).toInt; yx = (math.round((yx).toDouble / dg33.yx)).toInt; yy = (math.round((yy).toDouble / dg33.yy)).toInt; yz = (math.round((yz).toDouble / dg33.yz)).toInt; zx = (math.round((zx).toDouble / dg33.zx)).toInt; zy = (math.round((zy).toDouble / dg33.zy)).toInt; zz = (math.round((zz).toDouble / dg33.zz)).toInt; this }
    def maxEq(x0: Int): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toLong,x0)).toInt; xy = (math.max((xy).toLong,x0)).toInt; xz = (math.max((xz).toLong,x0)).toInt; yx = (math.max((yx).toLong,x0)).toInt; yy = (math.max((yy).toLong,x0)).toInt; yz = (math.max((yz).toLong,x0)).toInt; zx = (math.max((zx).toLong,x0)).toInt; zy = (math.max((zy).toLong,x0)).toInt; zz = (math.max((zz).toLong,x0)).toInt; this }
    def maxEqCast(x0: Float): this.type = { xx = math.round(math.max((xx).toFloat,x0)); xy = math.round(math.max((xy).toFloat,x0)); xz = math.round(math.max((xz).toFloat,x0)); yx = math.round(math.max((yx).toFloat,x0)); yy = math.round(math.max((yy).toFloat,x0)); yz = math.round(math.max((yz).toFloat,x0)); zx = math.round(math.max((zx).toFloat,x0)); zy = math.round(math.max((zy).toFloat,x0)); zz = math.round(math.max((zz).toFloat,x0)); this }
    def maxEqCast(x0: Double): this.type = { xx = (math.round(math.max((xx).toDouble,x0))).toInt; xy = (math.round(math.max((xy).toDouble,x0))).toInt; xz = (math.round(math.max((xz).toDouble,x0))).toInt; yx = (math.round(math.max((yx).toDouble,x0))).toInt; yy = (math.round(math.max((yy).toDouble,x0))).toInt; yz = (math.round(math.max((yz).toDouble,x0))).toInt; zx = (math.round(math.max((zx).toDouble,x0))).toInt; zy = (math.round(math.max((zy).toDouble,x0))).toInt; zz = (math.round(math.max((zz).toDouble,x0))).toInt; this }
    def maxEq(sg33: GMat3S): this.type = { xx = math.max(xx,(sg33.xx).toInt); xy = math.max(xy,(sg33.xy).toInt); xz = math.max(xz,(sg33.xz).toInt); yx = math.max(yx,(sg33.yx).toInt); yy = math.max(yy,(sg33.yy).toInt); yz = math.max(yz,(sg33.yz).toInt); zx = math.max(zx,(sg33.zx).toInt); zy = math.max(zy,(sg33.zy).toInt); zz = math.max(zz,(sg33.zz).toInt); this }
    def maxEq(ig33: GMat3I): this.type = { xx = math.max(xx,ig33.xx); xy = math.max(xy,ig33.xy); xz = math.max(xz,ig33.xz); yx = math.max(yx,ig33.yx); yy = math.max(yy,ig33.yy); yz = math.max(yz,ig33.yz); zx = math.max(zx,ig33.zx); zy = math.max(zy,ig33.zy); zz = math.max(zz,ig33.zz); this }
    def maxEq(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); this }
    def maxEqCast(lg33: GMat3L): this.type = { xx = (math.max((xx).toLong,lg33.xx)).toInt; xy = (math.max((xy).toLong,lg33.xy)).toInt; xz = (math.max((xz).toLong,lg33.xz)).toInt; yx = (math.max((yx).toLong,lg33.yx)).toInt; yy = (math.max((yy).toLong,lg33.yy)).toInt; yz = (math.max((yz).toLong,lg33.yz)).toInt; zx = (math.max((zx).toLong,lg33.zx)).toInt; zy = (math.max((zy).toLong,lg33.zy)).toInt; zz = (math.max((zz).toLong,lg33.zz)).toInt; this }
    def maxEqCast(fg33: GMat3F): this.type = { xx = math.round(math.max((xx).toFloat,fg33.xx)); xy = math.round(math.max((xy).toFloat,fg33.xy)); xz = math.round(math.max((xz).toFloat,fg33.xz)); yx = math.round(math.max((yx).toFloat,fg33.yx)); yy = math.round(math.max((yy).toFloat,fg33.yy)); yz = math.round(math.max((yz).toFloat,fg33.yz)); zx = math.round(math.max((zx).toFloat,fg33.zx)); zy = math.round(math.max((zy).toFloat,fg33.zy)); zz = math.round(math.max((zz).toFloat,fg33.zz)); this }
    def maxEqCast(dg33: GMat3D): this.type = { xx = (math.round(math.max((xx).toDouble,dg33.xx))).toInt; xy = (math.round(math.max((xy).toDouble,dg33.xy))).toInt; xz = (math.round(math.max((xz).toDouble,dg33.xz))).toInt; yx = (math.round(math.max((yx).toDouble,dg33.yx))).toInt; yy = (math.round(math.max((yy).toDouble,dg33.yy))).toInt; yz = (math.round(math.max((yz).toDouble,dg33.yz))).toInt; zx = (math.round(math.max((zx).toDouble,dg33.zx))).toInt; zy = (math.round(math.max((zy).toDouble,dg33.zy))).toInt; zz = (math.round(math.max((zz).toDouble,dg33.zz))).toInt; this }
    def minEq(x0: Int): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toLong,x0)).toInt; xy = (math.min((xy).toLong,x0)).toInt; xz = (math.min((xz).toLong,x0)).toInt; yx = (math.min((yx).toLong,x0)).toInt; yy = (math.min((yy).toLong,x0)).toInt; yz = (math.min((yz).toLong,x0)).toInt; zx = (math.min((zx).toLong,x0)).toInt; zy = (math.min((zy).toLong,x0)).toInt; zz = (math.min((zz).toLong,x0)).toInt; this }
    def minEqCast(x0: Float): this.type = { xx = math.round(math.min((xx).toFloat,x0)); xy = math.round(math.min((xy).toFloat,x0)); xz = math.round(math.min((xz).toFloat,x0)); yx = math.round(math.min((yx).toFloat,x0)); yy = math.round(math.min((yy).toFloat,x0)); yz = math.round(math.min((yz).toFloat,x0)); zx = math.round(math.min((zx).toFloat,x0)); zy = math.round(math.min((zy).toFloat,x0)); zz = math.round(math.min((zz).toFloat,x0)); this }
    def minEqCast(x0: Double): this.type = { xx = (math.round(math.min((xx).toDouble,x0))).toInt; xy = (math.round(math.min((xy).toDouble,x0))).toInt; xz = (math.round(math.min((xz).toDouble,x0))).toInt; yx = (math.round(math.min((yx).toDouble,x0))).toInt; yy = (math.round(math.min((yy).toDouble,x0))).toInt; yz = (math.round(math.min((yz).toDouble,x0))).toInt; zx = (math.round(math.min((zx).toDouble,x0))).toInt; zy = (math.round(math.min((zy).toDouble,x0))).toInt; zz = (math.round(math.min((zz).toDouble,x0))).toInt; this }
    def minEq(sg33: GMat3S): this.type = { xx = math.min(xx,(sg33.xx).toInt); xy = math.min(xy,(sg33.xy).toInt); xz = math.min(xz,(sg33.xz).toInt); yx = math.min(yx,(sg33.yx).toInt); yy = math.min(yy,(sg33.yy).toInt); yz = math.min(yz,(sg33.yz).toInt); zx = math.min(zx,(sg33.zx).toInt); zy = math.min(zy,(sg33.zy).toInt); zz = math.min(zz,(sg33.zz).toInt); this }
    def minEq(ig33: GMat3I): this.type = { xx = math.min(xx,ig33.xx); xy = math.min(xy,ig33.xy); xz = math.min(xz,ig33.xz); yx = math.min(yx,ig33.yx); yy = math.min(yy,ig33.yy); yz = math.min(yz,ig33.yz); zx = math.min(zx,ig33.zx); zy = math.min(zy,ig33.zy); zz = math.min(zz,ig33.zz); this }
    def minEq(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); this }
    def minEqCast(lg33: GMat3L): this.type = { xx = (math.min((xx).toLong,lg33.xx)).toInt; xy = (math.min((xy).toLong,lg33.xy)).toInt; xz = (math.min((xz).toLong,lg33.xz)).toInt; yx = (math.min((yx).toLong,lg33.yx)).toInt; yy = (math.min((yy).toLong,lg33.yy)).toInt; yz = (math.min((yz).toLong,lg33.yz)).toInt; zx = (math.min((zx).toLong,lg33.zx)).toInt; zy = (math.min((zy).toLong,lg33.zy)).toInt; zz = (math.min((zz).toLong,lg33.zz)).toInt; this }
    def minEqCast(fg33: GMat3F): this.type = { xx = math.round(math.min((xx).toFloat,fg33.xx)); xy = math.round(math.min((xy).toFloat,fg33.xy)); xz = math.round(math.min((xz).toFloat,fg33.xz)); yx = math.round(math.min((yx).toFloat,fg33.yx)); yy = math.round(math.min((yy).toFloat,fg33.yy)); yz = math.round(math.min((yz).toFloat,fg33.yz)); zx = math.round(math.min((zx).toFloat,fg33.zx)); zy = math.round(math.min((zy).toFloat,fg33.zy)); zz = math.round(math.min((zz).toFloat,fg33.zz)); this }
    def minEqCast(dg33: GMat3D): this.type = { xx = (math.round(math.min((xx).toDouble,dg33.xx))).toInt; xy = (math.round(math.min((xy).toDouble,dg33.xy))).toInt; xz = (math.round(math.min((xz).toDouble,dg33.xz))).toInt; yx = (math.round(math.min((yx).toDouble,dg33.yx))).toInt; yy = (math.round(math.min((yy).toDouble,dg33.yy))).toInt; yz = (math.round(math.min((yz).toDouble,dg33.yz))).toInt; zx = (math.round(math.min((zx).toDouble,dg33.zx))).toInt; zy = (math.round(math.min((zy).toDouble,dg33.zy))).toInt; zz = (math.round(math.min((zz).toDouble,dg33.zz))).toInt; this }
    def operateEq(sg33: GMat3S)(fun: (Int,Int)=>Int) = { xx = fun(xx,(sg33.xx).toInt); xy = fun(xy,(sg33.xy).toInt); xz = fun(xz,(sg33.xz).toInt); yx = fun(yx,(sg33.yx).toInt); yy = fun(yy,(sg33.yy).toInt); yz = fun(yz,(sg33.yz).toInt); zx = fun(zx,(sg33.zx).toInt); zy = fun(zy,(sg33.zy).toInt); zz = fun(zz,(sg33.zz).toInt); this }
    def operateEq(ig33: GMat3I)(fun: (Int,Int)=>Int) = { xx = fun(xx,ig33.xx); xy = fun(xy,ig33.xy); xz = fun(xz,ig33.xz); yx = fun(yx,ig33.yx); yy = fun(yy,ig33.yy); yz = fun(yz,ig33.yz); zx = fun(zx,ig33.zx); zy = fun(zy,ig33.zy); zz = fun(zz,ig33.zz); this }
    def operateEqCast(lg33: GMat3L)(fun: (Long,Long)=>Long) = { xx = (fun((xx).toLong,lg33.xx)).toInt; xy = (fun((xy).toLong,lg33.xy)).toInt; xz = (fun((xz).toLong,lg33.xz)).toInt; yx = (fun((yx).toLong,lg33.yx)).toInt; yy = (fun((yy).toLong,lg33.yy)).toInt; yz = (fun((yz).toLong,lg33.yz)).toInt; zx = (fun((zx).toLong,lg33.zx)).toInt; zy = (fun((zy).toLong,lg33.zy)).toInt; zz = (fun((zz).toLong,lg33.zz)).toInt; this }
    def operateEqCast(fg33: GMat3F)(fun: (Float,Float)=>Float) = { xx = math.round(fun((xx).toFloat,fg33.xx)); xy = math.round(fun((xy).toFloat,fg33.xy)); xz = math.round(fun((xz).toFloat,fg33.xz)); yx = math.round(fun((yx).toFloat,fg33.yx)); yy = math.round(fun((yy).toFloat,fg33.yy)); yz = math.round(fun((yz).toFloat,fg33.yz)); zx = math.round(fun((zx).toFloat,fg33.zx)); zy = math.round(fun((zy).toFloat,fg33.zy)); zz = math.round(fun((zz).toFloat,fg33.zz)); this }
    def operateEqCast(dg33: GMat3D)(fun: (Double,Double)=>Double) = { xx = (math.round(fun((xx).toDouble,dg33.xx))).toInt; xy = (math.round(fun((xy).toDouble,dg33.xy))).toInt; xz = (math.round(fun((xz).toDouble,dg33.xz))).toInt; yx = (math.round(fun((yx).toDouble,dg33.yx))).toInt; yy = (math.round(fun((yy).toDouble,dg33.yy))).toInt; yz = (math.round(fun((yz).toDouble,dg33.yz))).toInt; zx = (math.round(fun((zx).toDouble,dg33.zx))).toInt; zy = (math.round(fun((zy).toDouble,dg33.zy))).toInt; zz = (math.round(fun((zz).toDouble,dg33.zz))).toInt; this }
    def :|~(sg3: GVec3S) = { xx = (sg3.x).toInt; xy = (sg3.x).toInt; xz = (sg3.x).toInt; yx = (sg3.y).toInt; yy = (sg3.y).toInt; yz = (sg3.y).toInt; zx = (sg3.z).toInt; zy = (sg3.z).toInt; zz = (sg3.z).toInt; this }
    def :-~(sg3: GVec3S) = { xx = (sg3.x).toInt; xy = (sg3.y).toInt; xz = (sg3.z).toInt; yx = (sg3.x).toInt; yy = (sg3.y).toInt; yz = (sg3.z).toInt; zx = (sg3.x).toInt; zy = (sg3.y).toInt; zz = (sg3.z).toInt; this }
    def :|~(ig3: GVec3I) = { xx = ig3.x; xy = ig3.x; xz = ig3.x; yx = ig3.y; yy = ig3.y; yz = ig3.y; zx = ig3.z; zy = ig3.z; zz = ig3.z; this }
    def :-~(ig3: GVec3I) = { xx = ig3.x; xy = ig3.y; xz = ig3.z; yx = ig3.x; yy = ig3.y; yz = ig3.z; zx = ig3.x; zy = ig3.y; zz = ig3.z; this }
    def :|~~(lg3: GVec3L) = { xx = (lg3.x).toInt; xy = (lg3.x).toInt; xz = (lg3.x).toInt; yx = (lg3.y).toInt; yy = (lg3.y).toInt; yz = (lg3.y).toInt; zx = (lg3.z).toInt; zy = (lg3.z).toInt; zz = (lg3.z).toInt; this }
    def :-~~(lg3: GVec3L) = { xx = (lg3.x).toInt; xy = (lg3.y).toInt; xz = (lg3.z).toInt; yx = (lg3.x).toInt; yy = (lg3.y).toInt; yz = (lg3.z).toInt; zx = (lg3.x).toInt; zy = (lg3.y).toInt; zz = (lg3.z).toInt; this }
    def :|~~(fg3: GVec3F) = { xx = math.round(fg3.x); xy = math.round(fg3.x); xz = math.round(fg3.x); yx = math.round(fg3.y); yy = math.round(fg3.y); yz = math.round(fg3.y); zx = math.round(fg3.z); zy = math.round(fg3.z); zz = math.round(fg3.z); this }
    def :-~~(fg3: GVec3F) = { xx = math.round(fg3.x); xy = math.round(fg3.y); xz = math.round(fg3.z); yx = math.round(fg3.x); yy = math.round(fg3.y); yz = math.round(fg3.z); zx = math.round(fg3.x); zy = math.round(fg3.y); zz = math.round(fg3.z); this }
    def :|~~(dg3: GVec3D) = { xx = (math.round(dg3.x)).toInt; xy = (math.round(dg3.x)).toInt; xz = (math.round(dg3.x)).toInt; yx = (math.round(dg3.y)).toInt; yy = (math.round(dg3.y)).toInt; yz = (math.round(dg3.y)).toInt; zx = (math.round(dg3.z)).toInt; zy = (math.round(dg3.z)).toInt; zz = (math.round(dg3.z)).toInt; this }
    def :-~~(dg3: GVec3D) = { xx = (math.round(dg3.x)).toInt; xy = (math.round(dg3.y)).toInt; xz = (math.round(dg3.z)).toInt; yx = (math.round(dg3.x)).toInt; yy = (math.round(dg3.y)).toInt; yz = (math.round(dg3.z)).toInt; zx = (math.round(dg3.x)).toInt; zy = (math.round(dg3.y)).toInt; zz = (math.round(dg3.z)).toInt; this }
    def **~(sg33: GMat3S) = {val xx0 = xx*(sg33.xx).toInt+xy*(sg33.yx).toInt+xz*(sg33.zx).toInt; val xy0 = xx*(sg33.xy).toInt+xy*(sg33.yy).toInt+xz*(sg33.zy).toInt; val xz0 = xx*(sg33.xz).toInt+xy*(sg33.yz).toInt+xz*(sg33.zz).toInt; val yx0 = yx*(sg33.xx).toInt+yy*(sg33.yx).toInt+yz*(sg33.zx).toInt; val yy0 = yx*(sg33.xy).toInt+yy*(sg33.yy).toInt+yz*(sg33.zy).toInt; val yz0 = yx*(sg33.xz).toInt+yy*(sg33.yz).toInt+yz*(sg33.zz).toInt; val zx0 = zx*(sg33.xx).toInt+zy*(sg33.yx).toInt+zz*(sg33.zx).toInt; val zy0 = zx*(sg33.xy).toInt+zy*(sg33.yy).toInt+zz*(sg33.zy).toInt; val zz0 = zx*(sg33.xz).toInt+zy*(sg33.yz).toInt+zz*(sg33.zz).toInt; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(ig33: GMat3I) = {val xx0 = xx*ig33.xx+xy*ig33.yx+xz*ig33.zx; val xy0 = xx*ig33.xy+xy*ig33.yy+xz*ig33.zy; val xz0 = xx*ig33.xz+xy*ig33.yz+xz*ig33.zz; val yx0 = yx*ig33.xx+yy*ig33.yx+yz*ig33.zx; val yy0 = yx*ig33.xy+yy*ig33.yy+yz*ig33.zy; val yz0 = yx*ig33.xz+yy*ig33.yz+yz*ig33.zz; val zx0 = zx*ig33.xx+zy*ig33.yx+zz*ig33.zx; val zy0 = zx*ig33.xy+zy*ig33.yy+zz*ig33.zy; val zz0 = zx*ig33.xz+zy*ig33.yz+zz*ig33.zz; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~~(lg33: GMat3L) = {val xx0 = (xx).toLong*lg33.xx+(xy).toLong*lg33.yx+(xz).toLong*lg33.zx; val xy0 = (xx).toLong*lg33.xy+(xy).toLong*lg33.yy+(xz).toLong*lg33.zy; val xz0 = (xx).toLong*lg33.xz+(xy).toLong*lg33.yz+(xz).toLong*lg33.zz; val yx0 = (yx).toLong*lg33.xx+(yy).toLong*lg33.yx+(yz).toLong*lg33.zx; val yy0 = (yx).toLong*lg33.xy+(yy).toLong*lg33.yy+(yz).toLong*lg33.zy; val yz0 = (yx).toLong*lg33.xz+(yy).toLong*lg33.yz+(yz).toLong*lg33.zz; val zx0 = (zx).toLong*lg33.xx+(zy).toLong*lg33.yx+(zz).toLong*lg33.zx; val zy0 = (zx).toLong*lg33.xy+(zy).toLong*lg33.yy+(zz).toLong*lg33.zy; val zz0 = (zx).toLong*lg33.xz+(zy).toLong*lg33.yz+(zz).toLong*lg33.zz; xx = (xx0).toInt; xy = (xy0).toInt; xz = (xz0).toInt; yx = (yx0).toInt; yy = (yy0).toInt; yz = (yz0).toInt; zx = (zx0).toInt; zy = (zy0).toInt; zz = (zz0).toInt; this }
    def **~~(fg33: GMat3F) = {val xx0 = (xx).toFloat*fg33.xx+(xy).toFloat*fg33.yx+(xz).toFloat*fg33.zx; val xy0 = (xx).toFloat*fg33.xy+(xy).toFloat*fg33.yy+(xz).toFloat*fg33.zy; val xz0 = (xx).toFloat*fg33.xz+(xy).toFloat*fg33.yz+(xz).toFloat*fg33.zz; val yx0 = (yx).toFloat*fg33.xx+(yy).toFloat*fg33.yx+(yz).toFloat*fg33.zx; val yy0 = (yx).toFloat*fg33.xy+(yy).toFloat*fg33.yy+(yz).toFloat*fg33.zy; val yz0 = (yx).toFloat*fg33.xz+(yy).toFloat*fg33.yz+(yz).toFloat*fg33.zz; val zx0 = (zx).toFloat*fg33.xx+(zy).toFloat*fg33.yx+(zz).toFloat*fg33.zx; val zy0 = (zx).toFloat*fg33.xy+(zy).toFloat*fg33.yy+(zz).toFloat*fg33.zy; val zz0 = (zx).toFloat*fg33.xz+(zy).toFloat*fg33.yz+(zz).toFloat*fg33.zz; xx = math.round(xx0); xy = math.round(xy0); xz = math.round(xz0); yx = math.round(yx0); yy = math.round(yy0); yz = math.round(yz0); zx = math.round(zx0); zy = math.round(zy0); zz = math.round(zz0); this }
    def **~~(dg33: GMat3D) = {val xx0 = (xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx; val xy0 = (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy; val xz0 = (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz; val yx0 = (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx; val yy0 = (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy; val yz0 = (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz; val zx0 = (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx; val zy0 = (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy; val zz0 = (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz; xx = (math.round(xx0)).toInt; xy = (math.round(xy0)).toInt; xz = (math.round(xz0)).toInt; yx = (math.round(yx0)).toInt; yy = (math.round(yy0)).toInt; yz = (math.round(yz0)).toInt; zx = (math.round(zx0)).toInt; zy = (math.round(zy0)).toInt; zz = (math.round(zz0)).toInt; this }
    class RowViewX extends AVec3I { def x = xx; def x_=(x0: Int) { xx = x0 }; def y = xy; def y_=(x0: Int) { xy = x0 }; def z = xz; def z_=(x0: Int) { xz = x0 } }
    class ColViewX extends AVec3I { def x = xx; def x_=(x0: Int) { xx = x0 }; def y = yx; def y_=(x0: Int) { yx = x0 }; def z = zx; def z_=(x0: Int) { zx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec3I { def x = yx; def x_=(x0: Int) { yx = x0 }; def y = yy; def y_=(x0: Int) { yy = x0 }; def z = yz; def z_=(x0: Int) { yz = x0 } }
    class ColViewY extends AVec3I { def x = xy; def x_=(x0: Int) { xy = x0 }; def y = yy; def y_=(x0: Int) { yy = x0 }; def z = zy; def z_=(x0: Int) { zy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec3I { def x = zx; def x_=(x0: Int) { zx = x0 }; def y = zy; def y_=(x0: Int) { zy = x0 }; def z = zz; def z_=(x0: Int) { zz = x0 } }
    class ColViewZ extends AVec3I { def x = xz; def x_=(x0: Int) { xz = x0 }; def y = yz; def y_=(x0: Int) { yz = x0 }; def z = zz; def z_=(x0: Int) { zz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = yz; yz = zy; zy = temp; this }
  } // class AMat3I

  object AMat3I {
    def apply(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): AMat3I = new MMat3I(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): AMat3I = IMat3I.parse(str).mut
    def identity: AMat3I = MMat3I.identity
    def zero: AMat3I = MMat3I.zero
    def traced(ig3: GVec3I) = new MMat3I(ig3.x, 0, 0, 0, ig3.y, 0, 0, 0, ig3.z)
  } // object AMat3I


  abstract class AMat3L extends GMat3L {
    def xx_=(xx0: Long): Unit
    def xy_=(xy0: Long): Unit
    def xz_=(xz0: Long): Unit
    def yx_=(yx0: Long): Unit
    def yy_=(yy0: Long): Unit
    def yz_=(yz0: Long): Unit
    def zx_=(zx0: Long): Unit
    def zy_=(zy0: Long): Unit
    def zz_=(zz0: Long): Unit
    override def clone(): AMat3L = new MMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: AMat3S = new MMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def toI: AMat3I = new MMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz): AMat3L = new MMat3L(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: AMat2L = new MMat2L(xx, xy, yx, yy)
    override def pad(padding: Long = 1): AMat4L = new MMat4L(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapEq(fun: Long => Long): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); yx = fun(yx); yy = fun(yy); yz = fun(yz); zx = fun(zx); zy = fun(zy); zz = fun(zz); this }
    override def toF: AMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: AMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; yx = -yx; yy = -yy; yz = -yz; zx = -zx; zy = -zy; zz = -zz; this }
    def :~(x0: Long): this.type = { xx = x0; xy = x0; xz = x0; yx = x0; yy = x0; yz = x0; zx = x0; zy = x0; zz = x0; this }
    def :~~(x0: Double): this.type = { xx = math.round(x0); xy = math.round(x0); xz = math.round(x0); yx = math.round(x0); yy = math.round(x0); yz = math.round(x0); zx = math.round(x0); zy = math.round(x0); zz = math.round(x0); this }
    def :~(sg33: GMat3S): this.type = { xx = (sg33.xx).toLong; xy = (sg33.xy).toLong; xz = (sg33.xz).toLong; yx = (sg33.yx).toLong; yy = (sg33.yy).toLong; yz = (sg33.yz).toLong; zx = (sg33.zx).toLong; zy = (sg33.zy).toLong; zz = (sg33.zz).toLong; this }
    def :~(ig33: GMat3I): this.type = { xx = (ig33.xx).toLong; xy = (ig33.xy).toLong; xz = (ig33.xz).toLong; yx = (ig33.yx).toLong; yy = (ig33.yy).toLong; yz = (ig33.yz).toLong; zx = (ig33.zx).toLong; zy = (ig33.zy).toLong; zz = (ig33.zz).toLong; this }
    def :~(lg33: GMat3L): this.type = { xx = lg33.xx; xy = lg33.xy; xz = lg33.xz; yx = lg33.yx; yy = lg33.yy; yz = lg33.yz; zx = lg33.zx; zy = lg33.zy; zz = lg33.zz; this }
    def :~(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): this.type = { xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def :~~(fg33: GMat3F): this.type = { xx = math.round((fg33.xx).toDouble); xy = math.round((fg33.xy).toDouble); xz = math.round((fg33.xz).toDouble); yx = math.round((fg33.yx).toDouble); yy = math.round((fg33.yy).toDouble); yz = math.round((fg33.yz).toDouble); zx = math.round((fg33.zx).toDouble); zy = math.round((fg33.zy).toDouble); zz = math.round((fg33.zz).toDouble); this }
    def :~~(dg33: GMat3D): this.type = { xx = math.round(dg33.xx); xy = math.round(dg33.xy); xz = math.round(dg33.xz); yx = math.round(dg33.yx); yy = math.round(dg33.yy); yz = math.round(dg33.yz); zx = math.round(dg33.zx); zy = math.round(dg33.zy); zz = math.round(dg33.zz); this }
    def +~(x0: Long): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; this }
    def +~~(x0: Double): this.type = { xx = math.round((xx).toDouble + x0); xy = math.round((xy).toDouble + x0); xz = math.round((xz).toDouble + x0); yx = math.round((yx).toDouble + x0); yy = math.round((yy).toDouble + x0); yz = math.round((yz).toDouble + x0); zx = math.round((zx).toDouble + x0); zy = math.round((zy).toDouble + x0); zz = math.round((zz).toDouble + x0); this }
    def +~(sg33: GMat3S): this.type = { xx = xx + (sg33.xx).toLong; xy = xy + (sg33.xy).toLong; xz = xz + (sg33.xz).toLong; yx = yx + (sg33.yx).toLong; yy = yy + (sg33.yy).toLong; yz = yz + (sg33.yz).toLong; zx = zx + (sg33.zx).toLong; zy = zy + (sg33.zy).toLong; zz = zz + (sg33.zz).toLong; this }
    def +~(ig33: GMat3I): this.type = { xx = xx + (ig33.xx).toLong; xy = xy + (ig33.xy).toLong; xz = xz + (ig33.xz).toLong; yx = yx + (ig33.yx).toLong; yy = yy + (ig33.yy).toLong; yz = yz + (ig33.yz).toLong; zx = zx + (ig33.zx).toLong; zy = zy + (ig33.zy).toLong; zz = zz + (ig33.zz).toLong; this }
    def +~(lg33: GMat3L): this.type = { xx = xx + lg33.xx; xy = xy + lg33.xy; xz = xz + lg33.xz; yx = yx + lg33.yx; yy = yy + lg33.yy; yz = yz + lg33.yz; zx = zx + lg33.zx; zy = zy + lg33.zy; zz = zz + lg33.zz; this }
    def +~(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; this }
    def +~~(fg33: GMat3F): this.type = { xx = math.round((xx).toDouble + (fg33.xx).toDouble); xy = math.round((xy).toDouble + (fg33.xy).toDouble); xz = math.round((xz).toDouble + (fg33.xz).toDouble); yx = math.round((yx).toDouble + (fg33.yx).toDouble); yy = math.round((yy).toDouble + (fg33.yy).toDouble); yz = math.round((yz).toDouble + (fg33.yz).toDouble); zx = math.round((zx).toDouble + (fg33.zx).toDouble); zy = math.round((zy).toDouble + (fg33.zy).toDouble); zz = math.round((zz).toDouble + (fg33.zz).toDouble); this }
    def +~~(dg33: GMat3D): this.type = { xx = math.round((xx).toDouble + dg33.xx); xy = math.round((xy).toDouble + dg33.xy); xz = math.round((xz).toDouble + dg33.xz); yx = math.round((yx).toDouble + dg33.yx); yy = math.round((yy).toDouble + dg33.yy); yz = math.round((yz).toDouble + dg33.yz); zx = math.round((zx).toDouble + dg33.zx); zy = math.round((zy).toDouble + dg33.zy); zz = math.round((zz).toDouble + dg33.zz); this }
    def -~(x0: Long): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; this }
    def -~~(x0: Double): this.type = { xx = math.round((xx).toDouble - x0); xy = math.round((xy).toDouble - x0); xz = math.round((xz).toDouble - x0); yx = math.round((yx).toDouble - x0); yy = math.round((yy).toDouble - x0); yz = math.round((yz).toDouble - x0); zx = math.round((zx).toDouble - x0); zy = math.round((zy).toDouble - x0); zz = math.round((zz).toDouble - x0); this }
    def -~(sg33: GMat3S): this.type = { xx = xx - (sg33.xx).toLong; xy = xy - (sg33.xy).toLong; xz = xz - (sg33.xz).toLong; yx = yx - (sg33.yx).toLong; yy = yy - (sg33.yy).toLong; yz = yz - (sg33.yz).toLong; zx = zx - (sg33.zx).toLong; zy = zy - (sg33.zy).toLong; zz = zz - (sg33.zz).toLong; this }
    def -~(ig33: GMat3I): this.type = { xx = xx - (ig33.xx).toLong; xy = xy - (ig33.xy).toLong; xz = xz - (ig33.xz).toLong; yx = yx - (ig33.yx).toLong; yy = yy - (ig33.yy).toLong; yz = yz - (ig33.yz).toLong; zx = zx - (ig33.zx).toLong; zy = zy - (ig33.zy).toLong; zz = zz - (ig33.zz).toLong; this }
    def -~(lg33: GMat3L): this.type = { xx = xx - lg33.xx; xy = xy - lg33.xy; xz = xz - lg33.xz; yx = yx - lg33.yx; yy = yy - lg33.yy; yz = yz - lg33.yz; zx = zx - lg33.zx; zy = zy - lg33.zy; zz = zz - lg33.zz; this }
    def -~(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; this }
    def -~~(fg33: GMat3F): this.type = { xx = math.round((xx).toDouble - (fg33.xx).toDouble); xy = math.round((xy).toDouble - (fg33.xy).toDouble); xz = math.round((xz).toDouble - (fg33.xz).toDouble); yx = math.round((yx).toDouble - (fg33.yx).toDouble); yy = math.round((yy).toDouble - (fg33.yy).toDouble); yz = math.round((yz).toDouble - (fg33.yz).toDouble); zx = math.round((zx).toDouble - (fg33.zx).toDouble); zy = math.round((zy).toDouble - (fg33.zy).toDouble); zz = math.round((zz).toDouble - (fg33.zz).toDouble); this }
    def -~~(dg33: GMat3D): this.type = { xx = math.round((xx).toDouble - dg33.xx); xy = math.round((xy).toDouble - dg33.xy); xz = math.round((xz).toDouble - dg33.xz); yx = math.round((yx).toDouble - dg33.yx); yy = math.round((yy).toDouble - dg33.yy); yz = math.round((yz).toDouble - dg33.yz); zx = math.round((zx).toDouble - dg33.zx); zy = math.round((zy).toDouble - dg33.zy); zz = math.round((zz).toDouble - dg33.zz); this }
    def *~(x0: Long): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; this }
    def *~~(x0: Double): this.type = { xx = math.round((xx).toDouble * x0); xy = math.round((xy).toDouble * x0); xz = math.round((xz).toDouble * x0); yx = math.round((yx).toDouble * x0); yy = math.round((yy).toDouble * x0); yz = math.round((yz).toDouble * x0); zx = math.round((zx).toDouble * x0); zy = math.round((zy).toDouble * x0); zz = math.round((zz).toDouble * x0); this }
    def *~(sg33: GMat3S): this.type = { xx = xx * (sg33.xx).toLong; xy = xy * (sg33.xy).toLong; xz = xz * (sg33.xz).toLong; yx = yx * (sg33.yx).toLong; yy = yy * (sg33.yy).toLong; yz = yz * (sg33.yz).toLong; zx = zx * (sg33.zx).toLong; zy = zy * (sg33.zy).toLong; zz = zz * (sg33.zz).toLong; this }
    def *~(ig33: GMat3I): this.type = { xx = xx * (ig33.xx).toLong; xy = xy * (ig33.xy).toLong; xz = xz * (ig33.xz).toLong; yx = yx * (ig33.yx).toLong; yy = yy * (ig33.yy).toLong; yz = yz * (ig33.yz).toLong; zx = zx * (ig33.zx).toLong; zy = zy * (ig33.zy).toLong; zz = zz * (ig33.zz).toLong; this }
    def *~(lg33: GMat3L): this.type = { xx = xx * lg33.xx; xy = xy * lg33.xy; xz = xz * lg33.xz; yx = yx * lg33.yx; yy = yy * lg33.yy; yz = yz * lg33.yz; zx = zx * lg33.zx; zy = zy * lg33.zy; zz = zz * lg33.zz; this }
    def *~(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; this }
    def *~~(fg33: GMat3F): this.type = { xx = math.round((xx).toDouble * (fg33.xx).toDouble); xy = math.round((xy).toDouble * (fg33.xy).toDouble); xz = math.round((xz).toDouble * (fg33.xz).toDouble); yx = math.round((yx).toDouble * (fg33.yx).toDouble); yy = math.round((yy).toDouble * (fg33.yy).toDouble); yz = math.round((yz).toDouble * (fg33.yz).toDouble); zx = math.round((zx).toDouble * (fg33.zx).toDouble); zy = math.round((zy).toDouble * (fg33.zy).toDouble); zz = math.round((zz).toDouble * (fg33.zz).toDouble); this }
    def *~~(dg33: GMat3D): this.type = { xx = math.round((xx).toDouble * dg33.xx); xy = math.round((xy).toDouble * dg33.xy); xz = math.round((xz).toDouble * dg33.xz); yx = math.round((yx).toDouble * dg33.yx); yy = math.round((yy).toDouble * dg33.yy); yz = math.round((yz).toDouble * dg33.yz); zx = math.round((zx).toDouble * dg33.zx); zy = math.round((zy).toDouble * dg33.zy); zz = math.round((zz).toDouble * dg33.zz); this }
    def /~(x0: Long): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; this }
    def /~~(x0: Double): this.type = { xx = math.round((xx).toDouble / x0); xy = math.round((xy).toDouble / x0); xz = math.round((xz).toDouble / x0); yx = math.round((yx).toDouble / x0); yy = math.round((yy).toDouble / x0); yz = math.round((yz).toDouble / x0); zx = math.round((zx).toDouble / x0); zy = math.round((zy).toDouble / x0); zz = math.round((zz).toDouble / x0); this }
    def /~(sg33: GMat3S): this.type = { xx = xx / (sg33.xx).toLong; xy = xy / (sg33.xy).toLong; xz = xz / (sg33.xz).toLong; yx = yx / (sg33.yx).toLong; yy = yy / (sg33.yy).toLong; yz = yz / (sg33.yz).toLong; zx = zx / (sg33.zx).toLong; zy = zy / (sg33.zy).toLong; zz = zz / (sg33.zz).toLong; this }
    def /~(ig33: GMat3I): this.type = { xx = xx / (ig33.xx).toLong; xy = xy / (ig33.xy).toLong; xz = xz / (ig33.xz).toLong; yx = yx / (ig33.yx).toLong; yy = yy / (ig33.yy).toLong; yz = yz / (ig33.yz).toLong; zx = zx / (ig33.zx).toLong; zy = zy / (ig33.zy).toLong; zz = zz / (ig33.zz).toLong; this }
    def /~(lg33: GMat3L): this.type = { xx = xx / lg33.xx; xy = xy / lg33.xy; xz = xz / lg33.xz; yx = yx / lg33.yx; yy = yy / lg33.yy; yz = yz / lg33.yz; zx = zx / lg33.zx; zy = zy / lg33.zy; zz = zz / lg33.zz; this }
    def /~(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; this }
    def /~~(fg33: GMat3F): this.type = { xx = math.round((xx).toDouble / (fg33.xx).toDouble); xy = math.round((xy).toDouble / (fg33.xy).toDouble); xz = math.round((xz).toDouble / (fg33.xz).toDouble); yx = math.round((yx).toDouble / (fg33.yx).toDouble); yy = math.round((yy).toDouble / (fg33.yy).toDouble); yz = math.round((yz).toDouble / (fg33.yz).toDouble); zx = math.round((zx).toDouble / (fg33.zx).toDouble); zy = math.round((zy).toDouble / (fg33.zy).toDouble); zz = math.round((zz).toDouble / (fg33.zz).toDouble); this }
    def /~~(dg33: GMat3D): this.type = { xx = math.round((xx).toDouble / dg33.xx); xy = math.round((xy).toDouble / dg33.xy); xz = math.round((xz).toDouble / dg33.xz); yx = math.round((yx).toDouble / dg33.yx); yy = math.round((yy).toDouble / dg33.yy); yz = math.round((yz).toDouble / dg33.yz); zx = math.round((zx).toDouble / dg33.zx); zy = math.round((zy).toDouble / dg33.zy); zz = math.round((zz).toDouble / dg33.zz); this }
    def maxEq(x0: Long): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); this }
    def maxEqCast(x0: Double): this.type = { xx = math.round(math.max((xx).toDouble,x0)); xy = math.round(math.max((xy).toDouble,x0)); xz = math.round(math.max((xz).toDouble,x0)); yx = math.round(math.max((yx).toDouble,x0)); yy = math.round(math.max((yy).toDouble,x0)); yz = math.round(math.max((yz).toDouble,x0)); zx = math.round(math.max((zx).toDouble,x0)); zy = math.round(math.max((zy).toDouble,x0)); zz = math.round(math.max((zz).toDouble,x0)); this }
    def maxEq(sg33: GMat3S): this.type = { xx = math.max(xx,(sg33.xx).toLong); xy = math.max(xy,(sg33.xy).toLong); xz = math.max(xz,(sg33.xz).toLong); yx = math.max(yx,(sg33.yx).toLong); yy = math.max(yy,(sg33.yy).toLong); yz = math.max(yz,(sg33.yz).toLong); zx = math.max(zx,(sg33.zx).toLong); zy = math.max(zy,(sg33.zy).toLong); zz = math.max(zz,(sg33.zz).toLong); this }
    def maxEq(ig33: GMat3I): this.type = { xx = math.max(xx,(ig33.xx).toLong); xy = math.max(xy,(ig33.xy).toLong); xz = math.max(xz,(ig33.xz).toLong); yx = math.max(yx,(ig33.yx).toLong); yy = math.max(yy,(ig33.yy).toLong); yz = math.max(yz,(ig33.yz).toLong); zx = math.max(zx,(ig33.zx).toLong); zy = math.max(zy,(ig33.zy).toLong); zz = math.max(zz,(ig33.zz).toLong); this }
    def maxEq(lg33: GMat3L): this.type = { xx = math.max(xx,lg33.xx); xy = math.max(xy,lg33.xy); xz = math.max(xz,lg33.xz); yx = math.max(yx,lg33.yx); yy = math.max(yy,lg33.yy); yz = math.max(yz,lg33.yz); zx = math.max(zx,lg33.zx); zy = math.max(zy,lg33.zy); zz = math.max(zz,lg33.zz); this }
    def maxEq(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); this }
    def maxEqCast(fg33: GMat3F): this.type = { xx = math.round(math.max((xx).toDouble,(fg33.xx).toDouble)); xy = math.round(math.max((xy).toDouble,(fg33.xy).toDouble)); xz = math.round(math.max((xz).toDouble,(fg33.xz).toDouble)); yx = math.round(math.max((yx).toDouble,(fg33.yx).toDouble)); yy = math.round(math.max((yy).toDouble,(fg33.yy).toDouble)); yz = math.round(math.max((yz).toDouble,(fg33.yz).toDouble)); zx = math.round(math.max((zx).toDouble,(fg33.zx).toDouble)); zy = math.round(math.max((zy).toDouble,(fg33.zy).toDouble)); zz = math.round(math.max((zz).toDouble,(fg33.zz).toDouble)); this }
    def maxEqCast(dg33: GMat3D): this.type = { xx = math.round(math.max((xx).toDouble,dg33.xx)); xy = math.round(math.max((xy).toDouble,dg33.xy)); xz = math.round(math.max((xz).toDouble,dg33.xz)); yx = math.round(math.max((yx).toDouble,dg33.yx)); yy = math.round(math.max((yy).toDouble,dg33.yy)); yz = math.round(math.max((yz).toDouble,dg33.yz)); zx = math.round(math.max((zx).toDouble,dg33.zx)); zy = math.round(math.max((zy).toDouble,dg33.zy)); zz = math.round(math.max((zz).toDouble,dg33.zz)); this }
    def minEq(x0: Long): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); this }
    def minEqCast(x0: Double): this.type = { xx = math.round(math.min((xx).toDouble,x0)); xy = math.round(math.min((xy).toDouble,x0)); xz = math.round(math.min((xz).toDouble,x0)); yx = math.round(math.min((yx).toDouble,x0)); yy = math.round(math.min((yy).toDouble,x0)); yz = math.round(math.min((yz).toDouble,x0)); zx = math.round(math.min((zx).toDouble,x0)); zy = math.round(math.min((zy).toDouble,x0)); zz = math.round(math.min((zz).toDouble,x0)); this }
    def minEq(sg33: GMat3S): this.type = { xx = math.min(xx,(sg33.xx).toLong); xy = math.min(xy,(sg33.xy).toLong); xz = math.min(xz,(sg33.xz).toLong); yx = math.min(yx,(sg33.yx).toLong); yy = math.min(yy,(sg33.yy).toLong); yz = math.min(yz,(sg33.yz).toLong); zx = math.min(zx,(sg33.zx).toLong); zy = math.min(zy,(sg33.zy).toLong); zz = math.min(zz,(sg33.zz).toLong); this }
    def minEq(ig33: GMat3I): this.type = { xx = math.min(xx,(ig33.xx).toLong); xy = math.min(xy,(ig33.xy).toLong); xz = math.min(xz,(ig33.xz).toLong); yx = math.min(yx,(ig33.yx).toLong); yy = math.min(yy,(ig33.yy).toLong); yz = math.min(yz,(ig33.yz).toLong); zx = math.min(zx,(ig33.zx).toLong); zy = math.min(zy,(ig33.zy).toLong); zz = math.min(zz,(ig33.zz).toLong); this }
    def minEq(lg33: GMat3L): this.type = { xx = math.min(xx,lg33.xx); xy = math.min(xy,lg33.xy); xz = math.min(xz,lg33.xz); yx = math.min(yx,lg33.yx); yy = math.min(yy,lg33.yy); yz = math.min(yz,lg33.yz); zx = math.min(zx,lg33.zx); zy = math.min(zy,lg33.zy); zz = math.min(zz,lg33.zz); this }
    def minEq(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); this }
    def minEqCast(fg33: GMat3F): this.type = { xx = math.round(math.min((xx).toDouble,(fg33.xx).toDouble)); xy = math.round(math.min((xy).toDouble,(fg33.xy).toDouble)); xz = math.round(math.min((xz).toDouble,(fg33.xz).toDouble)); yx = math.round(math.min((yx).toDouble,(fg33.yx).toDouble)); yy = math.round(math.min((yy).toDouble,(fg33.yy).toDouble)); yz = math.round(math.min((yz).toDouble,(fg33.yz).toDouble)); zx = math.round(math.min((zx).toDouble,(fg33.zx).toDouble)); zy = math.round(math.min((zy).toDouble,(fg33.zy).toDouble)); zz = math.round(math.min((zz).toDouble,(fg33.zz).toDouble)); this }
    def minEqCast(dg33: GMat3D): this.type = { xx = math.round(math.min((xx).toDouble,dg33.xx)); xy = math.round(math.min((xy).toDouble,dg33.xy)); xz = math.round(math.min((xz).toDouble,dg33.xz)); yx = math.round(math.min((yx).toDouble,dg33.yx)); yy = math.round(math.min((yy).toDouble,dg33.yy)); yz = math.round(math.min((yz).toDouble,dg33.yz)); zx = math.round(math.min((zx).toDouble,dg33.zx)); zy = math.round(math.min((zy).toDouble,dg33.zy)); zz = math.round(math.min((zz).toDouble,dg33.zz)); this }
    def operateEq(sg33: GMat3S)(fun: (Long,Long)=>Long) = { xx = fun(xx,(sg33.xx).toLong); xy = fun(xy,(sg33.xy).toLong); xz = fun(xz,(sg33.xz).toLong); yx = fun(yx,(sg33.yx).toLong); yy = fun(yy,(sg33.yy).toLong); yz = fun(yz,(sg33.yz).toLong); zx = fun(zx,(sg33.zx).toLong); zy = fun(zy,(sg33.zy).toLong); zz = fun(zz,(sg33.zz).toLong); this }
    def operateEq(ig33: GMat3I)(fun: (Long,Long)=>Long) = { xx = fun(xx,(ig33.xx).toLong); xy = fun(xy,(ig33.xy).toLong); xz = fun(xz,(ig33.xz).toLong); yx = fun(yx,(ig33.yx).toLong); yy = fun(yy,(ig33.yy).toLong); yz = fun(yz,(ig33.yz).toLong); zx = fun(zx,(ig33.zx).toLong); zy = fun(zy,(ig33.zy).toLong); zz = fun(zz,(ig33.zz).toLong); this }
    def operateEq(lg33: GMat3L)(fun: (Long,Long)=>Long) = { xx = fun(xx,lg33.xx); xy = fun(xy,lg33.xy); xz = fun(xz,lg33.xz); yx = fun(yx,lg33.yx); yy = fun(yy,lg33.yy); yz = fun(yz,lg33.yz); zx = fun(zx,lg33.zx); zy = fun(zy,lg33.zy); zz = fun(zz,lg33.zz); this }
    def operateEqCast(fg33: GMat3F)(fun: (Double,Double)=>Double) = { xx = math.round(fun((xx).toDouble,(fg33.xx).toDouble)); xy = math.round(fun((xy).toDouble,(fg33.xy).toDouble)); xz = math.round(fun((xz).toDouble,(fg33.xz).toDouble)); yx = math.round(fun((yx).toDouble,(fg33.yx).toDouble)); yy = math.round(fun((yy).toDouble,(fg33.yy).toDouble)); yz = math.round(fun((yz).toDouble,(fg33.yz).toDouble)); zx = math.round(fun((zx).toDouble,(fg33.zx).toDouble)); zy = math.round(fun((zy).toDouble,(fg33.zy).toDouble)); zz = math.round(fun((zz).toDouble,(fg33.zz).toDouble)); this }
    def operateEqCast(dg33: GMat3D)(fun: (Double,Double)=>Double) = { xx = math.round(fun((xx).toDouble,dg33.xx)); xy = math.round(fun((xy).toDouble,dg33.xy)); xz = math.round(fun((xz).toDouble,dg33.xz)); yx = math.round(fun((yx).toDouble,dg33.yx)); yy = math.round(fun((yy).toDouble,dg33.yy)); yz = math.round(fun((yz).toDouble,dg33.yz)); zx = math.round(fun((zx).toDouble,dg33.zx)); zy = math.round(fun((zy).toDouble,dg33.zy)); zz = math.round(fun((zz).toDouble,dg33.zz)); this }
    def :|~(sg3: GVec3S) = { xx = (sg3.x).toLong; xy = (sg3.x).toLong; xz = (sg3.x).toLong; yx = (sg3.y).toLong; yy = (sg3.y).toLong; yz = (sg3.y).toLong; zx = (sg3.z).toLong; zy = (sg3.z).toLong; zz = (sg3.z).toLong; this }
    def :-~(sg3: GVec3S) = { xx = (sg3.x).toLong; xy = (sg3.y).toLong; xz = (sg3.z).toLong; yx = (sg3.x).toLong; yy = (sg3.y).toLong; yz = (sg3.z).toLong; zx = (sg3.x).toLong; zy = (sg3.y).toLong; zz = (sg3.z).toLong; this }
    def :|~(ig3: GVec3I) = { xx = (ig3.x).toLong; xy = (ig3.x).toLong; xz = (ig3.x).toLong; yx = (ig3.y).toLong; yy = (ig3.y).toLong; yz = (ig3.y).toLong; zx = (ig3.z).toLong; zy = (ig3.z).toLong; zz = (ig3.z).toLong; this }
    def :-~(ig3: GVec3I) = { xx = (ig3.x).toLong; xy = (ig3.y).toLong; xz = (ig3.z).toLong; yx = (ig3.x).toLong; yy = (ig3.y).toLong; yz = (ig3.z).toLong; zx = (ig3.x).toLong; zy = (ig3.y).toLong; zz = (ig3.z).toLong; this }
    def :|~(lg3: GVec3L) = { xx = lg3.x; xy = lg3.x; xz = lg3.x; yx = lg3.y; yy = lg3.y; yz = lg3.y; zx = lg3.z; zy = lg3.z; zz = lg3.z; this }
    def :-~(lg3: GVec3L) = { xx = lg3.x; xy = lg3.y; xz = lg3.z; yx = lg3.x; yy = lg3.y; yz = lg3.z; zx = lg3.x; zy = lg3.y; zz = lg3.z; this }
    def :|~~(fg3: GVec3F) = { xx = math.round((fg3.x).toDouble); xy = math.round((fg3.x).toDouble); xz = math.round((fg3.x).toDouble); yx = math.round((fg3.y).toDouble); yy = math.round((fg3.y).toDouble); yz = math.round((fg3.y).toDouble); zx = math.round((fg3.z).toDouble); zy = math.round((fg3.z).toDouble); zz = math.round((fg3.z).toDouble); this }
    def :-~~(fg3: GVec3F) = { xx = math.round((fg3.x).toDouble); xy = math.round((fg3.y).toDouble); xz = math.round((fg3.z).toDouble); yx = math.round((fg3.x).toDouble); yy = math.round((fg3.y).toDouble); yz = math.round((fg3.z).toDouble); zx = math.round((fg3.x).toDouble); zy = math.round((fg3.y).toDouble); zz = math.round((fg3.z).toDouble); this }
    def :|~~(dg3: GVec3D) = { xx = math.round(dg3.x); xy = math.round(dg3.x); xz = math.round(dg3.x); yx = math.round(dg3.y); yy = math.round(dg3.y); yz = math.round(dg3.y); zx = math.round(dg3.z); zy = math.round(dg3.z); zz = math.round(dg3.z); this }
    def :-~~(dg3: GVec3D) = { xx = math.round(dg3.x); xy = math.round(dg3.y); xz = math.round(dg3.z); yx = math.round(dg3.x); yy = math.round(dg3.y); yz = math.round(dg3.z); zx = math.round(dg3.x); zy = math.round(dg3.y); zz = math.round(dg3.z); this }
    def **~(sg33: GMat3S) = {val xx0 = xx*(sg33.xx).toLong+xy*(sg33.yx).toLong+xz*(sg33.zx).toLong; val xy0 = xx*(sg33.xy).toLong+xy*(sg33.yy).toLong+xz*(sg33.zy).toLong; val xz0 = xx*(sg33.xz).toLong+xy*(sg33.yz).toLong+xz*(sg33.zz).toLong; val yx0 = yx*(sg33.xx).toLong+yy*(sg33.yx).toLong+yz*(sg33.zx).toLong; val yy0 = yx*(sg33.xy).toLong+yy*(sg33.yy).toLong+yz*(sg33.zy).toLong; val yz0 = yx*(sg33.xz).toLong+yy*(sg33.yz).toLong+yz*(sg33.zz).toLong; val zx0 = zx*(sg33.xx).toLong+zy*(sg33.yx).toLong+zz*(sg33.zx).toLong; val zy0 = zx*(sg33.xy).toLong+zy*(sg33.yy).toLong+zz*(sg33.zy).toLong; val zz0 = zx*(sg33.xz).toLong+zy*(sg33.yz).toLong+zz*(sg33.zz).toLong; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(ig33: GMat3I) = {val xx0 = xx*(ig33.xx).toLong+xy*(ig33.yx).toLong+xz*(ig33.zx).toLong; val xy0 = xx*(ig33.xy).toLong+xy*(ig33.yy).toLong+xz*(ig33.zy).toLong; val xz0 = xx*(ig33.xz).toLong+xy*(ig33.yz).toLong+xz*(ig33.zz).toLong; val yx0 = yx*(ig33.xx).toLong+yy*(ig33.yx).toLong+yz*(ig33.zx).toLong; val yy0 = yx*(ig33.xy).toLong+yy*(ig33.yy).toLong+yz*(ig33.zy).toLong; val yz0 = yx*(ig33.xz).toLong+yy*(ig33.yz).toLong+yz*(ig33.zz).toLong; val zx0 = zx*(ig33.xx).toLong+zy*(ig33.yx).toLong+zz*(ig33.zx).toLong; val zy0 = zx*(ig33.xy).toLong+zy*(ig33.yy).toLong+zz*(ig33.zy).toLong; val zz0 = zx*(ig33.xz).toLong+zy*(ig33.yz).toLong+zz*(ig33.zz).toLong; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(lg33: GMat3L) = {val xx0 = xx*lg33.xx+xy*lg33.yx+xz*lg33.zx; val xy0 = xx*lg33.xy+xy*lg33.yy+xz*lg33.zy; val xz0 = xx*lg33.xz+xy*lg33.yz+xz*lg33.zz; val yx0 = yx*lg33.xx+yy*lg33.yx+yz*lg33.zx; val yy0 = yx*lg33.xy+yy*lg33.yy+yz*lg33.zy; val yz0 = yx*lg33.xz+yy*lg33.yz+yz*lg33.zz; val zx0 = zx*lg33.xx+zy*lg33.yx+zz*lg33.zx; val zy0 = zx*lg33.xy+zy*lg33.yy+zz*lg33.zy; val zz0 = zx*lg33.xz+zy*lg33.yz+zz*lg33.zz; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~~(fg33: GMat3F) = {val xx0 = (xx).toDouble*(fg33.xx).toDouble+(xy).toDouble*(fg33.yx).toDouble+(xz).toDouble*(fg33.zx).toDouble; val xy0 = (xx).toDouble*(fg33.xy).toDouble+(xy).toDouble*(fg33.yy).toDouble+(xz).toDouble*(fg33.zy).toDouble; val xz0 = (xx).toDouble*(fg33.xz).toDouble+(xy).toDouble*(fg33.yz).toDouble+(xz).toDouble*(fg33.zz).toDouble; val yx0 = (yx).toDouble*(fg33.xx).toDouble+(yy).toDouble*(fg33.yx).toDouble+(yz).toDouble*(fg33.zx).toDouble; val yy0 = (yx).toDouble*(fg33.xy).toDouble+(yy).toDouble*(fg33.yy).toDouble+(yz).toDouble*(fg33.zy).toDouble; val yz0 = (yx).toDouble*(fg33.xz).toDouble+(yy).toDouble*(fg33.yz).toDouble+(yz).toDouble*(fg33.zz).toDouble; val zx0 = (zx).toDouble*(fg33.xx).toDouble+(zy).toDouble*(fg33.yx).toDouble+(zz).toDouble*(fg33.zx).toDouble; val zy0 = (zx).toDouble*(fg33.xy).toDouble+(zy).toDouble*(fg33.yy).toDouble+(zz).toDouble*(fg33.zy).toDouble; val zz0 = (zx).toDouble*(fg33.xz).toDouble+(zy).toDouble*(fg33.yz).toDouble+(zz).toDouble*(fg33.zz).toDouble; xx = math.round(xx0); xy = math.round(xy0); xz = math.round(xz0); yx = math.round(yx0); yy = math.round(yy0); yz = math.round(yz0); zx = math.round(zx0); zy = math.round(zy0); zz = math.round(zz0); this }
    def **~~(dg33: GMat3D) = {val xx0 = (xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx; val xy0 = (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy; val xz0 = (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz; val yx0 = (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx; val yy0 = (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy; val yz0 = (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz; val zx0 = (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx; val zy0 = (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy; val zz0 = (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz; xx = math.round(xx0); xy = math.round(xy0); xz = math.round(xz0); yx = math.round(yx0); yy = math.round(yy0); yz = math.round(yz0); zx = math.round(zx0); zy = math.round(zy0); zz = math.round(zz0); this }
    class RowViewX extends AVec3L { def x = xx; def x_=(x0: Long) { xx = x0 }; def y = xy; def y_=(x0: Long) { xy = x0 }; def z = xz; def z_=(x0: Long) { xz = x0 } }
    class ColViewX extends AVec3L { def x = xx; def x_=(x0: Long) { xx = x0 }; def y = yx; def y_=(x0: Long) { yx = x0 }; def z = zx; def z_=(x0: Long) { zx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec3L { def x = yx; def x_=(x0: Long) { yx = x0 }; def y = yy; def y_=(x0: Long) { yy = x0 }; def z = yz; def z_=(x0: Long) { yz = x0 } }
    class ColViewY extends AVec3L { def x = xy; def x_=(x0: Long) { xy = x0 }; def y = yy; def y_=(x0: Long) { yy = x0 }; def z = zy; def z_=(x0: Long) { zy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec3L { def x = zx; def x_=(x0: Long) { zx = x0 }; def y = zy; def y_=(x0: Long) { zy = x0 }; def z = zz; def z_=(x0: Long) { zz = x0 } }
    class ColViewZ extends AVec3L { def x = xz; def x_=(x0: Long) { xz = x0 }; def y = yz; def y_=(x0: Long) { yz = x0 }; def z = zz; def z_=(x0: Long) { zz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = yz; yz = zy; zy = temp; this }
  } // class AMat3L

  object AMat3L {
    def apply(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): AMat3L = new MMat3L(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): AMat3L = IMat3L.parse(str).mut
    def identity: AMat3L = MMat3L.identity
    def zero: AMat3L = MMat3L.zero
    def traced(lg3: GVec3L) = new MMat3L(lg3.x, 0, 0, 0, lg3.y, 0, 0, 0, lg3.z)
  } // object AMat3L


  abstract class AMat3F extends GMat3F {
    def xx_=(xx0: Float): Unit
    def xy_=(xy0: Float): Unit
    def xz_=(xz0: Float): Unit
    def yx_=(yx0: Float): Unit
    def yy_=(yy0: Float): Unit
    def yz_=(yz0: Float): Unit
    def zx_=(zx0: Float): Unit
    def zy_=(zy0: Float): Unit
    def zz_=(zz0: Float): Unit
    override def clone(): AMat3F = new MMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: AMat3S = new MMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: AMat3I = new MMat3I(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toL: AMat3L = new MMat3L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz): AMat3F = new MMat3F(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: AMat2F = new MMat2F(xx, xy, yx, yy)
    override def pad(padding: Float = 1): AMat4F = new MMat4F(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapEq(fun: Float => Float): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); yx = fun(yx); yy = fun(yy); yz = fun(yz); zx = fun(zx); zy = fun(zy); zz = fun(zz); this }
    override def toD: AMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; yx = -yx; yy = -yy; yz = -yz; zx = -zx; zy = -zy; zz = -zz; this }
    def :~~(x0: Long): this.type = { xx = (x0).toFloat; xy = (x0).toFloat; xz = (x0).toFloat; yx = (x0).toFloat; yy = (x0).toFloat; yz = (x0).toFloat; zx = (x0).toFloat; zy = (x0).toFloat; zz = (x0).toFloat; this }
    def :~(x0: Float): this.type = { xx = x0; xy = x0; xz = x0; yx = x0; yy = x0; yz = x0; zx = x0; zy = x0; zz = x0; this }
    def :~~(x0: Double): this.type = { xx = (x0).toFloat; xy = (x0).toFloat; xz = (x0).toFloat; yx = (x0).toFloat; yy = (x0).toFloat; yz = (x0).toFloat; zx = (x0).toFloat; zy = (x0).toFloat; zz = (x0).toFloat; this }
    def :~(sg33: GMat3S): this.type = { xx = (sg33.xx).toFloat; xy = (sg33.xy).toFloat; xz = (sg33.xz).toFloat; yx = (sg33.yx).toFloat; yy = (sg33.yy).toFloat; yz = (sg33.yz).toFloat; zx = (sg33.zx).toFloat; zy = (sg33.zy).toFloat; zz = (sg33.zz).toFloat; this }
    def :~(ig33: GMat3I): this.type = { xx = (ig33.xx).toFloat; xy = (ig33.xy).toFloat; xz = (ig33.xz).toFloat; yx = (ig33.yx).toFloat; yy = (ig33.yy).toFloat; yz = (ig33.yz).toFloat; zx = (ig33.zx).toFloat; zy = (ig33.zy).toFloat; zz = (ig33.zz).toFloat; this }
    def :~~(lg33: GMat3L): this.type = { xx = ((lg33.xx).toDouble).toFloat; xy = ((lg33.xy).toDouble).toFloat; xz = ((lg33.xz).toDouble).toFloat; yx = ((lg33.yx).toDouble).toFloat; yy = ((lg33.yy).toDouble).toFloat; yz = ((lg33.yz).toDouble).toFloat; zx = ((lg33.zx).toDouble).toFloat; zy = ((lg33.zy).toDouble).toFloat; zz = ((lg33.zz).toDouble).toFloat; this }
    def :~(fg33: GMat3F): this.type = { xx = fg33.xx; xy = fg33.xy; xz = fg33.xz; yx = fg33.yx; yy = fg33.yy; yz = fg33.yz; zx = fg33.zx; zy = fg33.zy; zz = fg33.zz; this }
    def :~(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): this.type = { xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def :~~(dg33: GMat3D): this.type = { xx = (dg33.xx).toFloat; xy = (dg33.xy).toFloat; xz = (dg33.xz).toFloat; yx = (dg33.yx).toFloat; yy = (dg33.yy).toFloat; yz = (dg33.yz).toFloat; zx = (dg33.zx).toFloat; zy = (dg33.zy).toFloat; zz = (dg33.zz).toFloat; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toDouble + (x0).toDouble).toFloat; xy = ((xy).toDouble + (x0).toDouble).toFloat; xz = ((xz).toDouble + (x0).toDouble).toFloat; yx = ((yx).toDouble + (x0).toDouble).toFloat; yy = ((yy).toDouble + (x0).toDouble).toFloat; yz = ((yz).toDouble + (x0).toDouble).toFloat; zx = ((zx).toDouble + (x0).toDouble).toFloat; zy = ((zy).toDouble + (x0).toDouble).toFloat; zz = ((zz).toDouble + (x0).toDouble).toFloat; this }
    def +~(x0: Float): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; this }
    def +~~(x0: Double): this.type = { xx = ((xx).toDouble + x0).toFloat; xy = ((xy).toDouble + x0).toFloat; xz = ((xz).toDouble + x0).toFloat; yx = ((yx).toDouble + x0).toFloat; yy = ((yy).toDouble + x0).toFloat; yz = ((yz).toDouble + x0).toFloat; zx = ((zx).toDouble + x0).toFloat; zy = ((zy).toDouble + x0).toFloat; zz = ((zz).toDouble + x0).toFloat; this }
    def +~(sg33: GMat3S): this.type = { xx = xx + (sg33.xx).toFloat; xy = xy + (sg33.xy).toFloat; xz = xz + (sg33.xz).toFloat; yx = yx + (sg33.yx).toFloat; yy = yy + (sg33.yy).toFloat; yz = yz + (sg33.yz).toFloat; zx = zx + (sg33.zx).toFloat; zy = zy + (sg33.zy).toFloat; zz = zz + (sg33.zz).toFloat; this }
    def +~(ig33: GMat3I): this.type = { xx = xx + (ig33.xx).toFloat; xy = xy + (ig33.xy).toFloat; xz = xz + (ig33.xz).toFloat; yx = yx + (ig33.yx).toFloat; yy = yy + (ig33.yy).toFloat; yz = yz + (ig33.yz).toFloat; zx = zx + (ig33.zx).toFloat; zy = zy + (ig33.zy).toFloat; zz = zz + (ig33.zz).toFloat; this }
    def +~~(lg33: GMat3L): this.type = { xx = ((xx).toDouble + (lg33.xx).toDouble).toFloat; xy = ((xy).toDouble + (lg33.xy).toDouble).toFloat; xz = ((xz).toDouble + (lg33.xz).toDouble).toFloat; yx = ((yx).toDouble + (lg33.yx).toDouble).toFloat; yy = ((yy).toDouble + (lg33.yy).toDouble).toFloat; yz = ((yz).toDouble + (lg33.yz).toDouble).toFloat; zx = ((zx).toDouble + (lg33.zx).toDouble).toFloat; zy = ((zy).toDouble + (lg33.zy).toDouble).toFloat; zz = ((zz).toDouble + (lg33.zz).toDouble).toFloat; this }
    def +~(fg33: GMat3F): this.type = { xx = xx + fg33.xx; xy = xy + fg33.xy; xz = xz + fg33.xz; yx = yx + fg33.yx; yy = yy + fg33.yy; yz = yz + fg33.yz; zx = zx + fg33.zx; zy = zy + fg33.zy; zz = zz + fg33.zz; this }
    def +~(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; this }
    def +~~(dg33: GMat3D): this.type = { xx = ((xx).toDouble + dg33.xx).toFloat; xy = ((xy).toDouble + dg33.xy).toFloat; xz = ((xz).toDouble + dg33.xz).toFloat; yx = ((yx).toDouble + dg33.yx).toFloat; yy = ((yy).toDouble + dg33.yy).toFloat; yz = ((yz).toDouble + dg33.yz).toFloat; zx = ((zx).toDouble + dg33.zx).toFloat; zy = ((zy).toDouble + dg33.zy).toFloat; zz = ((zz).toDouble + dg33.zz).toFloat; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toDouble - (x0).toDouble).toFloat; xy = ((xy).toDouble - (x0).toDouble).toFloat; xz = ((xz).toDouble - (x0).toDouble).toFloat; yx = ((yx).toDouble - (x0).toDouble).toFloat; yy = ((yy).toDouble - (x0).toDouble).toFloat; yz = ((yz).toDouble - (x0).toDouble).toFloat; zx = ((zx).toDouble - (x0).toDouble).toFloat; zy = ((zy).toDouble - (x0).toDouble).toFloat; zz = ((zz).toDouble - (x0).toDouble).toFloat; this }
    def -~(x0: Float): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; this }
    def -~~(x0: Double): this.type = { xx = ((xx).toDouble - x0).toFloat; xy = ((xy).toDouble - x0).toFloat; xz = ((xz).toDouble - x0).toFloat; yx = ((yx).toDouble - x0).toFloat; yy = ((yy).toDouble - x0).toFloat; yz = ((yz).toDouble - x0).toFloat; zx = ((zx).toDouble - x0).toFloat; zy = ((zy).toDouble - x0).toFloat; zz = ((zz).toDouble - x0).toFloat; this }
    def -~(sg33: GMat3S): this.type = { xx = xx - (sg33.xx).toFloat; xy = xy - (sg33.xy).toFloat; xz = xz - (sg33.xz).toFloat; yx = yx - (sg33.yx).toFloat; yy = yy - (sg33.yy).toFloat; yz = yz - (sg33.yz).toFloat; zx = zx - (sg33.zx).toFloat; zy = zy - (sg33.zy).toFloat; zz = zz - (sg33.zz).toFloat; this }
    def -~(ig33: GMat3I): this.type = { xx = xx - (ig33.xx).toFloat; xy = xy - (ig33.xy).toFloat; xz = xz - (ig33.xz).toFloat; yx = yx - (ig33.yx).toFloat; yy = yy - (ig33.yy).toFloat; yz = yz - (ig33.yz).toFloat; zx = zx - (ig33.zx).toFloat; zy = zy - (ig33.zy).toFloat; zz = zz - (ig33.zz).toFloat; this }
    def -~~(lg33: GMat3L): this.type = { xx = ((xx).toDouble - (lg33.xx).toDouble).toFloat; xy = ((xy).toDouble - (lg33.xy).toDouble).toFloat; xz = ((xz).toDouble - (lg33.xz).toDouble).toFloat; yx = ((yx).toDouble - (lg33.yx).toDouble).toFloat; yy = ((yy).toDouble - (lg33.yy).toDouble).toFloat; yz = ((yz).toDouble - (lg33.yz).toDouble).toFloat; zx = ((zx).toDouble - (lg33.zx).toDouble).toFloat; zy = ((zy).toDouble - (lg33.zy).toDouble).toFloat; zz = ((zz).toDouble - (lg33.zz).toDouble).toFloat; this }
    def -~(fg33: GMat3F): this.type = { xx = xx - fg33.xx; xy = xy - fg33.xy; xz = xz - fg33.xz; yx = yx - fg33.yx; yy = yy - fg33.yy; yz = yz - fg33.yz; zx = zx - fg33.zx; zy = zy - fg33.zy; zz = zz - fg33.zz; this }
    def -~(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; this }
    def -~~(dg33: GMat3D): this.type = { xx = ((xx).toDouble - dg33.xx).toFloat; xy = ((xy).toDouble - dg33.xy).toFloat; xz = ((xz).toDouble - dg33.xz).toFloat; yx = ((yx).toDouble - dg33.yx).toFloat; yy = ((yy).toDouble - dg33.yy).toFloat; yz = ((yz).toDouble - dg33.yz).toFloat; zx = ((zx).toDouble - dg33.zx).toFloat; zy = ((zy).toDouble - dg33.zy).toFloat; zz = ((zz).toDouble - dg33.zz).toFloat; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toDouble * (x0).toDouble).toFloat; xy = ((xy).toDouble * (x0).toDouble).toFloat; xz = ((xz).toDouble * (x0).toDouble).toFloat; yx = ((yx).toDouble * (x0).toDouble).toFloat; yy = ((yy).toDouble * (x0).toDouble).toFloat; yz = ((yz).toDouble * (x0).toDouble).toFloat; zx = ((zx).toDouble * (x0).toDouble).toFloat; zy = ((zy).toDouble * (x0).toDouble).toFloat; zz = ((zz).toDouble * (x0).toDouble).toFloat; this }
    def *~(x0: Float): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; this }
    def *~~(x0: Double): this.type = { xx = ((xx).toDouble * x0).toFloat; xy = ((xy).toDouble * x0).toFloat; xz = ((xz).toDouble * x0).toFloat; yx = ((yx).toDouble * x0).toFloat; yy = ((yy).toDouble * x0).toFloat; yz = ((yz).toDouble * x0).toFloat; zx = ((zx).toDouble * x0).toFloat; zy = ((zy).toDouble * x0).toFloat; zz = ((zz).toDouble * x0).toFloat; this }
    def *~(sg33: GMat3S): this.type = { xx = xx * (sg33.xx).toFloat; xy = xy * (sg33.xy).toFloat; xz = xz * (sg33.xz).toFloat; yx = yx * (sg33.yx).toFloat; yy = yy * (sg33.yy).toFloat; yz = yz * (sg33.yz).toFloat; zx = zx * (sg33.zx).toFloat; zy = zy * (sg33.zy).toFloat; zz = zz * (sg33.zz).toFloat; this }
    def *~(ig33: GMat3I): this.type = { xx = xx * (ig33.xx).toFloat; xy = xy * (ig33.xy).toFloat; xz = xz * (ig33.xz).toFloat; yx = yx * (ig33.yx).toFloat; yy = yy * (ig33.yy).toFloat; yz = yz * (ig33.yz).toFloat; zx = zx * (ig33.zx).toFloat; zy = zy * (ig33.zy).toFloat; zz = zz * (ig33.zz).toFloat; this }
    def *~~(lg33: GMat3L): this.type = { xx = ((xx).toDouble * (lg33.xx).toDouble).toFloat; xy = ((xy).toDouble * (lg33.xy).toDouble).toFloat; xz = ((xz).toDouble * (lg33.xz).toDouble).toFloat; yx = ((yx).toDouble * (lg33.yx).toDouble).toFloat; yy = ((yy).toDouble * (lg33.yy).toDouble).toFloat; yz = ((yz).toDouble * (lg33.yz).toDouble).toFloat; zx = ((zx).toDouble * (lg33.zx).toDouble).toFloat; zy = ((zy).toDouble * (lg33.zy).toDouble).toFloat; zz = ((zz).toDouble * (lg33.zz).toDouble).toFloat; this }
    def *~(fg33: GMat3F): this.type = { xx = xx * fg33.xx; xy = xy * fg33.xy; xz = xz * fg33.xz; yx = yx * fg33.yx; yy = yy * fg33.yy; yz = yz * fg33.yz; zx = zx * fg33.zx; zy = zy * fg33.zy; zz = zz * fg33.zz; this }
    def *~(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; this }
    def *~~(dg33: GMat3D): this.type = { xx = ((xx).toDouble * dg33.xx).toFloat; xy = ((xy).toDouble * dg33.xy).toFloat; xz = ((xz).toDouble * dg33.xz).toFloat; yx = ((yx).toDouble * dg33.yx).toFloat; yy = ((yy).toDouble * dg33.yy).toFloat; yz = ((yz).toDouble * dg33.yz).toFloat; zx = ((zx).toDouble * dg33.zx).toFloat; zy = ((zy).toDouble * dg33.zy).toFloat; zz = ((zz).toDouble * dg33.zz).toFloat; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toDouble / (x0).toDouble).toFloat; xy = ((xy).toDouble / (x0).toDouble).toFloat; xz = ((xz).toDouble / (x0).toDouble).toFloat; yx = ((yx).toDouble / (x0).toDouble).toFloat; yy = ((yy).toDouble / (x0).toDouble).toFloat; yz = ((yz).toDouble / (x0).toDouble).toFloat; zx = ((zx).toDouble / (x0).toDouble).toFloat; zy = ((zy).toDouble / (x0).toDouble).toFloat; zz = ((zz).toDouble / (x0).toDouble).toFloat; this }
    def /~(x0: Float): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; this }
    def /~~(x0: Double): this.type = { xx = ((xx).toDouble / x0).toFloat; xy = ((xy).toDouble / x0).toFloat; xz = ((xz).toDouble / x0).toFloat; yx = ((yx).toDouble / x0).toFloat; yy = ((yy).toDouble / x0).toFloat; yz = ((yz).toDouble / x0).toFloat; zx = ((zx).toDouble / x0).toFloat; zy = ((zy).toDouble / x0).toFloat; zz = ((zz).toDouble / x0).toFloat; this }
    def /~(sg33: GMat3S): this.type = { xx = xx / (sg33.xx).toFloat; xy = xy / (sg33.xy).toFloat; xz = xz / (sg33.xz).toFloat; yx = yx / (sg33.yx).toFloat; yy = yy / (sg33.yy).toFloat; yz = yz / (sg33.yz).toFloat; zx = zx / (sg33.zx).toFloat; zy = zy / (sg33.zy).toFloat; zz = zz / (sg33.zz).toFloat; this }
    def /~(ig33: GMat3I): this.type = { xx = xx / (ig33.xx).toFloat; xy = xy / (ig33.xy).toFloat; xz = xz / (ig33.xz).toFloat; yx = yx / (ig33.yx).toFloat; yy = yy / (ig33.yy).toFloat; yz = yz / (ig33.yz).toFloat; zx = zx / (ig33.zx).toFloat; zy = zy / (ig33.zy).toFloat; zz = zz / (ig33.zz).toFloat; this }
    def /~~(lg33: GMat3L): this.type = { xx = ((xx).toDouble / (lg33.xx).toDouble).toFloat; xy = ((xy).toDouble / (lg33.xy).toDouble).toFloat; xz = ((xz).toDouble / (lg33.xz).toDouble).toFloat; yx = ((yx).toDouble / (lg33.yx).toDouble).toFloat; yy = ((yy).toDouble / (lg33.yy).toDouble).toFloat; yz = ((yz).toDouble / (lg33.yz).toDouble).toFloat; zx = ((zx).toDouble / (lg33.zx).toDouble).toFloat; zy = ((zy).toDouble / (lg33.zy).toDouble).toFloat; zz = ((zz).toDouble / (lg33.zz).toDouble).toFloat; this }
    def /~(fg33: GMat3F): this.type = { xx = xx / fg33.xx; xy = xy / fg33.xy; xz = xz / fg33.xz; yx = yx / fg33.yx; yy = yy / fg33.yy; yz = yz / fg33.yz; zx = zx / fg33.zx; zy = zy / fg33.zy; zz = zz / fg33.zz; this }
    def /~(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; this }
    def /~~(dg33: GMat3D): this.type = { xx = ((xx).toDouble / dg33.xx).toFloat; xy = ((xy).toDouble / dg33.xy).toFloat; xz = ((xz).toDouble / dg33.xz).toFloat; yx = ((yx).toDouble / dg33.yx).toFloat; yy = ((yy).toDouble / dg33.yy).toFloat; yz = ((yz).toDouble / dg33.yz).toFloat; zx = ((zx).toDouble / dg33.zx).toFloat; zy = ((zy).toDouble / dg33.zy).toFloat; zz = ((zz).toDouble / dg33.zz).toFloat; this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toDouble,(x0).toDouble)).toFloat; xy = (math.max((xy).toDouble,(x0).toDouble)).toFloat; xz = (math.max((xz).toDouble,(x0).toDouble)).toFloat; yx = (math.max((yx).toDouble,(x0).toDouble)).toFloat; yy = (math.max((yy).toDouble,(x0).toDouble)).toFloat; yz = (math.max((yz).toDouble,(x0).toDouble)).toFloat; zx = (math.max((zx).toDouble,(x0).toDouble)).toFloat; zy = (math.max((zy).toDouble,(x0).toDouble)).toFloat; zz = (math.max((zz).toDouble,(x0).toDouble)).toFloat; this }
    def maxEq(x0: Float): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); this }
    def maxEqCast(x0: Double): this.type = { xx = (math.max((xx).toDouble,x0)).toFloat; xy = (math.max((xy).toDouble,x0)).toFloat; xz = (math.max((xz).toDouble,x0)).toFloat; yx = (math.max((yx).toDouble,x0)).toFloat; yy = (math.max((yy).toDouble,x0)).toFloat; yz = (math.max((yz).toDouble,x0)).toFloat; zx = (math.max((zx).toDouble,x0)).toFloat; zy = (math.max((zy).toDouble,x0)).toFloat; zz = (math.max((zz).toDouble,x0)).toFloat; this }
    def maxEq(sg33: GMat3S): this.type = { xx = math.max(xx,(sg33.xx).toFloat); xy = math.max(xy,(sg33.xy).toFloat); xz = math.max(xz,(sg33.xz).toFloat); yx = math.max(yx,(sg33.yx).toFloat); yy = math.max(yy,(sg33.yy).toFloat); yz = math.max(yz,(sg33.yz).toFloat); zx = math.max(zx,(sg33.zx).toFloat); zy = math.max(zy,(sg33.zy).toFloat); zz = math.max(zz,(sg33.zz).toFloat); this }
    def maxEq(ig33: GMat3I): this.type = { xx = math.max(xx,(ig33.xx).toFloat); xy = math.max(xy,(ig33.xy).toFloat); xz = math.max(xz,(ig33.xz).toFloat); yx = math.max(yx,(ig33.yx).toFloat); yy = math.max(yy,(ig33.yy).toFloat); yz = math.max(yz,(ig33.yz).toFloat); zx = math.max(zx,(ig33.zx).toFloat); zy = math.max(zy,(ig33.zy).toFloat); zz = math.max(zz,(ig33.zz).toFloat); this }
    def maxEqCast(lg33: GMat3L): this.type = { xx = (math.max((xx).toDouble,(lg33.xx).toDouble)).toFloat; xy = (math.max((xy).toDouble,(lg33.xy).toDouble)).toFloat; xz = (math.max((xz).toDouble,(lg33.xz).toDouble)).toFloat; yx = (math.max((yx).toDouble,(lg33.yx).toDouble)).toFloat; yy = (math.max((yy).toDouble,(lg33.yy).toDouble)).toFloat; yz = (math.max((yz).toDouble,(lg33.yz).toDouble)).toFloat; zx = (math.max((zx).toDouble,(lg33.zx).toDouble)).toFloat; zy = (math.max((zy).toDouble,(lg33.zy).toDouble)).toFloat; zz = (math.max((zz).toDouble,(lg33.zz).toDouble)).toFloat; this }
    def maxEq(fg33: GMat3F): this.type = { xx = math.max(xx,fg33.xx); xy = math.max(xy,fg33.xy); xz = math.max(xz,fg33.xz); yx = math.max(yx,fg33.yx); yy = math.max(yy,fg33.yy); yz = math.max(yz,fg33.yz); zx = math.max(zx,fg33.zx); zy = math.max(zy,fg33.zy); zz = math.max(zz,fg33.zz); this }
    def maxEq(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); this }
    def maxEqCast(dg33: GMat3D): this.type = { xx = (math.max((xx).toDouble,dg33.xx)).toFloat; xy = (math.max((xy).toDouble,dg33.xy)).toFloat; xz = (math.max((xz).toDouble,dg33.xz)).toFloat; yx = (math.max((yx).toDouble,dg33.yx)).toFloat; yy = (math.max((yy).toDouble,dg33.yy)).toFloat; yz = (math.max((yz).toDouble,dg33.yz)).toFloat; zx = (math.max((zx).toDouble,dg33.zx)).toFloat; zy = (math.max((zy).toDouble,dg33.zy)).toFloat; zz = (math.max((zz).toDouble,dg33.zz)).toFloat; this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toDouble,(x0).toDouble)).toFloat; xy = (math.min((xy).toDouble,(x0).toDouble)).toFloat; xz = (math.min((xz).toDouble,(x0).toDouble)).toFloat; yx = (math.min((yx).toDouble,(x0).toDouble)).toFloat; yy = (math.min((yy).toDouble,(x0).toDouble)).toFloat; yz = (math.min((yz).toDouble,(x0).toDouble)).toFloat; zx = (math.min((zx).toDouble,(x0).toDouble)).toFloat; zy = (math.min((zy).toDouble,(x0).toDouble)).toFloat; zz = (math.min((zz).toDouble,(x0).toDouble)).toFloat; this }
    def minEq(x0: Float): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); this }
    def minEqCast(x0: Double): this.type = { xx = (math.min((xx).toDouble,x0)).toFloat; xy = (math.min((xy).toDouble,x0)).toFloat; xz = (math.min((xz).toDouble,x0)).toFloat; yx = (math.min((yx).toDouble,x0)).toFloat; yy = (math.min((yy).toDouble,x0)).toFloat; yz = (math.min((yz).toDouble,x0)).toFloat; zx = (math.min((zx).toDouble,x0)).toFloat; zy = (math.min((zy).toDouble,x0)).toFloat; zz = (math.min((zz).toDouble,x0)).toFloat; this }
    def minEq(sg33: GMat3S): this.type = { xx = math.min(xx,(sg33.xx).toFloat); xy = math.min(xy,(sg33.xy).toFloat); xz = math.min(xz,(sg33.xz).toFloat); yx = math.min(yx,(sg33.yx).toFloat); yy = math.min(yy,(sg33.yy).toFloat); yz = math.min(yz,(sg33.yz).toFloat); zx = math.min(zx,(sg33.zx).toFloat); zy = math.min(zy,(sg33.zy).toFloat); zz = math.min(zz,(sg33.zz).toFloat); this }
    def minEq(ig33: GMat3I): this.type = { xx = math.min(xx,(ig33.xx).toFloat); xy = math.min(xy,(ig33.xy).toFloat); xz = math.min(xz,(ig33.xz).toFloat); yx = math.min(yx,(ig33.yx).toFloat); yy = math.min(yy,(ig33.yy).toFloat); yz = math.min(yz,(ig33.yz).toFloat); zx = math.min(zx,(ig33.zx).toFloat); zy = math.min(zy,(ig33.zy).toFloat); zz = math.min(zz,(ig33.zz).toFloat); this }
    def minEqCast(lg33: GMat3L): this.type = { xx = (math.min((xx).toDouble,(lg33.xx).toDouble)).toFloat; xy = (math.min((xy).toDouble,(lg33.xy).toDouble)).toFloat; xz = (math.min((xz).toDouble,(lg33.xz).toDouble)).toFloat; yx = (math.min((yx).toDouble,(lg33.yx).toDouble)).toFloat; yy = (math.min((yy).toDouble,(lg33.yy).toDouble)).toFloat; yz = (math.min((yz).toDouble,(lg33.yz).toDouble)).toFloat; zx = (math.min((zx).toDouble,(lg33.zx).toDouble)).toFloat; zy = (math.min((zy).toDouble,(lg33.zy).toDouble)).toFloat; zz = (math.min((zz).toDouble,(lg33.zz).toDouble)).toFloat; this }
    def minEq(fg33: GMat3F): this.type = { xx = math.min(xx,fg33.xx); xy = math.min(xy,fg33.xy); xz = math.min(xz,fg33.xz); yx = math.min(yx,fg33.yx); yy = math.min(yy,fg33.yy); yz = math.min(yz,fg33.yz); zx = math.min(zx,fg33.zx); zy = math.min(zy,fg33.zy); zz = math.min(zz,fg33.zz); this }
    def minEq(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); this }
    def minEqCast(dg33: GMat3D): this.type = { xx = (math.min((xx).toDouble,dg33.xx)).toFloat; xy = (math.min((xy).toDouble,dg33.xy)).toFloat; xz = (math.min((xz).toDouble,dg33.xz)).toFloat; yx = (math.min((yx).toDouble,dg33.yx)).toFloat; yy = (math.min((yy).toDouble,dg33.yy)).toFloat; yz = (math.min((yz).toDouble,dg33.yz)).toFloat; zx = (math.min((zx).toDouble,dg33.zx)).toFloat; zy = (math.min((zy).toDouble,dg33.zy)).toFloat; zz = (math.min((zz).toDouble,dg33.zz)).toFloat; this }
    def operateEq(sg33: GMat3S)(fun: (Float,Float)=>Float) = { xx = fun(xx,(sg33.xx).toFloat); xy = fun(xy,(sg33.xy).toFloat); xz = fun(xz,(sg33.xz).toFloat); yx = fun(yx,(sg33.yx).toFloat); yy = fun(yy,(sg33.yy).toFloat); yz = fun(yz,(sg33.yz).toFloat); zx = fun(zx,(sg33.zx).toFloat); zy = fun(zy,(sg33.zy).toFloat); zz = fun(zz,(sg33.zz).toFloat); this }
    def operateEq(ig33: GMat3I)(fun: (Float,Float)=>Float) = { xx = fun(xx,(ig33.xx).toFloat); xy = fun(xy,(ig33.xy).toFloat); xz = fun(xz,(ig33.xz).toFloat); yx = fun(yx,(ig33.yx).toFloat); yy = fun(yy,(ig33.yy).toFloat); yz = fun(yz,(ig33.yz).toFloat); zx = fun(zx,(ig33.zx).toFloat); zy = fun(zy,(ig33.zy).toFloat); zz = fun(zz,(ig33.zz).toFloat); this }
    def operateEqCast(lg33: GMat3L)(fun: (Double,Double)=>Double) = { xx = (fun((xx).toDouble,(lg33.xx).toDouble)).toFloat; xy = (fun((xy).toDouble,(lg33.xy).toDouble)).toFloat; xz = (fun((xz).toDouble,(lg33.xz).toDouble)).toFloat; yx = (fun((yx).toDouble,(lg33.yx).toDouble)).toFloat; yy = (fun((yy).toDouble,(lg33.yy).toDouble)).toFloat; yz = (fun((yz).toDouble,(lg33.yz).toDouble)).toFloat; zx = (fun((zx).toDouble,(lg33.zx).toDouble)).toFloat; zy = (fun((zy).toDouble,(lg33.zy).toDouble)).toFloat; zz = (fun((zz).toDouble,(lg33.zz).toDouble)).toFloat; this }
    def operateEq(fg33: GMat3F)(fun: (Float,Float)=>Float) = { xx = fun(xx,fg33.xx); xy = fun(xy,fg33.xy); xz = fun(xz,fg33.xz); yx = fun(yx,fg33.yx); yy = fun(yy,fg33.yy); yz = fun(yz,fg33.yz); zx = fun(zx,fg33.zx); zy = fun(zy,fg33.zy); zz = fun(zz,fg33.zz); this }
    def operateEqCast(dg33: GMat3D)(fun: (Double,Double)=>Double) = { xx = (fun((xx).toDouble,dg33.xx)).toFloat; xy = (fun((xy).toDouble,dg33.xy)).toFloat; xz = (fun((xz).toDouble,dg33.xz)).toFloat; yx = (fun((yx).toDouble,dg33.yx)).toFloat; yy = (fun((yy).toDouble,dg33.yy)).toFloat; yz = (fun((yz).toDouble,dg33.yz)).toFloat; zx = (fun((zx).toDouble,dg33.zx)).toFloat; zy = (fun((zy).toDouble,dg33.zy)).toFloat; zz = (fun((zz).toDouble,dg33.zz)).toFloat; this }
    def :|~(sg3: GVec3S) = { xx = (sg3.x).toFloat; xy = (sg3.x).toFloat; xz = (sg3.x).toFloat; yx = (sg3.y).toFloat; yy = (sg3.y).toFloat; yz = (sg3.y).toFloat; zx = (sg3.z).toFloat; zy = (sg3.z).toFloat; zz = (sg3.z).toFloat; this }
    def :-~(sg3: GVec3S) = { xx = (sg3.x).toFloat; xy = (sg3.y).toFloat; xz = (sg3.z).toFloat; yx = (sg3.x).toFloat; yy = (sg3.y).toFloat; yz = (sg3.z).toFloat; zx = (sg3.x).toFloat; zy = (sg3.y).toFloat; zz = (sg3.z).toFloat; this }
    def :|~(ig3: GVec3I) = { xx = (ig3.x).toFloat; xy = (ig3.x).toFloat; xz = (ig3.x).toFloat; yx = (ig3.y).toFloat; yy = (ig3.y).toFloat; yz = (ig3.y).toFloat; zx = (ig3.z).toFloat; zy = (ig3.z).toFloat; zz = (ig3.z).toFloat; this }
    def :-~(ig3: GVec3I) = { xx = (ig3.x).toFloat; xy = (ig3.y).toFloat; xz = (ig3.z).toFloat; yx = (ig3.x).toFloat; yy = (ig3.y).toFloat; yz = (ig3.z).toFloat; zx = (ig3.x).toFloat; zy = (ig3.y).toFloat; zz = (ig3.z).toFloat; this }
    def :|~~(lg3: GVec3L) = { xx = (lg3.x).toFloat; xy = (lg3.x).toFloat; xz = (lg3.x).toFloat; yx = (lg3.y).toFloat; yy = (lg3.y).toFloat; yz = (lg3.y).toFloat; zx = (lg3.z).toFloat; zy = (lg3.z).toFloat; zz = (lg3.z).toFloat; this }
    def :-~~(lg3: GVec3L) = { xx = (lg3.x).toFloat; xy = (lg3.y).toFloat; xz = (lg3.z).toFloat; yx = (lg3.x).toFloat; yy = (lg3.y).toFloat; yz = (lg3.z).toFloat; zx = (lg3.x).toFloat; zy = (lg3.y).toFloat; zz = (lg3.z).toFloat; this }
    def :|~(fg3: GVec3F) = { xx = fg3.x; xy = fg3.x; xz = fg3.x; yx = fg3.y; yy = fg3.y; yz = fg3.y; zx = fg3.z; zy = fg3.z; zz = fg3.z; this }
    def :-~(fg3: GVec3F) = { xx = fg3.x; xy = fg3.y; xz = fg3.z; yx = fg3.x; yy = fg3.y; yz = fg3.z; zx = fg3.x; zy = fg3.y; zz = fg3.z; this }
    def :|~~(dg3: GVec3D) = { xx = (dg3.x).toFloat; xy = (dg3.x).toFloat; xz = (dg3.x).toFloat; yx = (dg3.y).toFloat; yy = (dg3.y).toFloat; yz = (dg3.y).toFloat; zx = (dg3.z).toFloat; zy = (dg3.z).toFloat; zz = (dg3.z).toFloat; this }
    def :-~~(dg3: GVec3D) = { xx = (dg3.x).toFloat; xy = (dg3.y).toFloat; xz = (dg3.z).toFloat; yx = (dg3.x).toFloat; yy = (dg3.y).toFloat; yz = (dg3.z).toFloat; zx = (dg3.x).toFloat; zy = (dg3.y).toFloat; zz = (dg3.z).toFloat; this }
    def **~(sg33: GMat3S) = {val xx0 = xx*(sg33.xx).toFloat+xy*(sg33.yx).toFloat+xz*(sg33.zx).toFloat; val xy0 = xx*(sg33.xy).toFloat+xy*(sg33.yy).toFloat+xz*(sg33.zy).toFloat; val xz0 = xx*(sg33.xz).toFloat+xy*(sg33.yz).toFloat+xz*(sg33.zz).toFloat; val yx0 = yx*(sg33.xx).toFloat+yy*(sg33.yx).toFloat+yz*(sg33.zx).toFloat; val yy0 = yx*(sg33.xy).toFloat+yy*(sg33.yy).toFloat+yz*(sg33.zy).toFloat; val yz0 = yx*(sg33.xz).toFloat+yy*(sg33.yz).toFloat+yz*(sg33.zz).toFloat; val zx0 = zx*(sg33.xx).toFloat+zy*(sg33.yx).toFloat+zz*(sg33.zx).toFloat; val zy0 = zx*(sg33.xy).toFloat+zy*(sg33.yy).toFloat+zz*(sg33.zy).toFloat; val zz0 = zx*(sg33.xz).toFloat+zy*(sg33.yz).toFloat+zz*(sg33.zz).toFloat; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(ig33: GMat3I) = {val xx0 = xx*(ig33.xx).toFloat+xy*(ig33.yx).toFloat+xz*(ig33.zx).toFloat; val xy0 = xx*(ig33.xy).toFloat+xy*(ig33.yy).toFloat+xz*(ig33.zy).toFloat; val xz0 = xx*(ig33.xz).toFloat+xy*(ig33.yz).toFloat+xz*(ig33.zz).toFloat; val yx0 = yx*(ig33.xx).toFloat+yy*(ig33.yx).toFloat+yz*(ig33.zx).toFloat; val yy0 = yx*(ig33.xy).toFloat+yy*(ig33.yy).toFloat+yz*(ig33.zy).toFloat; val yz0 = yx*(ig33.xz).toFloat+yy*(ig33.yz).toFloat+yz*(ig33.zz).toFloat; val zx0 = zx*(ig33.xx).toFloat+zy*(ig33.yx).toFloat+zz*(ig33.zx).toFloat; val zy0 = zx*(ig33.xy).toFloat+zy*(ig33.yy).toFloat+zz*(ig33.zy).toFloat; val zz0 = zx*(ig33.xz).toFloat+zy*(ig33.yz).toFloat+zz*(ig33.zz).toFloat; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~~(lg33: GMat3L) = {val xx0 = (xx).toDouble*(lg33.xx).toDouble+(xy).toDouble*(lg33.yx).toDouble+(xz).toDouble*(lg33.zx).toDouble; val xy0 = (xx).toDouble*(lg33.xy).toDouble+(xy).toDouble*(lg33.yy).toDouble+(xz).toDouble*(lg33.zy).toDouble; val xz0 = (xx).toDouble*(lg33.xz).toDouble+(xy).toDouble*(lg33.yz).toDouble+(xz).toDouble*(lg33.zz).toDouble; val yx0 = (yx).toDouble*(lg33.xx).toDouble+(yy).toDouble*(lg33.yx).toDouble+(yz).toDouble*(lg33.zx).toDouble; val yy0 = (yx).toDouble*(lg33.xy).toDouble+(yy).toDouble*(lg33.yy).toDouble+(yz).toDouble*(lg33.zy).toDouble; val yz0 = (yx).toDouble*(lg33.xz).toDouble+(yy).toDouble*(lg33.yz).toDouble+(yz).toDouble*(lg33.zz).toDouble; val zx0 = (zx).toDouble*(lg33.xx).toDouble+(zy).toDouble*(lg33.yx).toDouble+(zz).toDouble*(lg33.zx).toDouble; val zy0 = (zx).toDouble*(lg33.xy).toDouble+(zy).toDouble*(lg33.yy).toDouble+(zz).toDouble*(lg33.zy).toDouble; val zz0 = (zx).toDouble*(lg33.xz).toDouble+(zy).toDouble*(lg33.yz).toDouble+(zz).toDouble*(lg33.zz).toDouble; xx = (xx0).toFloat; xy = (xy0).toFloat; xz = (xz0).toFloat; yx = (yx0).toFloat; yy = (yy0).toFloat; yz = (yz0).toFloat; zx = (zx0).toFloat; zy = (zy0).toFloat; zz = (zz0).toFloat; this }
    def **~(fg33: GMat3F) = {val xx0 = xx*fg33.xx+xy*fg33.yx+xz*fg33.zx; val xy0 = xx*fg33.xy+xy*fg33.yy+xz*fg33.zy; val xz0 = xx*fg33.xz+xy*fg33.yz+xz*fg33.zz; val yx0 = yx*fg33.xx+yy*fg33.yx+yz*fg33.zx; val yy0 = yx*fg33.xy+yy*fg33.yy+yz*fg33.zy; val yz0 = yx*fg33.xz+yy*fg33.yz+yz*fg33.zz; val zx0 = zx*fg33.xx+zy*fg33.yx+zz*fg33.zx; val zy0 = zx*fg33.xy+zy*fg33.yy+zz*fg33.zy; val zz0 = zx*fg33.xz+zy*fg33.yz+zz*fg33.zz; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~~(dg33: GMat3D) = {val xx0 = (xx).toDouble*dg33.xx+(xy).toDouble*dg33.yx+(xz).toDouble*dg33.zx; val xy0 = (xx).toDouble*dg33.xy+(xy).toDouble*dg33.yy+(xz).toDouble*dg33.zy; val xz0 = (xx).toDouble*dg33.xz+(xy).toDouble*dg33.yz+(xz).toDouble*dg33.zz; val yx0 = (yx).toDouble*dg33.xx+(yy).toDouble*dg33.yx+(yz).toDouble*dg33.zx; val yy0 = (yx).toDouble*dg33.xy+(yy).toDouble*dg33.yy+(yz).toDouble*dg33.zy; val yz0 = (yx).toDouble*dg33.xz+(yy).toDouble*dg33.yz+(yz).toDouble*dg33.zz; val zx0 = (zx).toDouble*dg33.xx+(zy).toDouble*dg33.yx+(zz).toDouble*dg33.zx; val zy0 = (zx).toDouble*dg33.xy+(zy).toDouble*dg33.yy+(zz).toDouble*dg33.zy; val zz0 = (zx).toDouble*dg33.xz+(zy).toDouble*dg33.yz+(zz).toDouble*dg33.zz; xx = (xx0).toFloat; xy = (xy0).toFloat; xz = (xz0).toFloat; yx = (yx0).toFloat; yy = (yy0).toFloat; yz = (yz0).toFloat; zx = (zx0).toFloat; zy = (zy0).toFloat; zz = (zz0).toFloat; this }
    def gaussJordanEq(fg33: GMat3F): this.type = {var xx0 = fg33.xx; var xy0 = fg33.xy; var xz0 = fg33.xz; var yx0 = fg33.yx; var yy0 = fg33.yy; var yz0 = fg33.yz; var zx0 = fg33.zx; var zy0 = fg33.zy; var zz0 = fg33.zz; if (math.abs(xx) < math.abs(yx)) {if (math.abs(yx) < math.abs(zx)) {val i33=1/zx; zx=xx; xx=1; var t33=xy; xy=zy*i33; zy=t33; t33=xz; xz=zz*i33; zz=t33; t33=xx0; xx0=zx0*i33; zx0=t33; t33=xy0; xy0=zy0*i33; zy0=t33; t33=xz0; xz0=zz0*i33; zz0=t33} else {val i32=1/yx; yx=xx; xx=1; var t32=xy; xy=yy*i32; yy=t32; t32=xz; xz=yz*i32; yz=t32; t32=xx0; xx0=yx0*i32; yx0=t32; t32=xy0; xy0=yy0*i32; yy0=t32; t32=xz0; xz0=yz0*i32; yz0=t32}} else {if (math.abs(xx) < math.abs(zx)) {val i33=1/zx; zx=xx; xx=1; var t33=xy; xy=zy*i33; zy=t33; t33=xz; xz=zz*i33; zz=t33; t33=xx0; xx0=zx0*i33; zx0=t33; t33=xy0; xy0=zy0*i33; zy0=t33; t33=xz0; xz0=zz0*i33; zz0=t33} else {val i31=1/xx; xx=1; xy=xy*i31; xz=xz*i31; xx0*=i31; xy0*=i31; xz0*=i31}}; { { val j32=yx/xx; yx=0; yy=yy-xy*j32; yz=yz-xz*j32; yx0-=xx0*j32; yy0-=xy0*j32; yz0-=xz0*j32}; { val j33=zx/xx; zx=0; zy=zy-xy*j33; zz=zz-xz*j33; zx0-=xx0*j33; zy0-=xy0*j33; zz0-=xz0*j33} }; if (math.abs(yy) < math.abs(zy)) {val i22=1/zy; zy=yy; yy=1; var t22=yz; yz=zz*i22; zz=t22; t22=yx0; yx0=zx0*i22; zx0=t22; t22=yy0; yy0=zy0*i22; zy0=t22; t22=yz0; yz0=zz0*i22; zz0=t22} else {val i21=1/yy; yy=1; yz=yz*i21; yx0*=i21; yy0*=i21; yz0*=i21}; { val j22=zy/yy; zy=0; zz=zz-yz*j22; zx0-=yx0*j22; zy0-=yy0*j22; zz0-=yz0*j22}; { val i10=1/zz; zz=1; zx0*=i10; zy0*=i10; zz0*=i10 }; yx0-=yz*zx0; yy0-=yz*zy0; yz0-=yz*zz0; xx0-=xz*zx0; xy0-=xz*zy0; xz0-=xz*zz0; xx0-=xy*yx0; xy0-=xy*yy0; xz0-=xy*yz0; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    class RowViewX extends AVec3F { def x = xx; def x_=(x0: Float) { xx = x0 }; def y = xy; def y_=(x0: Float) { xy = x0 }; def z = xz; def z_=(x0: Float) { xz = x0 } }
    class ColViewX extends AVec3F { def x = xx; def x_=(x0: Float) { xx = x0 }; def y = yx; def y_=(x0: Float) { yx = x0 }; def z = zx; def z_=(x0: Float) { zx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec3F { def x = yx; def x_=(x0: Float) { yx = x0 }; def y = yy; def y_=(x0: Float) { yy = x0 }; def z = yz; def z_=(x0: Float) { yz = x0 } }
    class ColViewY extends AVec3F { def x = xy; def x_=(x0: Float) { xy = x0 }; def y = yy; def y_=(x0: Float) { yy = x0 }; def z = zy; def z_=(x0: Float) { zy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec3F { def x = zx; def x_=(x0: Float) { zx = x0 }; def y = zy; def y_=(x0: Float) { zy = x0 }; def z = zz; def z_=(x0: Float) { zz = x0 } }
    class ColViewZ extends AVec3F { def x = xz; def x_=(x0: Float) { xz = x0 }; def y = yz; def y_=(x0: Float) { yz = x0 }; def z = zz; def z_=(x0: Float) { zz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = yz; yz = zy; zy = temp; this }
    def invEq: this.type = { val idet = 1/det; val xx0 = idet*(yy*zz - yz*zy); val xy0 = idet*(zy*xz - zz*xy); val xz0 = idet*(xy*yz - xz*yy); val yx0 = idet*(yz*zx - yx*zz); val yy0 = idet*(zz*xx - zx*xz); val yz0 = idet*(xz*yx - xx*yz); val zx0 = idet*(yx*zy - yy*zx); val zy0 = idet*(zx*xy - zy*xx); val zz0 = idet*(xx*yy - xy*yx); zz = zz0; zy = zy0; zx = zx0; yz = yz0; yy = yy0; yx = yx0; xz = xz0; xy = xy0; xx = xx0; this }
  } // class AMat3F

  object AMat3F {
    def apply(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): AMat3F = new MMat3F(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): AMat3F = IMat3F.parse(str).mut
    def xRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat3F(1, 0, 0, 0, (c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat) }
    def yRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat3F((c).toFloat, 0, (s).toFloat, 0, 1, 0, (-s).toFloat, 0, (c).toFloat) }
    def zRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat3F((c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat, 0, 0, 0, 1) }
    def rotation(axis: GVec3F, theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; val fact = 1/axis.len; new MMat3F((c + axis.x*axis.x*fact*fact*(1-c)).toFloat, (axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s).toFloat, (axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s).toFloat, (c + axis.y*axis.y*fact*fact*(1-c)).toFloat, (axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s).toFloat, (axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s).toFloat, (c + axis.z*axis.z*fact*fact*(1-c)).toFloat) }
    def identity: AMat3F = MMat3F.identity
    def zero: AMat3F = MMat3F.zero
    def traced(fg3: GVec3F) = new MMat3F(fg3.x, 0, 0, 0, fg3.y, 0, 0, 0, fg3.z)
  } // object AMat3F


  abstract class AMat3D extends GMat3D {
    def xx_=(xx0: Double): Unit
    def xy_=(xy0: Double): Unit
    def xz_=(xz0: Double): Unit
    def yx_=(yx0: Double): Unit
    def yy_=(yy0: Double): Unit
    def yz_=(yz0: Double): Unit
    def zx_=(zx0: Double): Unit
    def zy_=(zy0: Double): Unit
    def zz_=(zz0: Double): Unit
    override def clone(): AMat3D = new MMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: AMat3S = new MMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: AMat3I = new MMat3I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt)
    override def toL: AMat3L = new MMat3L(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toF: AMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz): AMat3D = new MMat3D(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: AMat2D = new MMat2D(xx, xy, yx, yy)
    override def pad(padding: Double = 1): AMat4D = new MMat4D(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    def mapEq(fun: Double => Double): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); yx = fun(yx); yy = fun(yy); yz = fun(yz); zx = fun(zx); zy = fun(zy); zz = fun(zz); this }
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; yx = -yx; yy = -yy; yz = -yz; zx = -zx; zy = -zy; zz = -zz; this }
    def :~(x0: Double): this.type = { xx = x0; xy = x0; xz = x0; yx = x0; yy = x0; yz = x0; zx = x0; zy = x0; zz = x0; this }
    def :~(sg33: GMat3S): this.type = { xx = (sg33.xx).toDouble; xy = (sg33.xy).toDouble; xz = (sg33.xz).toDouble; yx = (sg33.yx).toDouble; yy = (sg33.yy).toDouble; yz = (sg33.yz).toDouble; zx = (sg33.zx).toDouble; zy = (sg33.zy).toDouble; zz = (sg33.zz).toDouble; this }
    def :~(ig33: GMat3I): this.type = { xx = (ig33.xx).toDouble; xy = (ig33.xy).toDouble; xz = (ig33.xz).toDouble; yx = (ig33.yx).toDouble; yy = (ig33.yy).toDouble; yz = (ig33.yz).toDouble; zx = (ig33.zx).toDouble; zy = (ig33.zy).toDouble; zz = (ig33.zz).toDouble; this }
    def :~(lg33: GMat3L): this.type = { xx = (lg33.xx).toDouble; xy = (lg33.xy).toDouble; xz = (lg33.xz).toDouble; yx = (lg33.yx).toDouble; yy = (lg33.yy).toDouble; yz = (lg33.yz).toDouble; zx = (lg33.zx).toDouble; zy = (lg33.zy).toDouble; zz = (lg33.zz).toDouble; this }
    def :~(fg33: GMat3F): this.type = { xx = (fg33.xx).toDouble; xy = (fg33.xy).toDouble; xz = (fg33.xz).toDouble; yx = (fg33.yx).toDouble; yy = (fg33.yy).toDouble; yz = (fg33.yz).toDouble; zx = (fg33.zx).toDouble; zy = (fg33.zy).toDouble; zz = (fg33.zz).toDouble; this }
    def :~(dg33: GMat3D): this.type = { xx = dg33.xx; xy = dg33.xy; xz = dg33.xz; yx = dg33.yx; yy = dg33.yy; yz = dg33.yz; zx = dg33.zx; zy = dg33.zy; zz = dg33.zz; this }
    def :~(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): this.type = { xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def +~(x0: Double): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; this }
    def +~(sg33: GMat3S): this.type = { xx = xx + (sg33.xx).toDouble; xy = xy + (sg33.xy).toDouble; xz = xz + (sg33.xz).toDouble; yx = yx + (sg33.yx).toDouble; yy = yy + (sg33.yy).toDouble; yz = yz + (sg33.yz).toDouble; zx = zx + (sg33.zx).toDouble; zy = zy + (sg33.zy).toDouble; zz = zz + (sg33.zz).toDouble; this }
    def +~(ig33: GMat3I): this.type = { xx = xx + (ig33.xx).toDouble; xy = xy + (ig33.xy).toDouble; xz = xz + (ig33.xz).toDouble; yx = yx + (ig33.yx).toDouble; yy = yy + (ig33.yy).toDouble; yz = yz + (ig33.yz).toDouble; zx = zx + (ig33.zx).toDouble; zy = zy + (ig33.zy).toDouble; zz = zz + (ig33.zz).toDouble; this }
    def +~(lg33: GMat3L): this.type = { xx = xx + (lg33.xx).toDouble; xy = xy + (lg33.xy).toDouble; xz = xz + (lg33.xz).toDouble; yx = yx + (lg33.yx).toDouble; yy = yy + (lg33.yy).toDouble; yz = yz + (lg33.yz).toDouble; zx = zx + (lg33.zx).toDouble; zy = zy + (lg33.zy).toDouble; zz = zz + (lg33.zz).toDouble; this }
    def +~(fg33: GMat3F): this.type = { xx = xx + (fg33.xx).toDouble; xy = xy + (fg33.xy).toDouble; xz = xz + (fg33.xz).toDouble; yx = yx + (fg33.yx).toDouble; yy = yy + (fg33.yy).toDouble; yz = yz + (fg33.yz).toDouble; zx = zx + (fg33.zx).toDouble; zy = zy + (fg33.zy).toDouble; zz = zz + (fg33.zz).toDouble; this }
    def +~(dg33: GMat3D): this.type = { xx = xx + dg33.xx; xy = xy + dg33.xy; xz = xz + dg33.xz; yx = yx + dg33.yx; yy = yy + dg33.yy; yz = yz + dg33.yz; zx = zx + dg33.zx; zy = zy + dg33.zy; zz = zz + dg33.zz; this }
    def +~(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; this }
    def -~(x0: Double): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; this }
    def -~(sg33: GMat3S): this.type = { xx = xx - (sg33.xx).toDouble; xy = xy - (sg33.xy).toDouble; xz = xz - (sg33.xz).toDouble; yx = yx - (sg33.yx).toDouble; yy = yy - (sg33.yy).toDouble; yz = yz - (sg33.yz).toDouble; zx = zx - (sg33.zx).toDouble; zy = zy - (sg33.zy).toDouble; zz = zz - (sg33.zz).toDouble; this }
    def -~(ig33: GMat3I): this.type = { xx = xx - (ig33.xx).toDouble; xy = xy - (ig33.xy).toDouble; xz = xz - (ig33.xz).toDouble; yx = yx - (ig33.yx).toDouble; yy = yy - (ig33.yy).toDouble; yz = yz - (ig33.yz).toDouble; zx = zx - (ig33.zx).toDouble; zy = zy - (ig33.zy).toDouble; zz = zz - (ig33.zz).toDouble; this }
    def -~(lg33: GMat3L): this.type = { xx = xx - (lg33.xx).toDouble; xy = xy - (lg33.xy).toDouble; xz = xz - (lg33.xz).toDouble; yx = yx - (lg33.yx).toDouble; yy = yy - (lg33.yy).toDouble; yz = yz - (lg33.yz).toDouble; zx = zx - (lg33.zx).toDouble; zy = zy - (lg33.zy).toDouble; zz = zz - (lg33.zz).toDouble; this }
    def -~(fg33: GMat3F): this.type = { xx = xx - (fg33.xx).toDouble; xy = xy - (fg33.xy).toDouble; xz = xz - (fg33.xz).toDouble; yx = yx - (fg33.yx).toDouble; yy = yy - (fg33.yy).toDouble; yz = yz - (fg33.yz).toDouble; zx = zx - (fg33.zx).toDouble; zy = zy - (fg33.zy).toDouble; zz = zz - (fg33.zz).toDouble; this }
    def -~(dg33: GMat3D): this.type = { xx = xx - dg33.xx; xy = xy - dg33.xy; xz = xz - dg33.xz; yx = yx - dg33.yx; yy = yy - dg33.yy; yz = yz - dg33.yz; zx = zx - dg33.zx; zy = zy - dg33.zy; zz = zz - dg33.zz; this }
    def -~(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; this }
    def *~(x0: Double): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; this }
    def *~(sg33: GMat3S): this.type = { xx = xx * (sg33.xx).toDouble; xy = xy * (sg33.xy).toDouble; xz = xz * (sg33.xz).toDouble; yx = yx * (sg33.yx).toDouble; yy = yy * (sg33.yy).toDouble; yz = yz * (sg33.yz).toDouble; zx = zx * (sg33.zx).toDouble; zy = zy * (sg33.zy).toDouble; zz = zz * (sg33.zz).toDouble; this }
    def *~(ig33: GMat3I): this.type = { xx = xx * (ig33.xx).toDouble; xy = xy * (ig33.xy).toDouble; xz = xz * (ig33.xz).toDouble; yx = yx * (ig33.yx).toDouble; yy = yy * (ig33.yy).toDouble; yz = yz * (ig33.yz).toDouble; zx = zx * (ig33.zx).toDouble; zy = zy * (ig33.zy).toDouble; zz = zz * (ig33.zz).toDouble; this }
    def *~(lg33: GMat3L): this.type = { xx = xx * (lg33.xx).toDouble; xy = xy * (lg33.xy).toDouble; xz = xz * (lg33.xz).toDouble; yx = yx * (lg33.yx).toDouble; yy = yy * (lg33.yy).toDouble; yz = yz * (lg33.yz).toDouble; zx = zx * (lg33.zx).toDouble; zy = zy * (lg33.zy).toDouble; zz = zz * (lg33.zz).toDouble; this }
    def *~(fg33: GMat3F): this.type = { xx = xx * (fg33.xx).toDouble; xy = xy * (fg33.xy).toDouble; xz = xz * (fg33.xz).toDouble; yx = yx * (fg33.yx).toDouble; yy = yy * (fg33.yy).toDouble; yz = yz * (fg33.yz).toDouble; zx = zx * (fg33.zx).toDouble; zy = zy * (fg33.zy).toDouble; zz = zz * (fg33.zz).toDouble; this }
    def *~(dg33: GMat3D): this.type = { xx = xx * dg33.xx; xy = xy * dg33.xy; xz = xz * dg33.xz; yx = yx * dg33.yx; yy = yy * dg33.yy; yz = yz * dg33.yz; zx = zx * dg33.zx; zy = zy * dg33.zy; zz = zz * dg33.zz; this }
    def *~(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; this }
    def /~(x0: Double): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; this }
    def /~(sg33: GMat3S): this.type = { xx = xx / (sg33.xx).toDouble; xy = xy / (sg33.xy).toDouble; xz = xz / (sg33.xz).toDouble; yx = yx / (sg33.yx).toDouble; yy = yy / (sg33.yy).toDouble; yz = yz / (sg33.yz).toDouble; zx = zx / (sg33.zx).toDouble; zy = zy / (sg33.zy).toDouble; zz = zz / (sg33.zz).toDouble; this }
    def /~(ig33: GMat3I): this.type = { xx = xx / (ig33.xx).toDouble; xy = xy / (ig33.xy).toDouble; xz = xz / (ig33.xz).toDouble; yx = yx / (ig33.yx).toDouble; yy = yy / (ig33.yy).toDouble; yz = yz / (ig33.yz).toDouble; zx = zx / (ig33.zx).toDouble; zy = zy / (ig33.zy).toDouble; zz = zz / (ig33.zz).toDouble; this }
    def /~(lg33: GMat3L): this.type = { xx = xx / (lg33.xx).toDouble; xy = xy / (lg33.xy).toDouble; xz = xz / (lg33.xz).toDouble; yx = yx / (lg33.yx).toDouble; yy = yy / (lg33.yy).toDouble; yz = yz / (lg33.yz).toDouble; zx = zx / (lg33.zx).toDouble; zy = zy / (lg33.zy).toDouble; zz = zz / (lg33.zz).toDouble; this }
    def /~(fg33: GMat3F): this.type = { xx = xx / (fg33.xx).toDouble; xy = xy / (fg33.xy).toDouble; xz = xz / (fg33.xz).toDouble; yx = yx / (fg33.yx).toDouble; yy = yy / (fg33.yy).toDouble; yz = yz / (fg33.yz).toDouble; zx = zx / (fg33.zx).toDouble; zy = zy / (fg33.zy).toDouble; zz = zz / (fg33.zz).toDouble; this }
    def /~(dg33: GMat3D): this.type = { xx = xx / dg33.xx; xy = xy / dg33.xy; xz = xz / dg33.xz; yx = yx / dg33.yx; yy = yy / dg33.yy; yz = yz / dg33.yz; zx = zx / dg33.zx; zy = zy / dg33.zy; zz = zz / dg33.zz; this }
    def /~(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; this }
    def maxEq(x0: Double): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); this }
    def maxEq(sg33: GMat3S): this.type = { xx = math.max(xx,(sg33.xx).toDouble); xy = math.max(xy,(sg33.xy).toDouble); xz = math.max(xz,(sg33.xz).toDouble); yx = math.max(yx,(sg33.yx).toDouble); yy = math.max(yy,(sg33.yy).toDouble); yz = math.max(yz,(sg33.yz).toDouble); zx = math.max(zx,(sg33.zx).toDouble); zy = math.max(zy,(sg33.zy).toDouble); zz = math.max(zz,(sg33.zz).toDouble); this }
    def maxEq(ig33: GMat3I): this.type = { xx = math.max(xx,(ig33.xx).toDouble); xy = math.max(xy,(ig33.xy).toDouble); xz = math.max(xz,(ig33.xz).toDouble); yx = math.max(yx,(ig33.yx).toDouble); yy = math.max(yy,(ig33.yy).toDouble); yz = math.max(yz,(ig33.yz).toDouble); zx = math.max(zx,(ig33.zx).toDouble); zy = math.max(zy,(ig33.zy).toDouble); zz = math.max(zz,(ig33.zz).toDouble); this }
    def maxEq(lg33: GMat3L): this.type = { xx = math.max(xx,(lg33.xx).toDouble); xy = math.max(xy,(lg33.xy).toDouble); xz = math.max(xz,(lg33.xz).toDouble); yx = math.max(yx,(lg33.yx).toDouble); yy = math.max(yy,(lg33.yy).toDouble); yz = math.max(yz,(lg33.yz).toDouble); zx = math.max(zx,(lg33.zx).toDouble); zy = math.max(zy,(lg33.zy).toDouble); zz = math.max(zz,(lg33.zz).toDouble); this }
    def maxEq(fg33: GMat3F): this.type = { xx = math.max(xx,(fg33.xx).toDouble); xy = math.max(xy,(fg33.xy).toDouble); xz = math.max(xz,(fg33.xz).toDouble); yx = math.max(yx,(fg33.yx).toDouble); yy = math.max(yy,(fg33.yy).toDouble); yz = math.max(yz,(fg33.yz).toDouble); zx = math.max(zx,(fg33.zx).toDouble); zy = math.max(zy,(fg33.zy).toDouble); zz = math.max(zz,(fg33.zz).toDouble); this }
    def maxEq(dg33: GMat3D): this.type = { xx = math.max(xx,dg33.xx); xy = math.max(xy,dg33.xy); xz = math.max(xz,dg33.xz); yx = math.max(yx,dg33.yx); yy = math.max(yy,dg33.yy); yz = math.max(yz,dg33.yz); zx = math.max(zx,dg33.zx); zy = math.max(zy,dg33.zy); zz = math.max(zz,dg33.zz); this }
    def maxEq(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); this }
    def minEq(x0: Double): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); this }
    def minEq(sg33: GMat3S): this.type = { xx = math.min(xx,(sg33.xx).toDouble); xy = math.min(xy,(sg33.xy).toDouble); xz = math.min(xz,(sg33.xz).toDouble); yx = math.min(yx,(sg33.yx).toDouble); yy = math.min(yy,(sg33.yy).toDouble); yz = math.min(yz,(sg33.yz).toDouble); zx = math.min(zx,(sg33.zx).toDouble); zy = math.min(zy,(sg33.zy).toDouble); zz = math.min(zz,(sg33.zz).toDouble); this }
    def minEq(ig33: GMat3I): this.type = { xx = math.min(xx,(ig33.xx).toDouble); xy = math.min(xy,(ig33.xy).toDouble); xz = math.min(xz,(ig33.xz).toDouble); yx = math.min(yx,(ig33.yx).toDouble); yy = math.min(yy,(ig33.yy).toDouble); yz = math.min(yz,(ig33.yz).toDouble); zx = math.min(zx,(ig33.zx).toDouble); zy = math.min(zy,(ig33.zy).toDouble); zz = math.min(zz,(ig33.zz).toDouble); this }
    def minEq(lg33: GMat3L): this.type = { xx = math.min(xx,(lg33.xx).toDouble); xy = math.min(xy,(lg33.xy).toDouble); xz = math.min(xz,(lg33.xz).toDouble); yx = math.min(yx,(lg33.yx).toDouble); yy = math.min(yy,(lg33.yy).toDouble); yz = math.min(yz,(lg33.yz).toDouble); zx = math.min(zx,(lg33.zx).toDouble); zy = math.min(zy,(lg33.zy).toDouble); zz = math.min(zz,(lg33.zz).toDouble); this }
    def minEq(fg33: GMat3F): this.type = { xx = math.min(xx,(fg33.xx).toDouble); xy = math.min(xy,(fg33.xy).toDouble); xz = math.min(xz,(fg33.xz).toDouble); yx = math.min(yx,(fg33.yx).toDouble); yy = math.min(yy,(fg33.yy).toDouble); yz = math.min(yz,(fg33.yz).toDouble); zx = math.min(zx,(fg33.zx).toDouble); zy = math.min(zy,(fg33.zy).toDouble); zz = math.min(zz,(fg33.zz).toDouble); this }
    def minEq(dg33: GMat3D): this.type = { xx = math.min(xx,dg33.xx); xy = math.min(xy,dg33.xy); xz = math.min(xz,dg33.xz); yx = math.min(yx,dg33.yx); yy = math.min(yy,dg33.yy); yz = math.min(yz,dg33.yz); zx = math.min(zx,dg33.zx); zy = math.min(zy,dg33.zy); zz = math.min(zz,dg33.zz); this }
    def minEq(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); this }
    def operateEq(sg33: GMat3S)(fun: (Double,Double)=>Double) = { xx = fun(xx,(sg33.xx).toDouble); xy = fun(xy,(sg33.xy).toDouble); xz = fun(xz,(sg33.xz).toDouble); yx = fun(yx,(sg33.yx).toDouble); yy = fun(yy,(sg33.yy).toDouble); yz = fun(yz,(sg33.yz).toDouble); zx = fun(zx,(sg33.zx).toDouble); zy = fun(zy,(sg33.zy).toDouble); zz = fun(zz,(sg33.zz).toDouble); this }
    def operateEq(ig33: GMat3I)(fun: (Double,Double)=>Double) = { xx = fun(xx,(ig33.xx).toDouble); xy = fun(xy,(ig33.xy).toDouble); xz = fun(xz,(ig33.xz).toDouble); yx = fun(yx,(ig33.yx).toDouble); yy = fun(yy,(ig33.yy).toDouble); yz = fun(yz,(ig33.yz).toDouble); zx = fun(zx,(ig33.zx).toDouble); zy = fun(zy,(ig33.zy).toDouble); zz = fun(zz,(ig33.zz).toDouble); this }
    def operateEq(lg33: GMat3L)(fun: (Double,Double)=>Double) = { xx = fun(xx,(lg33.xx).toDouble); xy = fun(xy,(lg33.xy).toDouble); xz = fun(xz,(lg33.xz).toDouble); yx = fun(yx,(lg33.yx).toDouble); yy = fun(yy,(lg33.yy).toDouble); yz = fun(yz,(lg33.yz).toDouble); zx = fun(zx,(lg33.zx).toDouble); zy = fun(zy,(lg33.zy).toDouble); zz = fun(zz,(lg33.zz).toDouble); this }
    def operateEq(fg33: GMat3F)(fun: (Double,Double)=>Double) = { xx = fun(xx,(fg33.xx).toDouble); xy = fun(xy,(fg33.xy).toDouble); xz = fun(xz,(fg33.xz).toDouble); yx = fun(yx,(fg33.yx).toDouble); yy = fun(yy,(fg33.yy).toDouble); yz = fun(yz,(fg33.yz).toDouble); zx = fun(zx,(fg33.zx).toDouble); zy = fun(zy,(fg33.zy).toDouble); zz = fun(zz,(fg33.zz).toDouble); this }
    def operateEq(dg33: GMat3D)(fun: (Double,Double)=>Double) = { xx = fun(xx,dg33.xx); xy = fun(xy,dg33.xy); xz = fun(xz,dg33.xz); yx = fun(yx,dg33.yx); yy = fun(yy,dg33.yy); yz = fun(yz,dg33.yz); zx = fun(zx,dg33.zx); zy = fun(zy,dg33.zy); zz = fun(zz,dg33.zz); this }
    def :|~(sg3: GVec3S) = { xx = (sg3.x).toDouble; xy = (sg3.x).toDouble; xz = (sg3.x).toDouble; yx = (sg3.y).toDouble; yy = (sg3.y).toDouble; yz = (sg3.y).toDouble; zx = (sg3.z).toDouble; zy = (sg3.z).toDouble; zz = (sg3.z).toDouble; this }
    def :-~(sg3: GVec3S) = { xx = (sg3.x).toDouble; xy = (sg3.y).toDouble; xz = (sg3.z).toDouble; yx = (sg3.x).toDouble; yy = (sg3.y).toDouble; yz = (sg3.z).toDouble; zx = (sg3.x).toDouble; zy = (sg3.y).toDouble; zz = (sg3.z).toDouble; this }
    def :|~(ig3: GVec3I) = { xx = (ig3.x).toDouble; xy = (ig3.x).toDouble; xz = (ig3.x).toDouble; yx = (ig3.y).toDouble; yy = (ig3.y).toDouble; yz = (ig3.y).toDouble; zx = (ig3.z).toDouble; zy = (ig3.z).toDouble; zz = (ig3.z).toDouble; this }
    def :-~(ig3: GVec3I) = { xx = (ig3.x).toDouble; xy = (ig3.y).toDouble; xz = (ig3.z).toDouble; yx = (ig3.x).toDouble; yy = (ig3.y).toDouble; yz = (ig3.z).toDouble; zx = (ig3.x).toDouble; zy = (ig3.y).toDouble; zz = (ig3.z).toDouble; this }
    def :|~(lg3: GVec3L) = { xx = (lg3.x).toDouble; xy = (lg3.x).toDouble; xz = (lg3.x).toDouble; yx = (lg3.y).toDouble; yy = (lg3.y).toDouble; yz = (lg3.y).toDouble; zx = (lg3.z).toDouble; zy = (lg3.z).toDouble; zz = (lg3.z).toDouble; this }
    def :-~(lg3: GVec3L) = { xx = (lg3.x).toDouble; xy = (lg3.y).toDouble; xz = (lg3.z).toDouble; yx = (lg3.x).toDouble; yy = (lg3.y).toDouble; yz = (lg3.z).toDouble; zx = (lg3.x).toDouble; zy = (lg3.y).toDouble; zz = (lg3.z).toDouble; this }
    def :|~(fg3: GVec3F) = { xx = (fg3.x).toDouble; xy = (fg3.x).toDouble; xz = (fg3.x).toDouble; yx = (fg3.y).toDouble; yy = (fg3.y).toDouble; yz = (fg3.y).toDouble; zx = (fg3.z).toDouble; zy = (fg3.z).toDouble; zz = (fg3.z).toDouble; this }
    def :-~(fg3: GVec3F) = { xx = (fg3.x).toDouble; xy = (fg3.y).toDouble; xz = (fg3.z).toDouble; yx = (fg3.x).toDouble; yy = (fg3.y).toDouble; yz = (fg3.z).toDouble; zx = (fg3.x).toDouble; zy = (fg3.y).toDouble; zz = (fg3.z).toDouble; this }
    def :|~(dg3: GVec3D) = { xx = dg3.x; xy = dg3.x; xz = dg3.x; yx = dg3.y; yy = dg3.y; yz = dg3.y; zx = dg3.z; zy = dg3.z; zz = dg3.z; this }
    def :-~(dg3: GVec3D) = { xx = dg3.x; xy = dg3.y; xz = dg3.z; yx = dg3.x; yy = dg3.y; yz = dg3.z; zx = dg3.x; zy = dg3.y; zz = dg3.z; this }
    def **~(sg33: GMat3S) = {val xx0 = xx*(sg33.xx).toDouble+xy*(sg33.yx).toDouble+xz*(sg33.zx).toDouble; val xy0 = xx*(sg33.xy).toDouble+xy*(sg33.yy).toDouble+xz*(sg33.zy).toDouble; val xz0 = xx*(sg33.xz).toDouble+xy*(sg33.yz).toDouble+xz*(sg33.zz).toDouble; val yx0 = yx*(sg33.xx).toDouble+yy*(sg33.yx).toDouble+yz*(sg33.zx).toDouble; val yy0 = yx*(sg33.xy).toDouble+yy*(sg33.yy).toDouble+yz*(sg33.zy).toDouble; val yz0 = yx*(sg33.xz).toDouble+yy*(sg33.yz).toDouble+yz*(sg33.zz).toDouble; val zx0 = zx*(sg33.xx).toDouble+zy*(sg33.yx).toDouble+zz*(sg33.zx).toDouble; val zy0 = zx*(sg33.xy).toDouble+zy*(sg33.yy).toDouble+zz*(sg33.zy).toDouble; val zz0 = zx*(sg33.xz).toDouble+zy*(sg33.yz).toDouble+zz*(sg33.zz).toDouble; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(ig33: GMat3I) = {val xx0 = xx*(ig33.xx).toDouble+xy*(ig33.yx).toDouble+xz*(ig33.zx).toDouble; val xy0 = xx*(ig33.xy).toDouble+xy*(ig33.yy).toDouble+xz*(ig33.zy).toDouble; val xz0 = xx*(ig33.xz).toDouble+xy*(ig33.yz).toDouble+xz*(ig33.zz).toDouble; val yx0 = yx*(ig33.xx).toDouble+yy*(ig33.yx).toDouble+yz*(ig33.zx).toDouble; val yy0 = yx*(ig33.xy).toDouble+yy*(ig33.yy).toDouble+yz*(ig33.zy).toDouble; val yz0 = yx*(ig33.xz).toDouble+yy*(ig33.yz).toDouble+yz*(ig33.zz).toDouble; val zx0 = zx*(ig33.xx).toDouble+zy*(ig33.yx).toDouble+zz*(ig33.zx).toDouble; val zy0 = zx*(ig33.xy).toDouble+zy*(ig33.yy).toDouble+zz*(ig33.zy).toDouble; val zz0 = zx*(ig33.xz).toDouble+zy*(ig33.yz).toDouble+zz*(ig33.zz).toDouble; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(lg33: GMat3L) = {val xx0 = xx*(lg33.xx).toDouble+xy*(lg33.yx).toDouble+xz*(lg33.zx).toDouble; val xy0 = xx*(lg33.xy).toDouble+xy*(lg33.yy).toDouble+xz*(lg33.zy).toDouble; val xz0 = xx*(lg33.xz).toDouble+xy*(lg33.yz).toDouble+xz*(lg33.zz).toDouble; val yx0 = yx*(lg33.xx).toDouble+yy*(lg33.yx).toDouble+yz*(lg33.zx).toDouble; val yy0 = yx*(lg33.xy).toDouble+yy*(lg33.yy).toDouble+yz*(lg33.zy).toDouble; val yz0 = yx*(lg33.xz).toDouble+yy*(lg33.yz).toDouble+yz*(lg33.zz).toDouble; val zx0 = zx*(lg33.xx).toDouble+zy*(lg33.yx).toDouble+zz*(lg33.zx).toDouble; val zy0 = zx*(lg33.xy).toDouble+zy*(lg33.yy).toDouble+zz*(lg33.zy).toDouble; val zz0 = zx*(lg33.xz).toDouble+zy*(lg33.yz).toDouble+zz*(lg33.zz).toDouble; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(fg33: GMat3F) = {val xx0 = xx*(fg33.xx).toDouble+xy*(fg33.yx).toDouble+xz*(fg33.zx).toDouble; val xy0 = xx*(fg33.xy).toDouble+xy*(fg33.yy).toDouble+xz*(fg33.zy).toDouble; val xz0 = xx*(fg33.xz).toDouble+xy*(fg33.yz).toDouble+xz*(fg33.zz).toDouble; val yx0 = yx*(fg33.xx).toDouble+yy*(fg33.yx).toDouble+yz*(fg33.zx).toDouble; val yy0 = yx*(fg33.xy).toDouble+yy*(fg33.yy).toDouble+yz*(fg33.zy).toDouble; val yz0 = yx*(fg33.xz).toDouble+yy*(fg33.yz).toDouble+yz*(fg33.zz).toDouble; val zx0 = zx*(fg33.xx).toDouble+zy*(fg33.yx).toDouble+zz*(fg33.zx).toDouble; val zy0 = zx*(fg33.xy).toDouble+zy*(fg33.yy).toDouble+zz*(fg33.zy).toDouble; val zz0 = zx*(fg33.xz).toDouble+zy*(fg33.yz).toDouble+zz*(fg33.zz).toDouble; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def **~(dg33: GMat3D) = {val xx0 = xx*dg33.xx+xy*dg33.yx+xz*dg33.zx; val xy0 = xx*dg33.xy+xy*dg33.yy+xz*dg33.zy; val xz0 = xx*dg33.xz+xy*dg33.yz+xz*dg33.zz; val yx0 = yx*dg33.xx+yy*dg33.yx+yz*dg33.zx; val yy0 = yx*dg33.xy+yy*dg33.yy+yz*dg33.zy; val yz0 = yx*dg33.xz+yy*dg33.yz+yz*dg33.zz; val zx0 = zx*dg33.xx+zy*dg33.yx+zz*dg33.zx; val zy0 = zx*dg33.xy+zy*dg33.yy+zz*dg33.zy; val zz0 = zx*dg33.xz+zy*dg33.yz+zz*dg33.zz; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    def gaussJordanEq(dg33: GMat3D): this.type = {var xx0 = dg33.xx; var xy0 = dg33.xy; var xz0 = dg33.xz; var yx0 = dg33.yx; var yy0 = dg33.yy; var yz0 = dg33.yz; var zx0 = dg33.zx; var zy0 = dg33.zy; var zz0 = dg33.zz; if (math.abs(xx) < math.abs(yx)) {if (math.abs(yx) < math.abs(zx)) {val i33=1/zx; zx=xx; xx=1; var t33=xy; xy=zy*i33; zy=t33; t33=xz; xz=zz*i33; zz=t33; t33=xx0; xx0=zx0*i33; zx0=t33; t33=xy0; xy0=zy0*i33; zy0=t33; t33=xz0; xz0=zz0*i33; zz0=t33} else {val i32=1/yx; yx=xx; xx=1; var t32=xy; xy=yy*i32; yy=t32; t32=xz; xz=yz*i32; yz=t32; t32=xx0; xx0=yx0*i32; yx0=t32; t32=xy0; xy0=yy0*i32; yy0=t32; t32=xz0; xz0=yz0*i32; yz0=t32}} else {if (math.abs(xx) < math.abs(zx)) {val i33=1/zx; zx=xx; xx=1; var t33=xy; xy=zy*i33; zy=t33; t33=xz; xz=zz*i33; zz=t33; t33=xx0; xx0=zx0*i33; zx0=t33; t33=xy0; xy0=zy0*i33; zy0=t33; t33=xz0; xz0=zz0*i33; zz0=t33} else {val i31=1/xx; xx=1; xy=xy*i31; xz=xz*i31; xx0*=i31; xy0*=i31; xz0*=i31}}; { { val j32=yx/xx; yx=0; yy=yy-xy*j32; yz=yz-xz*j32; yx0-=xx0*j32; yy0-=xy0*j32; yz0-=xz0*j32}; { val j33=zx/xx; zx=0; zy=zy-xy*j33; zz=zz-xz*j33; zx0-=xx0*j33; zy0-=xy0*j33; zz0-=xz0*j33} }; if (math.abs(yy) < math.abs(zy)) {val i22=1/zy; zy=yy; yy=1; var t22=yz; yz=zz*i22; zz=t22; t22=yx0; yx0=zx0*i22; zx0=t22; t22=yy0; yy0=zy0*i22; zy0=t22; t22=yz0; yz0=zz0*i22; zz0=t22} else {val i21=1/yy; yy=1; yz=yz*i21; yx0*=i21; yy0*=i21; yz0*=i21}; { val j22=zy/yy; zy=0; zz=zz-yz*j22; zx0-=yx0*j22; zy0-=yy0*j22; zz0-=yz0*j22}; { val i10=1/zz; zz=1; zx0*=i10; zy0*=i10; zz0*=i10 }; yx0-=yz*zx0; yy0-=yz*zy0; yz0-=yz*zz0; xx0-=xz*zx0; xy0-=xz*zy0; xz0-=xz*zz0; xx0-=xy*yx0; xy0-=xy*yy0; xz0-=xy*yz0; xx = xx0; xy = xy0; xz = xz0; yx = yx0; yy = yy0; yz = yz0; zx = zx0; zy = zy0; zz = zz0; this }
    class RowViewX extends AVec3D { def x = xx; def x_=(x0: Double) { xx = x0 }; def y = xy; def y_=(x0: Double) { xy = x0 }; def z = xz; def z_=(x0: Double) { xz = x0 } }
    class ColViewX extends AVec3D { def x = xx; def x_=(x0: Double) { xx = x0 }; def y = yx; def y_=(x0: Double) { yx = x0 }; def z = zx; def z_=(x0: Double) { zx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec3D { def x = yx; def x_=(x0: Double) { yx = x0 }; def y = yy; def y_=(x0: Double) { yy = x0 }; def z = yz; def z_=(x0: Double) { yz = x0 } }
    class ColViewY extends AVec3D { def x = xy; def x_=(x0: Double) { xy = x0 }; def y = yy; def y_=(x0: Double) { yy = x0 }; def z = zy; def z_=(x0: Double) { zy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec3D { def x = zx; def x_=(x0: Double) { zx = x0 }; def y = zy; def y_=(x0: Double) { zy = x0 }; def z = zz; def z_=(x0: Double) { zz = x0 } }
    class ColViewZ extends AVec3D { def x = xz; def x_=(x0: Double) { xz = x0 }; def y = yz; def y_=(x0: Double) { yz = x0 }; def z = zz; def z_=(x0: Double) { zz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = yz; yz = zy; zy = temp; this }
    def invEq: this.type = { val idet = 1/det; val xx0 = idet*(yy*zz - yz*zy); val xy0 = idet*(zy*xz - zz*xy); val xz0 = idet*(xy*yz - xz*yy); val yx0 = idet*(yz*zx - yx*zz); val yy0 = idet*(zz*xx - zx*xz); val yz0 = idet*(xz*yx - xx*yz); val zx0 = idet*(yx*zy - yy*zx); val zy0 = idet*(zx*xy - zy*xx); val zz0 = idet*(xx*yy - xy*yx); zz = zz0; zy = zy0; zx = zx0; yz = yz0; yy = yy0; yx = yx0; xz = xz0; xy = xy0; xx = xx0; this }
  } // class AMat3D

  object AMat3D {
    def apply(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): AMat3D = new MMat3D(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): AMat3D = IMat3D.parse(str).mut
    def xRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat3D(1, 0, 0, 0, c, -s, 0, s, c) }
    def yRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat3D(c, 0, s, 0, 1, 0, -s, 0, c) }
    def zRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat3D(c, -s, 0, s, c, 0, 0, 0, 1) }
    def rotation(axis: GVec3D, theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); val fact = 1/axis.len; new MMat3D(c + axis.x*axis.x*fact*fact*(1-c), axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s, axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s, axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s, c + axis.y*axis.y*fact*fact*(1-c), axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s, axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s, axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s, c + axis.z*axis.z*fact*fact*(1-c)) }
    def identity: AMat3D = MMat3D.identity
    def zero: AMat3D = MMat3D.zero
    def traced(dg3: GVec3D) = new MMat3D(dg3.x, 0, 0, 0, dg3.y, 0, 0, 0, dg3.z)
  } // object AMat3D


  final class MMat3S(var xx: Short, var xy: Short, var xz: Short, var yx: Short, var yy: Short, var yz: Short, var zx: Short, var zy: Short, var zz: Short) extends AMat3S {
    override def clone(): MMat3S = new MMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz): MMat3S = new MMat3S(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: MMat2S = new MMat2S(xx, xy, yx, yy)
    override def pad(padding: Short = 1): MMat4S = new MMat4S(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    override def toI: MMat3I = new MMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def toL: MMat3L = new MMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class MMat3S

  object MMat3S {
    def apply(xx0: Short, xy0: Short, xz0: Short, yx0: Short, yy0: Short, yz0: Short, zx0: Short, zy0: Short, zz0: Short): MMat3S = new MMat3S(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): MMat3S = IMat3S.parse(str).mut
    def identity = new MMat3S(1, 0, 0, 0, 1, 0, 0, 0, 1)
    def zero = new MMat3S(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(sg3: GVec3S) = new MMat3S(sg3.x, 0, 0, 0, sg3.y, 0, 0, 0, sg3.z)
  } // object MMat3S


  final class MMat3I(var xx: Int, var xy: Int, var xz: Int, var yx: Int, var yy: Int, var yz: Int, var zx: Int, var zy: Int, var zz: Int) extends AMat3I {
    override def clone(): MMat3I = new MMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: MMat3S = new MMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz): MMat3I = new MMat3I(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: MMat2I = new MMat2I(xx, xy, yx, yy)
    override def pad(padding: Int = 1): MMat4I = new MMat4I(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    override def toL: MMat3L = new MMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class MMat3I

  object MMat3I {
    def apply(xx0: Int, xy0: Int, xz0: Int, yx0: Int, yy0: Int, yz0: Int, zx0: Int, zy0: Int, zz0: Int): MMat3I = new MMat3I(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): MMat3I = IMat3I.parse(str).mut
    def identity = new MMat3I(1, 0, 0, 0, 1, 0, 0, 0, 1)
    def zero = new MMat3I(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(ig3: GVec3I) = new MMat3I(ig3.x, 0, 0, 0, ig3.y, 0, 0, 0, ig3.z)
  } // object MMat3I


  final class MMat3L(var xx: Long, var xy: Long, var xz: Long, var yx: Long, var yy: Long, var yz: Long, var zx: Long, var zy: Long, var zz: Long) extends AMat3L {
    override def clone(): MMat3L = new MMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: MMat3S = new MMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def toI: MMat3I = new MMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz): MMat3L = new MMat3L(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: MMat2L = new MMat2L(xx, xy, yx, yy)
    override def pad(padding: Long = 1): MMat4L = new MMat4L(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class MMat3L

  object MMat3L {
    def apply(xx0: Long, xy0: Long, xz0: Long, yx0: Long, yy0: Long, yz0: Long, zx0: Long, zy0: Long, zz0: Long): MMat3L = new MMat3L(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): MMat3L = IMat3L.parse(str).mut
    def identity = new MMat3L(1, 0, 0, 0, 1, 0, 0, 0, 1)
    def zero = new MMat3L(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(lg3: GVec3L) = new MMat3L(lg3.x, 0, 0, 0, lg3.y, 0, 0, 0, lg3.z)
  } // object MMat3L


  final class MMat3F(var xx: Float, var xy: Float, var xz: Float, var yx: Float, var yy: Float, var yz: Float, var zx: Float, var zy: Float, var zz: Float) extends AMat3F {
    override def clone(): MMat3F = new MMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: MMat3S = new MMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: MMat3I = new MMat3I(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toL: MMat3L = new MMat3L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz): MMat3F = new MMat3F(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: MMat2F = new MMat2F(xx, xy, yx, yy)
    override def pad(padding: Float = 1): MMat4F = new MMat4F(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class MMat3F

  object MMat3F {
    def apply(xx0: Float, xy0: Float, xz0: Float, yx0: Float, yy0: Float, yz0: Float, zx0: Float, zy0: Float, zz0: Float): MMat3F = new MMat3F(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): MMat3F = IMat3F.parse(str).mut
    def xRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat3F(1, 0, 0, 0, (c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat) }
    def yRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat3F((c).toFloat, 0, (s).toFloat, 0, 1, 0, (-s).toFloat, 0, (c).toFloat) }
    def zRotation(theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; new MMat3F((c).toFloat, (-s).toFloat, 0, (s).toFloat, (c).toFloat, 0, 0, 0, 1) }
    def rotation(axis: GVec3F, theta: Float) = { val c = (math.cos(theta)).toFloat; val s = (math.sin(theta)).toFloat; val fact = 1/axis.len; new MMat3F((c + axis.x*axis.x*fact*fact*(1-c)).toFloat, (axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s).toFloat, (axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s).toFloat, (c + axis.y*axis.y*fact*fact*(1-c)).toFloat, (axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s).toFloat, (axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s).toFloat, (axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s).toFloat, (c + axis.z*axis.z*fact*fact*(1-c)).toFloat) }
    def identity = new MMat3F(1, 0, 0, 0, 1, 0, 0, 0, 1)
    def zero = new MMat3F(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(fg3: GVec3F) = new MMat3F(fg3.x, 0, 0, 0, fg3.y, 0, 0, 0, fg3.z)
  } // object MMat3F


  final class MMat3D(var xx: Double, var xy: Double, var xz: Double, var yx: Double, var yy: Double, var yz: Double, var zx: Double, var zy: Double, var zz: Double) extends AMat3D {
    override def clone(): MMat3D = new MMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toS: MMat3S = new MMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: MMat3I = new MMat3I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt)
    override def toL: MMat3L = new MMat3L(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz): MMat3D = new MMat3D(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    override def trim: MMat2D = new MMat2D(xx, xy, yx, yy)
    override def pad(padding: Double = 1): MMat4D = new MMat4D(xx, xy, xz, padding, yx, yy, yz, padding, zx, zy, zz, padding, padding, padding, padding, padding)
  } // class MMat3D

  object MMat3D {
    def apply(xx0: Double, xy0: Double, xz0: Double, yx0: Double, yy0: Double, yz0: Double, zx0: Double, zy0: Double, zz0: Double): MMat3D = new MMat3D(xx0, xy0, xz0, yx0, yy0, yz0, zx0, zy0, zz0)
    def parse(str: String): MMat3D = IMat3D.parse(str).mut
    def xRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat3D(1, 0, 0, 0, c, -s, 0, s, c) }
    def yRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat3D(c, 0, s, 0, 1, 0, -s, 0, c) }
    def zRotation(theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); new MMat3D(c, -s, 0, s, c, 0, 0, 0, 1) }
    def rotation(axis: GVec3D, theta: Double) = { val c = math.cos(theta); val s = math.sin(theta); val fact = 1/axis.len; new MMat3D(c + axis.x*axis.x*fact*fact*(1-c), axis.x*axis.y*fact*fact*(1-c)-axis.z*fact*s, axis.x*axis.z*fact*fact*(1-c)+axis.y*fact*s, axis.x*axis.y*fact*fact*(1-c)+axis.z*fact*s, c + axis.y*axis.y*fact*fact*(1-c), axis.y*axis.z*fact*fact*(1-c)-axis.x*fact*s, axis.x*axis.z*fact*fact*(1-c)-axis.y*fact*s, axis.y*axis.z*fact*fact*(1-c)+axis.x*fact*s, c + axis.z*axis.z*fact*fact*(1-c)) }
    def identity = new MMat3D(1, 0, 0, 0, 1, 0, 0, 0, 1)
    def zero = new MMat3D(0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(dg3: GVec3D) = new MMat3D(dg3.x, 0, 0, 0, dg3.y, 0, 0, 0, dg3.z)
  } // object MMat3D


  class BMat3S(data: Array[Short]) extends AMat3S with Iterator[BMat3S] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Short) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Short) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Short) { data(index+2) = xz0 }
    def yx = data(index+3)
    def yx_=(yx0: Short) { data(index+3) = yx0 }
    def yy = data(index+4)
    def yy_=(yy0: Short) { data(index+4) = yy0 }
    def yz = data(index+5)
    def yz_=(yz0: Short) { data(index+5) = yz0 }
    def zx = data(index+6)
    def zx_=(zx0: Short) { data(index+6) = zx0 }
    def zy = data(index+7)
    def zy_=(zy0: Short) { data(index+7) = zy0 }
    def zz = data(index+8)
    def zz_=(zz0: Short) { data(index+8) = zz0 }
    override def toString = if (index < 0 || index+9 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]")
    def hasNext = (fresh && 9 <= data.length) || (index + 18 <= data.length)
    def next = { if (fresh) fresh = false else index += 9; this }
    def reset(idx: Int = 0) = { index = idx*9; fresh = true; this }
    def spawn = { val v = new BMat3S(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toI: MMat3I = new MMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def toL: MMat3L = new MMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class BMat3S

  object BMat3S {
    def apply(a0: Array[Short]) = new BMat3S(a0)
    def apply(i0: Int) = new BMat3S(new Array[Short](i0*9))
  } // object BMat3S


  class BMat3I(data: Array[Int]) extends AMat3I with Iterator[BMat3I] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Int) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Int) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Int) { data(index+2) = xz0 }
    def yx = data(index+3)
    def yx_=(yx0: Int) { data(index+3) = yx0 }
    def yy = data(index+4)
    def yy_=(yy0: Int) { data(index+4) = yy0 }
    def yz = data(index+5)
    def yz_=(yz0: Int) { data(index+5) = yz0 }
    def zx = data(index+6)
    def zx_=(zx0: Int) { data(index+6) = zx0 }
    def zy = data(index+7)
    def zy_=(zy0: Int) { data(index+7) = zy0 }
    def zz = data(index+8)
    def zz_=(zz0: Int) { data(index+8) = zz0 }
    override def toString = if (index < 0 || index+9 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]")
    def hasNext = (fresh && 9 <= data.length) || (index + 18 <= data.length)
    def next = { if (fresh) fresh = false else index += 9; this }
    def reset(idx: Int = 0) = { index = idx*9; fresh = true; this }
    def spawn = { val v = new BMat3I(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat3S = new MMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def toL: MMat3L = new MMat3L((xx).toLong, (xy).toLong, (xz).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (zx).toLong, (zy).toLong, (zz).toLong)
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class BMat3I

  object BMat3I {
    def apply(a0: Array[Int]) = new BMat3I(a0)
    def apply(i0: Int) = new BMat3I(new Array[Int](i0*9))
  } // object BMat3I


  class BMat3L(data: Array[Long]) extends AMat3L with Iterator[BMat3L] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Long) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Long) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Long) { data(index+2) = xz0 }
    def yx = data(index+3)
    def yx_=(yx0: Long) { data(index+3) = yx0 }
    def yy = data(index+4)
    def yy_=(yy0: Long) { data(index+4) = yy0 }
    def yz = data(index+5)
    def yz_=(yz0: Long) { data(index+5) = yz0 }
    def zx = data(index+6)
    def zx_=(zx0: Long) { data(index+6) = zx0 }
    def zy = data(index+7)
    def zy_=(zy0: Long) { data(index+7) = zy0 }
    def zz = data(index+8)
    def zz_=(zz0: Long) { data(index+8) = zz0 }
    override def toString = if (index < 0 || index+9 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]")
    def hasNext = (fresh && 9 <= data.length) || (index + 18 <= data.length)
    def next = { if (fresh) fresh = false else index += 9; this }
    def reset(idx: Int = 0) = { index = idx*9; fresh = true; this }
    def spawn = { val v = new BMat3L(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat3S = new MMat3S((xx).toShort, (xy).toShort, (xz).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (zx).toShort, (zy).toShort, (zz).toShort)
    override def toI: MMat3I = new MMat3I((xx).toInt, (xy).toInt, (xz).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (zx).toInt, (zy).toInt, (zz).toInt)
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class BMat3L

  object BMat3L {
    def apply(a0: Array[Long]) = new BMat3L(a0)
    def apply(i0: Int) = new BMat3L(new Array[Long](i0*9))
  } // object BMat3L


  class BMat3F(data: Array[Float]) extends AMat3F with Iterator[BMat3F] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Float) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Float) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Float) { data(index+2) = xz0 }
    def yx = data(index+3)
    def yx_=(yx0: Float) { data(index+3) = yx0 }
    def yy = data(index+4)
    def yy_=(yy0: Float) { data(index+4) = yy0 }
    def yz = data(index+5)
    def yz_=(yz0: Float) { data(index+5) = yz0 }
    def zx = data(index+6)
    def zx_=(zx0: Float) { data(index+6) = zx0 }
    def zy = data(index+7)
    def zy_=(zy0: Float) { data(index+7) = zy0 }
    def zz = data(index+8)
    def zz_=(zz0: Float) { data(index+8) = zz0 }
    override def toString = if (index < 0 || index+9 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]")
    def hasNext = (fresh && 9 <= data.length) || (index + 18 <= data.length)
    def next = { if (fresh) fresh = false else index += 9; this }
    def reset(idx: Int = 0) = { index = idx*9; fresh = true; this }
    def spawn = { val v = new BMat3F(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat3S = new MMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: MMat3I = new MMat3I(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toL: MMat3L = new MMat3L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble))
    override def toD: MMat3D = new MMat3D((xx).toDouble, (xy).toDouble, (xz).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble)
  } // class BMat3F

  object BMat3F {
    def apply(a0: Array[Float]) = new BMat3F(a0)
    def apply(i0: Int) = new BMat3F(new Array[Float](i0*9))
  } // object BMat3F


  class BMat3D(data: Array[Double]) extends AMat3D with Iterator[BMat3D] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Double) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Double) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Double) { data(index+2) = xz0 }
    def yx = data(index+3)
    def yx_=(yx0: Double) { data(index+3) = yx0 }
    def yy = data(index+4)
    def yy_=(yy0: Double) { data(index+4) = yy0 }
    def yz = data(index+5)
    def yz_=(yz0: Double) { data(index+5) = yz0 }
    def zx = data(index+6)
    def zx_=(zx0: Double) { data(index+6) = zx0 }
    def zy = data(index+7)
    def zy_=(zy0: Double) { data(index+7) = zy0 }
    def zz = data(index+8)
    def zz_=(zz0: Double) { data(index+8) = zz0 }
    override def toString = if (index < 0 || index+9 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+" ; "+yx+", "+yy+", "+yz+" ; "+zx+", "+zy+", "+zz+"]")
    def hasNext = (fresh && 9 <= data.length) || (index + 18 <= data.length)
    def next = { if (fresh) fresh = false else index += 9; this }
    def reset(idx: Int = 0) = { index = idx*9; fresh = true; this }
    def spawn = { val v = new BMat3D(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat3S = new MMat3S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort)
    override def toI: MMat3I = new MMat3I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt)
    override def toL: MMat3L = new MMat3L(math.round(xx), math.round(xy), math.round(xz), math.round(yx), math.round(yy), math.round(yz), math.round(zx), math.round(zy), math.round(zz))
    override def toF: MMat3F = new MMat3F((xx).toFloat, (xy).toFloat, (xz).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat)
  } // class BMat3D

  object BMat3D {
    def apply(a0: Array[Double]) = new BMat3D(a0)
    def apply(i0: Int) = new BMat3D(new Array[Double](i0*9))
  } // object BMat3D


  abstract class GMat4S extends Cloneable {
    def xx: Short
    def xy: Short
    def xz: Short
    def xw: Short
    def yx: Short
    def yy: Short
    def yz: Short
    def yw: Short
    def zx: Short
    def zy: Short
    def zz: Short
    def zw: Short
    def wx: Short
    def wy: Short
    def wz: Short
    def ww: Short
    override def toString = "["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]"
    override def hashCode = (((((((((((((((ww)*16777619 ^ wz)*16777619 ^ wy)*16777619 ^ wx)*16777619 ^ zw)*16777619 ^ zz)*16777619 ^ zy)*16777619 ^ zx)*16777619 ^ yw)*16777619 ^ yz)*16777619 ^ yy)*16777619 ^ yx)*16777619 ^ xw)*16777619 ^ xz)*16777619 ^ xy)*16777619 ^ xx
    override def equals(any: Any) = any match { case sg44: GMat4S => {xx==sg44.xx && xy==sg44.xy && xz==sg44.xz && xw==sg44.xw && yx==sg44.yx && yy==sg44.yy && yz==sg44.yz && yw==sg44.yw && zx==sg44.zx && zy==sg44.zy && zz==sg44.zz && zw==sg44.zw && wx==sg44.wx && wy==sg44.wy && wz==sg44.wz && ww==sg44.ww }; case ig44: GMat4I => {xx==ig44.xx && xy==ig44.xy && xz==ig44.xz && xw==ig44.xw && yx==ig44.yx && yy==ig44.yy && yz==ig44.yz && yw==ig44.yw && zx==ig44.zx && zy==ig44.zy && zz==ig44.zz && zw==ig44.zw && wx==ig44.wx && wy==ig44.wy && wz==ig44.wz && ww==ig44.ww }; case lg44: GMat4L => {xx==lg44.xx && xy==lg44.xy && xz==lg44.xz && xw==lg44.xw && yx==lg44.yx && yy==lg44.yy && yz==lg44.yz && yw==lg44.yw && zx==lg44.zx && zy==lg44.zy && zz==lg44.zz && zw==lg44.zw && wx==lg44.wx && wy==lg44.wy && wz==lg44.wz && ww==lg44.ww }; case fg44: GMat4F => {xx==fg44.xx && xy==fg44.xy && xz==fg44.xz && xw==fg44.xw && yx==fg44.yx && yy==fg44.yy && yz==fg44.yz && yw==fg44.yw && zx==fg44.zx && zy==fg44.zy && zz==fg44.zz && zw==fg44.zw && wx==fg44.wx && wy==fg44.wy && wz==fg44.wz && ww==fg44.ww }; case dg44: GMat4D => {xx==dg44.xx && xy==dg44.xy && xz==dg44.xz && xw==dg44.xw && yx==dg44.yx && yy==dg44.yy && yz==dg44.yz && yw==dg44.yw && zx==dg44.zx && zy==dg44.zy && zz==dg44.zz && zw==dg44.zw && wx==dg44.wx && wy==dg44.wy && wz==dg44.wz && ww==dg44.ww }; case _ => false }
    override def clone(): GMat4S = new IMat4S(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, xw0: Short = xw, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, yw0: Short = yw, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz, zw0: Short = zw, wx0: Short = wx, wy0: Short = wy, wz0: Short = wz, ww0: Short = ww): GMat4S = new IMat4S(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def trim: GMat3S = new IMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def toI: GMat4I = new IMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    def toL: GMat4L = new IMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    def toF: GMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    def toD: GMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def imm = new IMat4S(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def mut = new MMat4S(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def unary_-() = new IMat4S((-xx).toShort, (-xy).toShort, (-xz).toShort, (-xw).toShort, (-yx).toShort, (-yy).toShort, (-yz).toShort, (-yw).toShort, (-zx).toShort, (-zy).toShort, (-zz).toShort, (-zw).toShort, (-wx).toShort, (-wy).toShort, (-wz).toShort, (-ww).toShort)
    def +(x0: Short) = new IMat4S((xx + x0).toShort, (xy + x0).toShort, (xz + x0).toShort, (xw + x0).toShort, (yx + x0).toShort, (yy + x0).toShort, (yz + x0).toShort, (yw + x0).toShort, (zx + x0).toShort, (zy + x0).toShort, (zz + x0).toShort, (zw + x0).toShort, (wx + x0).toShort, (wy + x0).toShort, (wz + x0).toShort, (ww + x0).toShort)
    def +(x0: Int) = new IMat4I((xx).toInt + x0, (xy).toInt + x0, (xz).toInt + x0, (xw).toInt + x0, (yx).toInt + x0, (yy).toInt + x0, (yz).toInt + x0, (yw).toInt + x0, (zx).toInt + x0, (zy).toInt + x0, (zz).toInt + x0, (zw).toInt + x0, (wx).toInt + x0, (wy).toInt + x0, (wz).toInt + x0, (ww).toInt + x0)
    def +(x0: Long) = new IMat4L((xx).toLong + x0, (xy).toLong + x0, (xz).toLong + x0, (xw).toLong + x0, (yx).toLong + x0, (yy).toLong + x0, (yz).toLong + x0, (yw).toLong + x0, (zx).toLong + x0, (zy).toLong + x0, (zz).toLong + x0, (zw).toLong + x0, (wx).toLong + x0, (wy).toLong + x0, (wz).toLong + x0, (ww).toLong + x0)
    def +(x0: Float) = new IMat4F((xx).toFloat + x0, (xy).toFloat + x0, (xz).toFloat + x0, (xw).toFloat + x0, (yx).toFloat + x0, (yy).toFloat + x0, (yz).toFloat + x0, (yw).toFloat + x0, (zx).toFloat + x0, (zy).toFloat + x0, (zz).toFloat + x0, (zw).toFloat + x0, (wx).toFloat + x0, (wy).toFloat + x0, (wz).toFloat + x0, (ww).toFloat + x0)
    def +(x0: Double) = new IMat4D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (xw).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (yw).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0, (zw).toDouble + x0, (wx).toDouble + x0, (wy).toDouble + x0, (wz).toDouble + x0, (ww).toDouble + x0)
    def +(sg44: GMat4S) = new IMat4S((xx + sg44.xx).toShort, (xy + sg44.xy).toShort, (xz + sg44.xz).toShort, (xw + sg44.xw).toShort, (yx + sg44.yx).toShort, (yy + sg44.yy).toShort, (yz + sg44.yz).toShort, (yw + sg44.yw).toShort, (zx + sg44.zx).toShort, (zy + sg44.zy).toShort, (zz + sg44.zz).toShort, (zw + sg44.zw).toShort, (wx + sg44.wx).toShort, (wy + sg44.wy).toShort, (wz + sg44.wz).toShort, (ww + sg44.ww).toShort)
    def +(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short) = new IMat4S((xx + xx0).toShort, (xy + xy0).toShort, (xz + xz0).toShort, (xw + xw0).toShort, (yx + yx0).toShort, (yy + yy0).toShort, (yz + yz0).toShort, (yw + yw0).toShort, (zx + zx0).toShort, (zy + zy0).toShort, (zz + zz0).toShort, (zw + zw0).toShort, (wx + wx0).toShort, (wy + wy0).toShort, (wz + wz0).toShort, (ww + ww0).toShort)
    def +(ig44: GMat4I) = new IMat4I((xx).toInt + ig44.xx, (xy).toInt + ig44.xy, (xz).toInt + ig44.xz, (xw).toInt + ig44.xw, (yx).toInt + ig44.yx, (yy).toInt + ig44.yy, (yz).toInt + ig44.yz, (yw).toInt + ig44.yw, (zx).toInt + ig44.zx, (zy).toInt + ig44.zy, (zz).toInt + ig44.zz, (zw).toInt + ig44.zw, (wx).toInt + ig44.wx, (wy).toInt + ig44.wy, (wz).toInt + ig44.wz, (ww).toInt + ig44.ww)
    def +(lg44: GMat4L) = new IMat4L((xx).toLong + lg44.xx, (xy).toLong + lg44.xy, (xz).toLong + lg44.xz, (xw).toLong + lg44.xw, (yx).toLong + lg44.yx, (yy).toLong + lg44.yy, (yz).toLong + lg44.yz, (yw).toLong + lg44.yw, (zx).toLong + lg44.zx, (zy).toLong + lg44.zy, (zz).toLong + lg44.zz, (zw).toLong + lg44.zw, (wx).toLong + lg44.wx, (wy).toLong + lg44.wy, (wz).toLong + lg44.wz, (ww).toLong + lg44.ww)
    def +(fg44: GMat4F) = new IMat4F((xx).toFloat + fg44.xx, (xy).toFloat + fg44.xy, (xz).toFloat + fg44.xz, (xw).toFloat + fg44.xw, (yx).toFloat + fg44.yx, (yy).toFloat + fg44.yy, (yz).toFloat + fg44.yz, (yw).toFloat + fg44.yw, (zx).toFloat + fg44.zx, (zy).toFloat + fg44.zy, (zz).toFloat + fg44.zz, (zw).toFloat + fg44.zw, (wx).toFloat + fg44.wx, (wy).toFloat + fg44.wy, (wz).toFloat + fg44.wz, (ww).toFloat + fg44.ww)
    def +(dg44: GMat4D) = new IMat4D((xx).toDouble + dg44.xx, (xy).toDouble + dg44.xy, (xz).toDouble + dg44.xz, (xw).toDouble + dg44.xw, (yx).toDouble + dg44.yx, (yy).toDouble + dg44.yy, (yz).toDouble + dg44.yz, (yw).toDouble + dg44.yw, (zx).toDouble + dg44.zx, (zy).toDouble + dg44.zy, (zz).toDouble + dg44.zz, (zw).toDouble + dg44.zw, (wx).toDouble + dg44.wx, (wy).toDouble + dg44.wy, (wz).toDouble + dg44.wz, (ww).toDouble + dg44.ww)
    def -(x0: Short) = new IMat4S((xx - x0).toShort, (xy - x0).toShort, (xz - x0).toShort, (xw - x0).toShort, (yx - x0).toShort, (yy - x0).toShort, (yz - x0).toShort, (yw - x0).toShort, (zx - x0).toShort, (zy - x0).toShort, (zz - x0).toShort, (zw - x0).toShort, (wx - x0).toShort, (wy - x0).toShort, (wz - x0).toShort, (ww - x0).toShort)
    def -(x0: Int) = new IMat4I((xx).toInt - x0, (xy).toInt - x0, (xz).toInt - x0, (xw).toInt - x0, (yx).toInt - x0, (yy).toInt - x0, (yz).toInt - x0, (yw).toInt - x0, (zx).toInt - x0, (zy).toInt - x0, (zz).toInt - x0, (zw).toInt - x0, (wx).toInt - x0, (wy).toInt - x0, (wz).toInt - x0, (ww).toInt - x0)
    def -(x0: Long) = new IMat4L((xx).toLong - x0, (xy).toLong - x0, (xz).toLong - x0, (xw).toLong - x0, (yx).toLong - x0, (yy).toLong - x0, (yz).toLong - x0, (yw).toLong - x0, (zx).toLong - x0, (zy).toLong - x0, (zz).toLong - x0, (zw).toLong - x0, (wx).toLong - x0, (wy).toLong - x0, (wz).toLong - x0, (ww).toLong - x0)
    def -(x0: Float) = new IMat4F((xx).toFloat - x0, (xy).toFloat - x0, (xz).toFloat - x0, (xw).toFloat - x0, (yx).toFloat - x0, (yy).toFloat - x0, (yz).toFloat - x0, (yw).toFloat - x0, (zx).toFloat - x0, (zy).toFloat - x0, (zz).toFloat - x0, (zw).toFloat - x0, (wx).toFloat - x0, (wy).toFloat - x0, (wz).toFloat - x0, (ww).toFloat - x0)
    def -(x0: Double) = new IMat4D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (xw).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (yw).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0, (zw).toDouble - x0, (wx).toDouble - x0, (wy).toDouble - x0, (wz).toDouble - x0, (ww).toDouble - x0)
    def -(sg44: GMat4S) = new IMat4S((xx - sg44.xx).toShort, (xy - sg44.xy).toShort, (xz - sg44.xz).toShort, (xw - sg44.xw).toShort, (yx - sg44.yx).toShort, (yy - sg44.yy).toShort, (yz - sg44.yz).toShort, (yw - sg44.yw).toShort, (zx - sg44.zx).toShort, (zy - sg44.zy).toShort, (zz - sg44.zz).toShort, (zw - sg44.zw).toShort, (wx - sg44.wx).toShort, (wy - sg44.wy).toShort, (wz - sg44.wz).toShort, (ww - sg44.ww).toShort)
    def -(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short) = new IMat4S((xx - xx0).toShort, (xy - xy0).toShort, (xz - xz0).toShort, (xw - xw0).toShort, (yx - yx0).toShort, (yy - yy0).toShort, (yz - yz0).toShort, (yw - yw0).toShort, (zx - zx0).toShort, (zy - zy0).toShort, (zz - zz0).toShort, (zw - zw0).toShort, (wx - wx0).toShort, (wy - wy0).toShort, (wz - wz0).toShort, (ww - ww0).toShort)
    def -(ig44: GMat4I) = new IMat4I((xx).toInt - ig44.xx, (xy).toInt - ig44.xy, (xz).toInt - ig44.xz, (xw).toInt - ig44.xw, (yx).toInt - ig44.yx, (yy).toInt - ig44.yy, (yz).toInt - ig44.yz, (yw).toInt - ig44.yw, (zx).toInt - ig44.zx, (zy).toInt - ig44.zy, (zz).toInt - ig44.zz, (zw).toInt - ig44.zw, (wx).toInt - ig44.wx, (wy).toInt - ig44.wy, (wz).toInt - ig44.wz, (ww).toInt - ig44.ww)
    def -(lg44: GMat4L) = new IMat4L((xx).toLong - lg44.xx, (xy).toLong - lg44.xy, (xz).toLong - lg44.xz, (xw).toLong - lg44.xw, (yx).toLong - lg44.yx, (yy).toLong - lg44.yy, (yz).toLong - lg44.yz, (yw).toLong - lg44.yw, (zx).toLong - lg44.zx, (zy).toLong - lg44.zy, (zz).toLong - lg44.zz, (zw).toLong - lg44.zw, (wx).toLong - lg44.wx, (wy).toLong - lg44.wy, (wz).toLong - lg44.wz, (ww).toLong - lg44.ww)
    def -(fg44: GMat4F) = new IMat4F((xx).toFloat - fg44.xx, (xy).toFloat - fg44.xy, (xz).toFloat - fg44.xz, (xw).toFloat - fg44.xw, (yx).toFloat - fg44.yx, (yy).toFloat - fg44.yy, (yz).toFloat - fg44.yz, (yw).toFloat - fg44.yw, (zx).toFloat - fg44.zx, (zy).toFloat - fg44.zy, (zz).toFloat - fg44.zz, (zw).toFloat - fg44.zw, (wx).toFloat - fg44.wx, (wy).toFloat - fg44.wy, (wz).toFloat - fg44.wz, (ww).toFloat - fg44.ww)
    def -(dg44: GMat4D) = new IMat4D((xx).toDouble - dg44.xx, (xy).toDouble - dg44.xy, (xz).toDouble - dg44.xz, (xw).toDouble - dg44.xw, (yx).toDouble - dg44.yx, (yy).toDouble - dg44.yy, (yz).toDouble - dg44.yz, (yw).toDouble - dg44.yw, (zx).toDouble - dg44.zx, (zy).toDouble - dg44.zy, (zz).toDouble - dg44.zz, (zw).toDouble - dg44.zw, (wx).toDouble - dg44.wx, (wy).toDouble - dg44.wy, (wz).toDouble - dg44.wz, (ww).toDouble - dg44.ww)
    def *(x0: Short) = new IMat4S((xx * x0).toShort, (xy * x0).toShort, (xz * x0).toShort, (xw * x0).toShort, (yx * x0).toShort, (yy * x0).toShort, (yz * x0).toShort, (yw * x0).toShort, (zx * x0).toShort, (zy * x0).toShort, (zz * x0).toShort, (zw * x0).toShort, (wx * x0).toShort, (wy * x0).toShort, (wz * x0).toShort, (ww * x0).toShort)
    def *(x0: Int) = new IMat4I((xx).toInt * x0, (xy).toInt * x0, (xz).toInt * x0, (xw).toInt * x0, (yx).toInt * x0, (yy).toInt * x0, (yz).toInt * x0, (yw).toInt * x0, (zx).toInt * x0, (zy).toInt * x0, (zz).toInt * x0, (zw).toInt * x0, (wx).toInt * x0, (wy).toInt * x0, (wz).toInt * x0, (ww).toInt * x0)
    def *(x0: Long) = new IMat4L((xx).toLong * x0, (xy).toLong * x0, (xz).toLong * x0, (xw).toLong * x0, (yx).toLong * x0, (yy).toLong * x0, (yz).toLong * x0, (yw).toLong * x0, (zx).toLong * x0, (zy).toLong * x0, (zz).toLong * x0, (zw).toLong * x0, (wx).toLong * x0, (wy).toLong * x0, (wz).toLong * x0, (ww).toLong * x0)
    def *(x0: Float) = new IMat4F((xx).toFloat * x0, (xy).toFloat * x0, (xz).toFloat * x0, (xw).toFloat * x0, (yx).toFloat * x0, (yy).toFloat * x0, (yz).toFloat * x0, (yw).toFloat * x0, (zx).toFloat * x0, (zy).toFloat * x0, (zz).toFloat * x0, (zw).toFloat * x0, (wx).toFloat * x0, (wy).toFloat * x0, (wz).toFloat * x0, (ww).toFloat * x0)
    def *(x0: Double) = new IMat4D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (xw).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (yw).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0, (zw).toDouble * x0, (wx).toDouble * x0, (wy).toDouble * x0, (wz).toDouble * x0, (ww).toDouble * x0)
    def *(sg44: GMat4S) = new IMat4S((xx * sg44.xx).toShort, (xy * sg44.xy).toShort, (xz * sg44.xz).toShort, (xw * sg44.xw).toShort, (yx * sg44.yx).toShort, (yy * sg44.yy).toShort, (yz * sg44.yz).toShort, (yw * sg44.yw).toShort, (zx * sg44.zx).toShort, (zy * sg44.zy).toShort, (zz * sg44.zz).toShort, (zw * sg44.zw).toShort, (wx * sg44.wx).toShort, (wy * sg44.wy).toShort, (wz * sg44.wz).toShort, (ww * sg44.ww).toShort)
    def *(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short) = new IMat4S((xx * xx0).toShort, (xy * xy0).toShort, (xz * xz0).toShort, (xw * xw0).toShort, (yx * yx0).toShort, (yy * yy0).toShort, (yz * yz0).toShort, (yw * yw0).toShort, (zx * zx0).toShort, (zy * zy0).toShort, (zz * zz0).toShort, (zw * zw0).toShort, (wx * wx0).toShort, (wy * wy0).toShort, (wz * wz0).toShort, (ww * ww0).toShort)
    def *(ig44: GMat4I) = new IMat4I((xx).toInt * ig44.xx, (xy).toInt * ig44.xy, (xz).toInt * ig44.xz, (xw).toInt * ig44.xw, (yx).toInt * ig44.yx, (yy).toInt * ig44.yy, (yz).toInt * ig44.yz, (yw).toInt * ig44.yw, (zx).toInt * ig44.zx, (zy).toInt * ig44.zy, (zz).toInt * ig44.zz, (zw).toInt * ig44.zw, (wx).toInt * ig44.wx, (wy).toInt * ig44.wy, (wz).toInt * ig44.wz, (ww).toInt * ig44.ww)
    def *(lg44: GMat4L) = new IMat4L((xx).toLong * lg44.xx, (xy).toLong * lg44.xy, (xz).toLong * lg44.xz, (xw).toLong * lg44.xw, (yx).toLong * lg44.yx, (yy).toLong * lg44.yy, (yz).toLong * lg44.yz, (yw).toLong * lg44.yw, (zx).toLong * lg44.zx, (zy).toLong * lg44.zy, (zz).toLong * lg44.zz, (zw).toLong * lg44.zw, (wx).toLong * lg44.wx, (wy).toLong * lg44.wy, (wz).toLong * lg44.wz, (ww).toLong * lg44.ww)
    def *(fg44: GMat4F) = new IMat4F((xx).toFloat * fg44.xx, (xy).toFloat * fg44.xy, (xz).toFloat * fg44.xz, (xw).toFloat * fg44.xw, (yx).toFloat * fg44.yx, (yy).toFloat * fg44.yy, (yz).toFloat * fg44.yz, (yw).toFloat * fg44.yw, (zx).toFloat * fg44.zx, (zy).toFloat * fg44.zy, (zz).toFloat * fg44.zz, (zw).toFloat * fg44.zw, (wx).toFloat * fg44.wx, (wy).toFloat * fg44.wy, (wz).toFloat * fg44.wz, (ww).toFloat * fg44.ww)
    def *(dg44: GMat4D) = new IMat4D((xx).toDouble * dg44.xx, (xy).toDouble * dg44.xy, (xz).toDouble * dg44.xz, (xw).toDouble * dg44.xw, (yx).toDouble * dg44.yx, (yy).toDouble * dg44.yy, (yz).toDouble * dg44.yz, (yw).toDouble * dg44.yw, (zx).toDouble * dg44.zx, (zy).toDouble * dg44.zy, (zz).toDouble * dg44.zz, (zw).toDouble * dg44.zw, (wx).toDouble * dg44.wx, (wy).toDouble * dg44.wy, (wz).toDouble * dg44.wz, (ww).toDouble * dg44.ww)
    def /(x0: Short) = new IMat4S((xx / x0).toShort, (xy / x0).toShort, (xz / x0).toShort, (xw / x0).toShort, (yx / x0).toShort, (yy / x0).toShort, (yz / x0).toShort, (yw / x0).toShort, (zx / x0).toShort, (zy / x0).toShort, (zz / x0).toShort, (zw / x0).toShort, (wx / x0).toShort, (wy / x0).toShort, (wz / x0).toShort, (ww / x0).toShort)
    def /(x0: Int) = new IMat4I((xx).toInt / x0, (xy).toInt / x0, (xz).toInt / x0, (xw).toInt / x0, (yx).toInt / x0, (yy).toInt / x0, (yz).toInt / x0, (yw).toInt / x0, (zx).toInt / x0, (zy).toInt / x0, (zz).toInt / x0, (zw).toInt / x0, (wx).toInt / x0, (wy).toInt / x0, (wz).toInt / x0, (ww).toInt / x0)
    def /(x0: Long) = new IMat4L((xx).toLong / x0, (xy).toLong / x0, (xz).toLong / x0, (xw).toLong / x0, (yx).toLong / x0, (yy).toLong / x0, (yz).toLong / x0, (yw).toLong / x0, (zx).toLong / x0, (zy).toLong / x0, (zz).toLong / x0, (zw).toLong / x0, (wx).toLong / x0, (wy).toLong / x0, (wz).toLong / x0, (ww).toLong / x0)
    def /(x0: Float) = new IMat4F((xx).toFloat / x0, (xy).toFloat / x0, (xz).toFloat / x0, (xw).toFloat / x0, (yx).toFloat / x0, (yy).toFloat / x0, (yz).toFloat / x0, (yw).toFloat / x0, (zx).toFloat / x0, (zy).toFloat / x0, (zz).toFloat / x0, (zw).toFloat / x0, (wx).toFloat / x0, (wy).toFloat / x0, (wz).toFloat / x0, (ww).toFloat / x0)
    def /(x0: Double) = new IMat4D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (xw).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (yw).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0, (zw).toDouble / x0, (wx).toDouble / x0, (wy).toDouble / x0, (wz).toDouble / x0, (ww).toDouble / x0)
    def /(sg44: GMat4S) = new IMat4S((xx / sg44.xx).toShort, (xy / sg44.xy).toShort, (xz / sg44.xz).toShort, (xw / sg44.xw).toShort, (yx / sg44.yx).toShort, (yy / sg44.yy).toShort, (yz / sg44.yz).toShort, (yw / sg44.yw).toShort, (zx / sg44.zx).toShort, (zy / sg44.zy).toShort, (zz / sg44.zz).toShort, (zw / sg44.zw).toShort, (wx / sg44.wx).toShort, (wy / sg44.wy).toShort, (wz / sg44.wz).toShort, (ww / sg44.ww).toShort)
    def /(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short) = new IMat4S((xx / xx0).toShort, (xy / xy0).toShort, (xz / xz0).toShort, (xw / xw0).toShort, (yx / yx0).toShort, (yy / yy0).toShort, (yz / yz0).toShort, (yw / yw0).toShort, (zx / zx0).toShort, (zy / zy0).toShort, (zz / zz0).toShort, (zw / zw0).toShort, (wx / wx0).toShort, (wy / wy0).toShort, (wz / wz0).toShort, (ww / ww0).toShort)
    def /(ig44: GMat4I) = new IMat4I((xx).toInt / ig44.xx, (xy).toInt / ig44.xy, (xz).toInt / ig44.xz, (xw).toInt / ig44.xw, (yx).toInt / ig44.yx, (yy).toInt / ig44.yy, (yz).toInt / ig44.yz, (yw).toInt / ig44.yw, (zx).toInt / ig44.zx, (zy).toInt / ig44.zy, (zz).toInt / ig44.zz, (zw).toInt / ig44.zw, (wx).toInt / ig44.wx, (wy).toInt / ig44.wy, (wz).toInt / ig44.wz, (ww).toInt / ig44.ww)
    def /(lg44: GMat4L) = new IMat4L((xx).toLong / lg44.xx, (xy).toLong / lg44.xy, (xz).toLong / lg44.xz, (xw).toLong / lg44.xw, (yx).toLong / lg44.yx, (yy).toLong / lg44.yy, (yz).toLong / lg44.yz, (yw).toLong / lg44.yw, (zx).toLong / lg44.zx, (zy).toLong / lg44.zy, (zz).toLong / lg44.zz, (zw).toLong / lg44.zw, (wx).toLong / lg44.wx, (wy).toLong / lg44.wy, (wz).toLong / lg44.wz, (ww).toLong / lg44.ww)
    def /(fg44: GMat4F) = new IMat4F((xx).toFloat / fg44.xx, (xy).toFloat / fg44.xy, (xz).toFloat / fg44.xz, (xw).toFloat / fg44.xw, (yx).toFloat / fg44.yx, (yy).toFloat / fg44.yy, (yz).toFloat / fg44.yz, (yw).toFloat / fg44.yw, (zx).toFloat / fg44.zx, (zy).toFloat / fg44.zy, (zz).toFloat / fg44.zz, (zw).toFloat / fg44.zw, (wx).toFloat / fg44.wx, (wy).toFloat / fg44.wy, (wz).toFloat / fg44.wz, (ww).toFloat / fg44.ww)
    def /(dg44: GMat4D) = new IMat4D((xx).toDouble / dg44.xx, (xy).toDouble / dg44.xy, (xz).toDouble / dg44.xz, (xw).toDouble / dg44.xw, (yx).toDouble / dg44.yx, (yy).toDouble / dg44.yy, (yz).toDouble / dg44.yz, (yw).toDouble / dg44.yw, (zx).toDouble / dg44.zx, (zy).toDouble / dg44.zy, (zz).toDouble / dg44.zz, (zw).toDouble / dg44.zw, (wx).toDouble / dg44.wx, (wy).toDouble / dg44.wy, (wz).toDouble / dg44.wz, (ww).toDouble / dg44.ww)
    def max(x0: Short) = new IMat4S((math.max(xx,x0)).toShort, (math.max(xy,x0)).toShort, (math.max(xz,x0)).toShort, (math.max(xw,x0)).toShort, (math.max(yx,x0)).toShort, (math.max(yy,x0)).toShort, (math.max(yz,x0)).toShort, (math.max(yw,x0)).toShort, (math.max(zx,x0)).toShort, (math.max(zy,x0)).toShort, (math.max(zz,x0)).toShort, (math.max(zw,x0)).toShort, (math.max(wx,x0)).toShort, (math.max(wy,x0)).toShort, (math.max(wz,x0)).toShort, (math.max(ww,x0)).toShort)
    def max(x0: Int) = new IMat4I(math.max((xx).toInt,x0), math.max((xy).toInt,x0), math.max((xz).toInt,x0), math.max((xw).toInt,x0), math.max((yx).toInt,x0), math.max((yy).toInt,x0), math.max((yz).toInt,x0), math.max((yw).toInt,x0), math.max((zx).toInt,x0), math.max((zy).toInt,x0), math.max((zz).toInt,x0), math.max((zw).toInt,x0), math.max((wx).toInt,x0), math.max((wy).toInt,x0), math.max((wz).toInt,x0), math.max((ww).toInt,x0))
    def max(x0: Long) = new IMat4L(math.max((xx).toLong,x0), math.max((xy).toLong,x0), math.max((xz).toLong,x0), math.max((xw).toLong,x0), math.max((yx).toLong,x0), math.max((yy).toLong,x0), math.max((yz).toLong,x0), math.max((yw).toLong,x0), math.max((zx).toLong,x0), math.max((zy).toLong,x0), math.max((zz).toLong,x0), math.max((zw).toLong,x0), math.max((wx).toLong,x0), math.max((wy).toLong,x0), math.max((wz).toLong,x0), math.max((ww).toLong,x0))
    def max(x0: Float) = new IMat4F(math.max((xx).toFloat,x0), math.max((xy).toFloat,x0), math.max((xz).toFloat,x0), math.max((xw).toFloat,x0), math.max((yx).toFloat,x0), math.max((yy).toFloat,x0), math.max((yz).toFloat,x0), math.max((yw).toFloat,x0), math.max((zx).toFloat,x0), math.max((zy).toFloat,x0), math.max((zz).toFloat,x0), math.max((zw).toFloat,x0), math.max((wx).toFloat,x0), math.max((wy).toFloat,x0), math.max((wz).toFloat,x0), math.max((ww).toFloat,x0))
    def max(x0: Double) = new IMat4D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((xw).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((yw).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0), math.max((zw).toDouble,x0), math.max((wx).toDouble,x0), math.max((wy).toDouble,x0), math.max((wz).toDouble,x0), math.max((ww).toDouble,x0))
    def max(sg44: GMat4S) = new IMat4S((math.max(xx,sg44.xx)).toShort, (math.max(xy,sg44.xy)).toShort, (math.max(xz,sg44.xz)).toShort, (math.max(xw,sg44.xw)).toShort, (math.max(yx,sg44.yx)).toShort, (math.max(yy,sg44.yy)).toShort, (math.max(yz,sg44.yz)).toShort, (math.max(yw,sg44.yw)).toShort, (math.max(zx,sg44.zx)).toShort, (math.max(zy,sg44.zy)).toShort, (math.max(zz,sg44.zz)).toShort, (math.max(zw,sg44.zw)).toShort, (math.max(wx,sg44.wx)).toShort, (math.max(wy,sg44.wy)).toShort, (math.max(wz,sg44.wz)).toShort, (math.max(ww,sg44.ww)).toShort)
    def max(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short) = new IMat4S((math.max(xx,xx0)).toShort, (math.max(xy,xy0)).toShort, (math.max(xz,xz0)).toShort, (math.max(xw,xw0)).toShort, (math.max(yx,yx0)).toShort, (math.max(yy,yy0)).toShort, (math.max(yz,yz0)).toShort, (math.max(yw,yw0)).toShort, (math.max(zx,zx0)).toShort, (math.max(zy,zy0)).toShort, (math.max(zz,zz0)).toShort, (math.max(zw,zw0)).toShort, (math.max(wx,wx0)).toShort, (math.max(wy,wy0)).toShort, (math.max(wz,wz0)).toShort, (math.max(ww,ww0)).toShort)
    def max(ig44: GMat4I) = new IMat4I(math.max((xx).toInt,ig44.xx), math.max((xy).toInt,ig44.xy), math.max((xz).toInt,ig44.xz), math.max((xw).toInt,ig44.xw), math.max((yx).toInt,ig44.yx), math.max((yy).toInt,ig44.yy), math.max((yz).toInt,ig44.yz), math.max((yw).toInt,ig44.yw), math.max((zx).toInt,ig44.zx), math.max((zy).toInt,ig44.zy), math.max((zz).toInt,ig44.zz), math.max((zw).toInt,ig44.zw), math.max((wx).toInt,ig44.wx), math.max((wy).toInt,ig44.wy), math.max((wz).toInt,ig44.wz), math.max((ww).toInt,ig44.ww))
    def max(lg44: GMat4L) = new IMat4L(math.max((xx).toLong,lg44.xx), math.max((xy).toLong,lg44.xy), math.max((xz).toLong,lg44.xz), math.max((xw).toLong,lg44.xw), math.max((yx).toLong,lg44.yx), math.max((yy).toLong,lg44.yy), math.max((yz).toLong,lg44.yz), math.max((yw).toLong,lg44.yw), math.max((zx).toLong,lg44.zx), math.max((zy).toLong,lg44.zy), math.max((zz).toLong,lg44.zz), math.max((zw).toLong,lg44.zw), math.max((wx).toLong,lg44.wx), math.max((wy).toLong,lg44.wy), math.max((wz).toLong,lg44.wz), math.max((ww).toLong,lg44.ww))
    def max(fg44: GMat4F) = new IMat4F(math.max((xx).toFloat,fg44.xx), math.max((xy).toFloat,fg44.xy), math.max((xz).toFloat,fg44.xz), math.max((xw).toFloat,fg44.xw), math.max((yx).toFloat,fg44.yx), math.max((yy).toFloat,fg44.yy), math.max((yz).toFloat,fg44.yz), math.max((yw).toFloat,fg44.yw), math.max((zx).toFloat,fg44.zx), math.max((zy).toFloat,fg44.zy), math.max((zz).toFloat,fg44.zz), math.max((zw).toFloat,fg44.zw), math.max((wx).toFloat,fg44.wx), math.max((wy).toFloat,fg44.wy), math.max((wz).toFloat,fg44.wz), math.max((ww).toFloat,fg44.ww))
    def max(dg44: GMat4D) = new IMat4D(math.max((xx).toDouble,dg44.xx), math.max((xy).toDouble,dg44.xy), math.max((xz).toDouble,dg44.xz), math.max((xw).toDouble,dg44.xw), math.max((yx).toDouble,dg44.yx), math.max((yy).toDouble,dg44.yy), math.max((yz).toDouble,dg44.yz), math.max((yw).toDouble,dg44.yw), math.max((zx).toDouble,dg44.zx), math.max((zy).toDouble,dg44.zy), math.max((zz).toDouble,dg44.zz), math.max((zw).toDouble,dg44.zw), math.max((wx).toDouble,dg44.wx), math.max((wy).toDouble,dg44.wy), math.max((wz).toDouble,dg44.wz), math.max((ww).toDouble,dg44.ww))
    def min(x0: Short) = new IMat4S((math.min(xx,x0)).toShort, (math.min(xy,x0)).toShort, (math.min(xz,x0)).toShort, (math.min(xw,x0)).toShort, (math.min(yx,x0)).toShort, (math.min(yy,x0)).toShort, (math.min(yz,x0)).toShort, (math.min(yw,x0)).toShort, (math.min(zx,x0)).toShort, (math.min(zy,x0)).toShort, (math.min(zz,x0)).toShort, (math.min(zw,x0)).toShort, (math.min(wx,x0)).toShort, (math.min(wy,x0)).toShort, (math.min(wz,x0)).toShort, (math.min(ww,x0)).toShort)
    def min(x0: Int) = new IMat4I(math.min((xx).toInt,x0), math.min((xy).toInt,x0), math.min((xz).toInt,x0), math.min((xw).toInt,x0), math.min((yx).toInt,x0), math.min((yy).toInt,x0), math.min((yz).toInt,x0), math.min((yw).toInt,x0), math.min((zx).toInt,x0), math.min((zy).toInt,x0), math.min((zz).toInt,x0), math.min((zw).toInt,x0), math.min((wx).toInt,x0), math.min((wy).toInt,x0), math.min((wz).toInt,x0), math.min((ww).toInt,x0))
    def min(x0: Long) = new IMat4L(math.min((xx).toLong,x0), math.min((xy).toLong,x0), math.min((xz).toLong,x0), math.min((xw).toLong,x0), math.min((yx).toLong,x0), math.min((yy).toLong,x0), math.min((yz).toLong,x0), math.min((yw).toLong,x0), math.min((zx).toLong,x0), math.min((zy).toLong,x0), math.min((zz).toLong,x0), math.min((zw).toLong,x0), math.min((wx).toLong,x0), math.min((wy).toLong,x0), math.min((wz).toLong,x0), math.min((ww).toLong,x0))
    def min(x0: Float) = new IMat4F(math.min((xx).toFloat,x0), math.min((xy).toFloat,x0), math.min((xz).toFloat,x0), math.min((xw).toFloat,x0), math.min((yx).toFloat,x0), math.min((yy).toFloat,x0), math.min((yz).toFloat,x0), math.min((yw).toFloat,x0), math.min((zx).toFloat,x0), math.min((zy).toFloat,x0), math.min((zz).toFloat,x0), math.min((zw).toFloat,x0), math.min((wx).toFloat,x0), math.min((wy).toFloat,x0), math.min((wz).toFloat,x0), math.min((ww).toFloat,x0))
    def min(x0: Double) = new IMat4D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((xw).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((yw).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0), math.min((zw).toDouble,x0), math.min((wx).toDouble,x0), math.min((wy).toDouble,x0), math.min((wz).toDouble,x0), math.min((ww).toDouble,x0))
    def min(sg44: GMat4S) = new IMat4S((math.min(xx,sg44.xx)).toShort, (math.min(xy,sg44.xy)).toShort, (math.min(xz,sg44.xz)).toShort, (math.min(xw,sg44.xw)).toShort, (math.min(yx,sg44.yx)).toShort, (math.min(yy,sg44.yy)).toShort, (math.min(yz,sg44.yz)).toShort, (math.min(yw,sg44.yw)).toShort, (math.min(zx,sg44.zx)).toShort, (math.min(zy,sg44.zy)).toShort, (math.min(zz,sg44.zz)).toShort, (math.min(zw,sg44.zw)).toShort, (math.min(wx,sg44.wx)).toShort, (math.min(wy,sg44.wy)).toShort, (math.min(wz,sg44.wz)).toShort, (math.min(ww,sg44.ww)).toShort)
    def min(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short) = new IMat4S((math.min(xx,xx0)).toShort, (math.min(xy,xy0)).toShort, (math.min(xz,xz0)).toShort, (math.min(xw,xw0)).toShort, (math.min(yx,yx0)).toShort, (math.min(yy,yy0)).toShort, (math.min(yz,yz0)).toShort, (math.min(yw,yw0)).toShort, (math.min(zx,zx0)).toShort, (math.min(zy,zy0)).toShort, (math.min(zz,zz0)).toShort, (math.min(zw,zw0)).toShort, (math.min(wx,wx0)).toShort, (math.min(wy,wy0)).toShort, (math.min(wz,wz0)).toShort, (math.min(ww,ww0)).toShort)
    def min(ig44: GMat4I) = new IMat4I(math.min((xx).toInt,ig44.xx), math.min((xy).toInt,ig44.xy), math.min((xz).toInt,ig44.xz), math.min((xw).toInt,ig44.xw), math.min((yx).toInt,ig44.yx), math.min((yy).toInt,ig44.yy), math.min((yz).toInt,ig44.yz), math.min((yw).toInt,ig44.yw), math.min((zx).toInt,ig44.zx), math.min((zy).toInt,ig44.zy), math.min((zz).toInt,ig44.zz), math.min((zw).toInt,ig44.zw), math.min((wx).toInt,ig44.wx), math.min((wy).toInt,ig44.wy), math.min((wz).toInt,ig44.wz), math.min((ww).toInt,ig44.ww))
    def min(lg44: GMat4L) = new IMat4L(math.min((xx).toLong,lg44.xx), math.min((xy).toLong,lg44.xy), math.min((xz).toLong,lg44.xz), math.min((xw).toLong,lg44.xw), math.min((yx).toLong,lg44.yx), math.min((yy).toLong,lg44.yy), math.min((yz).toLong,lg44.yz), math.min((yw).toLong,lg44.yw), math.min((zx).toLong,lg44.zx), math.min((zy).toLong,lg44.zy), math.min((zz).toLong,lg44.zz), math.min((zw).toLong,lg44.zw), math.min((wx).toLong,lg44.wx), math.min((wy).toLong,lg44.wy), math.min((wz).toLong,lg44.wz), math.min((ww).toLong,lg44.ww))
    def min(fg44: GMat4F) = new IMat4F(math.min((xx).toFloat,fg44.xx), math.min((xy).toFloat,fg44.xy), math.min((xz).toFloat,fg44.xz), math.min((xw).toFloat,fg44.xw), math.min((yx).toFloat,fg44.yx), math.min((yy).toFloat,fg44.yy), math.min((yz).toFloat,fg44.yz), math.min((yw).toFloat,fg44.yw), math.min((zx).toFloat,fg44.zx), math.min((zy).toFloat,fg44.zy), math.min((zz).toFloat,fg44.zz), math.min((zw).toFloat,fg44.zw), math.min((wx).toFloat,fg44.wx), math.min((wy).toFloat,fg44.wy), math.min((wz).toFloat,fg44.wz), math.min((ww).toFloat,fg44.ww))
    def min(dg44: GMat4D) = new IMat4D(math.min((xx).toDouble,dg44.xx), math.min((xy).toDouble,dg44.xy), math.min((xz).toDouble,dg44.xz), math.min((xw).toDouble,dg44.xw), math.min((yx).toDouble,dg44.yx), math.min((yy).toDouble,dg44.yy), math.min((yz).toDouble,dg44.yz), math.min((yw).toDouble,dg44.yw), math.min((zx).toDouble,dg44.zx), math.min((zy).toDouble,dg44.zy), math.min((zz).toDouble,dg44.zz), math.min((zw).toDouble,dg44.zw), math.min((wx).toDouble,dg44.wx), math.min((wy).toDouble,dg44.wy), math.min((wz).toDouble,dg44.wz), math.min((ww).toDouble,dg44.ww))
    def operate(sg44: GMat4S)(fun: (Short,Short)=>Short) = new IMat4S((fun(xx,sg44.xx)).toShort, (fun(xy,sg44.xy)).toShort, (fun(xz,sg44.xz)).toShort, (fun(xw,sg44.xw)).toShort, (fun(yx,sg44.yx)).toShort, (fun(yy,sg44.yy)).toShort, (fun(yz,sg44.yz)).toShort, (fun(yw,sg44.yw)).toShort, (fun(zx,sg44.zx)).toShort, (fun(zy,sg44.zy)).toShort, (fun(zz,sg44.zz)).toShort, (fun(zw,sg44.zw)).toShort, (fun(wx,sg44.wx)).toShort, (fun(wy,sg44.wy)).toShort, (fun(wz,sg44.wz)).toShort, (fun(ww,sg44.ww)).toShort)
    def operate(ig44: GMat4I)(fun: (Int,Int)=>Int) = new IMat4I(fun((xx).toInt,ig44.xx), fun((xy).toInt,ig44.xy), fun((xz).toInt,ig44.xz), fun((xw).toInt,ig44.xw), fun((yx).toInt,ig44.yx), fun((yy).toInt,ig44.yy), fun((yz).toInt,ig44.yz), fun((yw).toInt,ig44.yw), fun((zx).toInt,ig44.zx), fun((zy).toInt,ig44.zy), fun((zz).toInt,ig44.zz), fun((zw).toInt,ig44.zw), fun((wx).toInt,ig44.wx), fun((wy).toInt,ig44.wy), fun((wz).toInt,ig44.wz), fun((ww).toInt,ig44.ww))
    def operate(lg44: GMat4L)(fun: (Long,Long)=>Long) = new IMat4L(fun((xx).toLong,lg44.xx), fun((xy).toLong,lg44.xy), fun((xz).toLong,lg44.xz), fun((xw).toLong,lg44.xw), fun((yx).toLong,lg44.yx), fun((yy).toLong,lg44.yy), fun((yz).toLong,lg44.yz), fun((yw).toLong,lg44.yw), fun((zx).toLong,lg44.zx), fun((zy).toLong,lg44.zy), fun((zz).toLong,lg44.zz), fun((zw).toLong,lg44.zw), fun((wx).toLong,lg44.wx), fun((wy).toLong,lg44.wy), fun((wz).toLong,lg44.wz), fun((ww).toLong,lg44.ww))
    def operate(fg44: GMat4F)(fun: (Float,Float)=>Float) = new IMat4F(fun((xx).toFloat,fg44.xx), fun((xy).toFloat,fg44.xy), fun((xz).toFloat,fg44.xz), fun((xw).toFloat,fg44.xw), fun((yx).toFloat,fg44.yx), fun((yy).toFloat,fg44.yy), fun((yz).toFloat,fg44.yz), fun((yw).toFloat,fg44.yw), fun((zx).toFloat,fg44.zx), fun((zy).toFloat,fg44.zy), fun((zz).toFloat,fg44.zz), fun((zw).toFloat,fg44.zw), fun((wx).toFloat,fg44.wx), fun((wy).toFloat,fg44.wy), fun((wz).toFloat,fg44.wz), fun((ww).toFloat,fg44.ww))
    def operate(dg44: GMat4D)(fun: (Double,Double)=>Double) = new IMat4D(fun((xx).toDouble,dg44.xx), fun((xy).toDouble,dg44.xy), fun((xz).toDouble,dg44.xz), fun((xw).toDouble,dg44.xw), fun((yx).toDouble,dg44.yx), fun((yy).toDouble,dg44.yy), fun((yz).toDouble,dg44.yz), fun((yw).toDouble,dg44.yw), fun((zx).toDouble,dg44.zx), fun((zy).toDouble,dg44.zy), fun((zz).toDouble,dg44.zz), fun((zw).toDouble,dg44.zw), fun((wx).toDouble,dg44.wx), fun((wy).toDouble,dg44.wy), fun((wz).toDouble,dg44.wz), fun((ww).toDouble,dg44.ww))
    def ===(sg44: GMat4S) = xx==sg44.xx && xy==sg44.xy && xz==sg44.xz && xw==sg44.xw && yx==sg44.yx && yy==sg44.yy && yz==sg44.yz && yw==sg44.yw && zx==sg44.zx && zy==sg44.zy && zz==sg44.zz && zw==sg44.zw && wx==sg44.wx && wy==sg44.wy && wz==sg44.wz && ww==sg44.ww
    def ===(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short) = xx==xx0 && xy==xy0 && xz==xz0 && xw==xw0 && yx==yx0 && yy==yy0 && yz==yz0 && yw==yw0 && zx==zx0 && zy==zy0 && zz==zz0 && zw==zw0 && wx==wx0 && wy==wy0 && wz==wz0 && ww==ww0
    def det = (xx*(yy*(zz*ww - zw*wz) + yz*(zw*wy - zy*ww) + yw*(zy*wz - zz*wy)) + xy*(yz*(zw*wx - zx*ww) + yw*(zx*wz - zz*wx) + yx*(zz*ww - zw*wz)) + xz*(yw*(zx*wy - zy*wx) + yx*(zy*ww - zw*wy) + yy*(zw*wx - zx*ww)) + xw*(yx*(zy*wz - zz*wy) + yy*(zz*wx - zx*wz) + yz*(zx*wy - zy*wx))).toShort
    def trace = new IVec4S(xx, yy, zz, ww)
    def xRow = new IVec4S(xx, xy, xz, xw)
    def xCol = new IVec4S(xx, yx, zx, wx)
    def yRow = new IVec4S(yx, yy, yz, yw)
    def yCol = new IVec4S(xy, yy, zy, wy)
    def zRow = new IVec4S(zx, zy, zz, zw)
    def zCol = new IVec4S(xz, yz, zz, wz)
    def wRow = new IVec4S(wx, wy, wz, ww)
    def wCol = new IVec4S(xw, yw, zw, ww)
    def t = new IMat4S(xx, yx, zx, wx, xy, yy, zy, wy, xz, yz, zz, wz, xw, yw, zw, ww)
    def **(sg4: GVec4S) = new IVec4S((xx*sg4.x+xy*sg4.y+xz*sg4.z+xw*sg4.w).toShort, (yx*sg4.x+yy*sg4.y+yz*sg4.z+yw*sg4.w).toShort, (zx*sg4.x+zy*sg4.y+zz*sg4.z+zw*sg4.w).toShort, (wx*sg4.x+wy*sg4.y+wz*sg4.z+ww*sg4.w).toShort)
    def **(ig4: GVec4I) = new IVec4I((xx).toInt*ig4.x+(xy).toInt*ig4.y+(xz).toInt*ig4.z+(xw).toInt*ig4.w, (yx).toInt*ig4.x+(yy).toInt*ig4.y+(yz).toInt*ig4.z+(yw).toInt*ig4.w, (zx).toInt*ig4.x+(zy).toInt*ig4.y+(zz).toInt*ig4.z+(zw).toInt*ig4.w, (wx).toInt*ig4.x+(wy).toInt*ig4.y+(wz).toInt*ig4.z+(ww).toInt*ig4.w)
    def **(lg4: GVec4L) = new IVec4L((xx).toLong*lg4.x+(xy).toLong*lg4.y+(xz).toLong*lg4.z+(xw).toLong*lg4.w, (yx).toLong*lg4.x+(yy).toLong*lg4.y+(yz).toLong*lg4.z+(yw).toLong*lg4.w, (zx).toLong*lg4.x+(zy).toLong*lg4.y+(zz).toLong*lg4.z+(zw).toLong*lg4.w, (wx).toLong*lg4.x+(wy).toLong*lg4.y+(wz).toLong*lg4.z+(ww).toLong*lg4.w)
    def **(fg4: GVec4F) = new IVec4F((xx).toFloat*fg4.x+(xy).toFloat*fg4.y+(xz).toFloat*fg4.z+(xw).toFloat*fg4.w, (yx).toFloat*fg4.x+(yy).toFloat*fg4.y+(yz).toFloat*fg4.z+(yw).toFloat*fg4.w, (zx).toFloat*fg4.x+(zy).toFloat*fg4.y+(zz).toFloat*fg4.z+(zw).toFloat*fg4.w, (wx).toFloat*fg4.x+(wy).toFloat*fg4.y+(wz).toFloat*fg4.z+(ww).toFloat*fg4.w)
    def **(dg4: GVec4D) = new IVec4D((xx).toDouble*dg4.x+(xy).toDouble*dg4.y+(xz).toDouble*dg4.z+(xw).toDouble*dg4.w, (yx).toDouble*dg4.x+(yy).toDouble*dg4.y+(yz).toDouble*dg4.z+(yw).toDouble*dg4.w, (zx).toDouble*dg4.x+(zy).toDouble*dg4.y+(zz).toDouble*dg4.z+(zw).toDouble*dg4.w, (wx).toDouble*dg4.x+(wy).toDouble*dg4.y+(wz).toDouble*dg4.z+(ww).toDouble*dg4.w)
    def **(sg44: GMat4S) = new IMat4S((xx*sg44.xx+xy*sg44.yx+xz*sg44.zx+xw*sg44.wx).toShort, (xx*sg44.xy+xy*sg44.yy+xz*sg44.zy+xw*sg44.wy).toShort, (xx*sg44.xz+xy*sg44.yz+xz*sg44.zz+xw*sg44.wz).toShort, (xx*sg44.xw+xy*sg44.yw+xz*sg44.zw+xw*sg44.ww).toShort, (yx*sg44.xx+yy*sg44.yx+yz*sg44.zx+yw*sg44.wx).toShort, (yx*sg44.xy+yy*sg44.yy+yz*sg44.zy+yw*sg44.wy).toShort, (yx*sg44.xz+yy*sg44.yz+yz*sg44.zz+yw*sg44.wz).toShort, (yx*sg44.xw+yy*sg44.yw+yz*sg44.zw+yw*sg44.ww).toShort, (zx*sg44.xx+zy*sg44.yx+zz*sg44.zx+zw*sg44.wx).toShort, (zx*sg44.xy+zy*sg44.yy+zz*sg44.zy+zw*sg44.wy).toShort, (zx*sg44.xz+zy*sg44.yz+zz*sg44.zz+zw*sg44.wz).toShort, (zx*sg44.xw+zy*sg44.yw+zz*sg44.zw+zw*sg44.ww).toShort, (wx*sg44.xx+wy*sg44.yx+wz*sg44.zx+ww*sg44.wx).toShort, (wx*sg44.xy+wy*sg44.yy+wz*sg44.zy+ww*sg44.wy).toShort, (wx*sg44.xz+wy*sg44.yz+wz*sg44.zz+ww*sg44.wz).toShort, (wx*sg44.xw+wy*sg44.yw+wz*sg44.zw+ww*sg44.ww).toShort)
    def **(ig44: GMat4I) = new IMat4I((xx).toInt*ig44.xx+(xy).toInt*ig44.yx+(xz).toInt*ig44.zx+(xw).toInt*ig44.wx, (xx).toInt*ig44.xy+(xy).toInt*ig44.yy+(xz).toInt*ig44.zy+(xw).toInt*ig44.wy, (xx).toInt*ig44.xz+(xy).toInt*ig44.yz+(xz).toInt*ig44.zz+(xw).toInt*ig44.wz, (xx).toInt*ig44.xw+(xy).toInt*ig44.yw+(xz).toInt*ig44.zw+(xw).toInt*ig44.ww, (yx).toInt*ig44.xx+(yy).toInt*ig44.yx+(yz).toInt*ig44.zx+(yw).toInt*ig44.wx, (yx).toInt*ig44.xy+(yy).toInt*ig44.yy+(yz).toInt*ig44.zy+(yw).toInt*ig44.wy, (yx).toInt*ig44.xz+(yy).toInt*ig44.yz+(yz).toInt*ig44.zz+(yw).toInt*ig44.wz, (yx).toInt*ig44.xw+(yy).toInt*ig44.yw+(yz).toInt*ig44.zw+(yw).toInt*ig44.ww, (zx).toInt*ig44.xx+(zy).toInt*ig44.yx+(zz).toInt*ig44.zx+(zw).toInt*ig44.wx, (zx).toInt*ig44.xy+(zy).toInt*ig44.yy+(zz).toInt*ig44.zy+(zw).toInt*ig44.wy, (zx).toInt*ig44.xz+(zy).toInt*ig44.yz+(zz).toInt*ig44.zz+(zw).toInt*ig44.wz, (zx).toInt*ig44.xw+(zy).toInt*ig44.yw+(zz).toInt*ig44.zw+(zw).toInt*ig44.ww, (wx).toInt*ig44.xx+(wy).toInt*ig44.yx+(wz).toInt*ig44.zx+(ww).toInt*ig44.wx, (wx).toInt*ig44.xy+(wy).toInt*ig44.yy+(wz).toInt*ig44.zy+(ww).toInt*ig44.wy, (wx).toInt*ig44.xz+(wy).toInt*ig44.yz+(wz).toInt*ig44.zz+(ww).toInt*ig44.wz, (wx).toInt*ig44.xw+(wy).toInt*ig44.yw+(wz).toInt*ig44.zw+(ww).toInt*ig44.ww)
    def **(lg44: GMat4L) = new IMat4L((xx).toLong*lg44.xx+(xy).toLong*lg44.yx+(xz).toLong*lg44.zx+(xw).toLong*lg44.wx, (xx).toLong*lg44.xy+(xy).toLong*lg44.yy+(xz).toLong*lg44.zy+(xw).toLong*lg44.wy, (xx).toLong*lg44.xz+(xy).toLong*lg44.yz+(xz).toLong*lg44.zz+(xw).toLong*lg44.wz, (xx).toLong*lg44.xw+(xy).toLong*lg44.yw+(xz).toLong*lg44.zw+(xw).toLong*lg44.ww, (yx).toLong*lg44.xx+(yy).toLong*lg44.yx+(yz).toLong*lg44.zx+(yw).toLong*lg44.wx, (yx).toLong*lg44.xy+(yy).toLong*lg44.yy+(yz).toLong*lg44.zy+(yw).toLong*lg44.wy, (yx).toLong*lg44.xz+(yy).toLong*lg44.yz+(yz).toLong*lg44.zz+(yw).toLong*lg44.wz, (yx).toLong*lg44.xw+(yy).toLong*lg44.yw+(yz).toLong*lg44.zw+(yw).toLong*lg44.ww, (zx).toLong*lg44.xx+(zy).toLong*lg44.yx+(zz).toLong*lg44.zx+(zw).toLong*lg44.wx, (zx).toLong*lg44.xy+(zy).toLong*lg44.yy+(zz).toLong*lg44.zy+(zw).toLong*lg44.wy, (zx).toLong*lg44.xz+(zy).toLong*lg44.yz+(zz).toLong*lg44.zz+(zw).toLong*lg44.wz, (zx).toLong*lg44.xw+(zy).toLong*lg44.yw+(zz).toLong*lg44.zw+(zw).toLong*lg44.ww, (wx).toLong*lg44.xx+(wy).toLong*lg44.yx+(wz).toLong*lg44.zx+(ww).toLong*lg44.wx, (wx).toLong*lg44.xy+(wy).toLong*lg44.yy+(wz).toLong*lg44.zy+(ww).toLong*lg44.wy, (wx).toLong*lg44.xz+(wy).toLong*lg44.yz+(wz).toLong*lg44.zz+(ww).toLong*lg44.wz, (wx).toLong*lg44.xw+(wy).toLong*lg44.yw+(wz).toLong*lg44.zw+(ww).toLong*lg44.ww)
    def **(fg44: GMat4F) = new IMat4F((xx).toFloat*fg44.xx+(xy).toFloat*fg44.yx+(xz).toFloat*fg44.zx+(xw).toFloat*fg44.wx, (xx).toFloat*fg44.xy+(xy).toFloat*fg44.yy+(xz).toFloat*fg44.zy+(xw).toFloat*fg44.wy, (xx).toFloat*fg44.xz+(xy).toFloat*fg44.yz+(xz).toFloat*fg44.zz+(xw).toFloat*fg44.wz, (xx).toFloat*fg44.xw+(xy).toFloat*fg44.yw+(xz).toFloat*fg44.zw+(xw).toFloat*fg44.ww, (yx).toFloat*fg44.xx+(yy).toFloat*fg44.yx+(yz).toFloat*fg44.zx+(yw).toFloat*fg44.wx, (yx).toFloat*fg44.xy+(yy).toFloat*fg44.yy+(yz).toFloat*fg44.zy+(yw).toFloat*fg44.wy, (yx).toFloat*fg44.xz+(yy).toFloat*fg44.yz+(yz).toFloat*fg44.zz+(yw).toFloat*fg44.wz, (yx).toFloat*fg44.xw+(yy).toFloat*fg44.yw+(yz).toFloat*fg44.zw+(yw).toFloat*fg44.ww, (zx).toFloat*fg44.xx+(zy).toFloat*fg44.yx+(zz).toFloat*fg44.zx+(zw).toFloat*fg44.wx, (zx).toFloat*fg44.xy+(zy).toFloat*fg44.yy+(zz).toFloat*fg44.zy+(zw).toFloat*fg44.wy, (zx).toFloat*fg44.xz+(zy).toFloat*fg44.yz+(zz).toFloat*fg44.zz+(zw).toFloat*fg44.wz, (zx).toFloat*fg44.xw+(zy).toFloat*fg44.yw+(zz).toFloat*fg44.zw+(zw).toFloat*fg44.ww, (wx).toFloat*fg44.xx+(wy).toFloat*fg44.yx+(wz).toFloat*fg44.zx+(ww).toFloat*fg44.wx, (wx).toFloat*fg44.xy+(wy).toFloat*fg44.yy+(wz).toFloat*fg44.zy+(ww).toFloat*fg44.wy, (wx).toFloat*fg44.xz+(wy).toFloat*fg44.yz+(wz).toFloat*fg44.zz+(ww).toFloat*fg44.wz, (wx).toFloat*fg44.xw+(wy).toFloat*fg44.yw+(wz).toFloat*fg44.zw+(ww).toFloat*fg44.ww)
    def **(dg44: GMat4D) = new IMat4D((xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx, (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy, (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz, (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww, (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx, (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy, (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz, (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww, (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx, (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy, (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz, (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww, (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx, (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy, (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz, (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww)
  } // class GMat4S

  object GMat4S {
    def apply(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): GMat4S = new IMat4S(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): GMat4S = IMat4S.parse(str)
    val identity: GMat4S = IMat4S.identity
    val zero: GMat4S = IMat4S.zero
    def traced(sg4: GVec4S) = new IMat4S(sg4.x, 0, 0, 0, 0, sg4.y, 0, 0, 0, 0, sg4.z, 0, 0, 0, 0, sg4.w)
  } // object GMat4S


  abstract class GMat4I extends Cloneable {
    def xx: Int
    def xy: Int
    def xz: Int
    def xw: Int
    def yx: Int
    def yy: Int
    def yz: Int
    def yw: Int
    def zx: Int
    def zy: Int
    def zz: Int
    def zw: Int
    def wx: Int
    def wy: Int
    def wz: Int
    def ww: Int
    override def toString = "["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]"
    override def hashCode = (((((((((((((((ww)*16777619 ^ wz)*16777619 ^ wy)*16777619 ^ wx)*16777619 ^ zw)*16777619 ^ zz)*16777619 ^ zy)*16777619 ^ zx)*16777619 ^ yw)*16777619 ^ yz)*16777619 ^ yy)*16777619 ^ yx)*16777619 ^ xw)*16777619 ^ xz)*16777619 ^ xy)*16777619 ^ xx
    override def equals(any: Any) = any match { case sg44: GMat4S => {xx==sg44.xx && xy==sg44.xy && xz==sg44.xz && xw==sg44.xw && yx==sg44.yx && yy==sg44.yy && yz==sg44.yz && yw==sg44.yw && zx==sg44.zx && zy==sg44.zy && zz==sg44.zz && zw==sg44.zw && wx==sg44.wx && wy==sg44.wy && wz==sg44.wz && ww==sg44.ww }; case ig44: GMat4I => {xx==ig44.xx && xy==ig44.xy && xz==ig44.xz && xw==ig44.xw && yx==ig44.yx && yy==ig44.yy && yz==ig44.yz && yw==ig44.yw && zx==ig44.zx && zy==ig44.zy && zz==ig44.zz && zw==ig44.zw && wx==ig44.wx && wy==ig44.wy && wz==ig44.wz && ww==ig44.ww }; case lg44: GMat4L => {xx==lg44.xx && xy==lg44.xy && xz==lg44.xz && xw==lg44.xw && yx==lg44.yx && yy==lg44.yy && yz==lg44.yz && yw==lg44.yw && zx==lg44.zx && zy==lg44.zy && zz==lg44.zz && zw==lg44.zw && wx==lg44.wx && wy==lg44.wy && wz==lg44.wz && ww==lg44.ww }; case fg44: GMat4F => {xx==fg44.xx && xy==fg44.xy && xz==fg44.xz && xw==fg44.xw && yx==fg44.yx && yy==fg44.yy && yz==fg44.yz && yw==fg44.yw && zx==fg44.zx && zy==fg44.zy && zz==fg44.zz && zw==fg44.zw && wx==fg44.wx && wy==fg44.wy && wz==fg44.wz && ww==fg44.ww }; case dg44: GMat4D => {xx==dg44.xx && xy==dg44.xy && xz==dg44.xz && xw==dg44.xw && yx==dg44.yx && yy==dg44.yy && yz==dg44.yz && yw==dg44.yw && zx==dg44.zx && zy==dg44.zy && zz==dg44.zz && zw==dg44.zw && wx==dg44.wx && wy==dg44.wy && wz==dg44.wz && ww==dg44.ww }; case _ => false }
    override def clone(): GMat4I = new IMat4I(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def toS: GMat4S = new IMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, xw0: Int = xw, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, yw0: Int = yw, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz, zw0: Int = zw, wx0: Int = wx, wy0: Int = wy, wz0: Int = wz, ww0: Int = ww): GMat4I = new IMat4I(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def trim: GMat3I = new IMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapI(fun: Int => Int) = new IMat4I(fun(xx), fun(xy), fun(xz), fun(xw), fun(yx), fun(yy), fun(yz), fun(yw), fun(zx), fun(zy), fun(zz), fun(zw), fun(wx), fun(wy), fun(wz), fun(ww))
    def toL: GMat4L = new IMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    def mapL(fun: Int => Long) = new IMat4L((fun(xx)).toLong, (fun(xy)).toLong, (fun(xz)).toLong, (fun(xw)).toLong, (fun(yx)).toLong, (fun(yy)).toLong, (fun(yz)).toLong, (fun(yw)).toLong, (fun(zx)).toLong, (fun(zy)).toLong, (fun(zz)).toLong, (fun(zw)).toLong, (fun(wx)).toLong, (fun(wy)).toLong, (fun(wz)).toLong, (fun(ww)).toLong)
    def toF: GMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    def mapF(fun: Int => Float) = new IMat4F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(xz)).toFloat, (fun(xw)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat, (fun(yz)).toFloat, (fun(yw)).toFloat, (fun(zx)).toFloat, (fun(zy)).toFloat, (fun(zz)).toFloat, (fun(zw)).toFloat, (fun(wx)).toFloat, (fun(wy)).toFloat, (fun(wz)).toFloat, (fun(ww)).toFloat)
    def toD: GMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def mapD(fun: Int => Double) = new IMat4D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(xz)).toDouble, (fun(xw)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble, (fun(yz)).toDouble, (fun(yw)).toDouble, (fun(zx)).toDouble, (fun(zy)).toDouble, (fun(zz)).toDouble, (fun(zw)).toDouble, (fun(wx)).toDouble, (fun(wy)).toDouble, (fun(wz)).toDouble, (fun(ww)).toDouble)
    def imm = new IMat4I(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def mut = new MMat4I(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def unary_-() = new IMat4I(-xx, -xy, -xz, -xw, -yx, -yy, -yz, -yw, -zx, -zy, -zz, -zw, -wx, -wy, -wz, -ww)
    def +(x0: Int) = new IMat4I(xx + x0, xy + x0, xz + x0, xw + x0, yx + x0, yy + x0, yz + x0, yw + x0, zx + x0, zy + x0, zz + x0, zw + x0, wx + x0, wy + x0, wz + x0, ww + x0)
    def +(x0: Long) = new IMat4L((xx).toLong + x0, (xy).toLong + x0, (xz).toLong + x0, (xw).toLong + x0, (yx).toLong + x0, (yy).toLong + x0, (yz).toLong + x0, (yw).toLong + x0, (zx).toLong + x0, (zy).toLong + x0, (zz).toLong + x0, (zw).toLong + x0, (wx).toLong + x0, (wy).toLong + x0, (wz).toLong + x0, (ww).toLong + x0)
    def +(x0: Float) = new IMat4F((xx).toFloat + x0, (xy).toFloat + x0, (xz).toFloat + x0, (xw).toFloat + x0, (yx).toFloat + x0, (yy).toFloat + x0, (yz).toFloat + x0, (yw).toFloat + x0, (zx).toFloat + x0, (zy).toFloat + x0, (zz).toFloat + x0, (zw).toFloat + x0, (wx).toFloat + x0, (wy).toFloat + x0, (wz).toFloat + x0, (ww).toFloat + x0)
    def +(x0: Double) = new IMat4D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (xw).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (yw).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0, (zw).toDouble + x0, (wx).toDouble + x0, (wy).toDouble + x0, (wz).toDouble + x0, (ww).toDouble + x0)
    def +(sg44: GMat4S) = new IMat4I(xx + (sg44.xx).toInt, xy + (sg44.xy).toInt, xz + (sg44.xz).toInt, xw + (sg44.xw).toInt, yx + (sg44.yx).toInt, yy + (sg44.yy).toInt, yz + (sg44.yz).toInt, yw + (sg44.yw).toInt, zx + (sg44.zx).toInt, zy + (sg44.zy).toInt, zz + (sg44.zz).toInt, zw + (sg44.zw).toInt, wx + (sg44.wx).toInt, wy + (sg44.wy).toInt, wz + (sg44.wz).toInt, ww + (sg44.ww).toInt)
    def +(ig44: GMat4I) = new IMat4I(xx + ig44.xx, xy + ig44.xy, xz + ig44.xz, xw + ig44.xw, yx + ig44.yx, yy + ig44.yy, yz + ig44.yz, yw + ig44.yw, zx + ig44.zx, zy + ig44.zy, zz + ig44.zz, zw + ig44.zw, wx + ig44.wx, wy + ig44.wy, wz + ig44.wz, ww + ig44.ww)
    def +(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int) = new IMat4I(xx + xx0, xy + xy0, xz + xz0, xw + xw0, yx + yx0, yy + yy0, yz + yz0, yw + yw0, zx + zx0, zy + zy0, zz + zz0, zw + zw0, wx + wx0, wy + wy0, wz + wz0, ww + ww0)
    def +(lg44: GMat4L) = new IMat4L((xx).toLong + lg44.xx, (xy).toLong + lg44.xy, (xz).toLong + lg44.xz, (xw).toLong + lg44.xw, (yx).toLong + lg44.yx, (yy).toLong + lg44.yy, (yz).toLong + lg44.yz, (yw).toLong + lg44.yw, (zx).toLong + lg44.zx, (zy).toLong + lg44.zy, (zz).toLong + lg44.zz, (zw).toLong + lg44.zw, (wx).toLong + lg44.wx, (wy).toLong + lg44.wy, (wz).toLong + lg44.wz, (ww).toLong + lg44.ww)
    def +(fg44: GMat4F) = new IMat4F((xx).toFloat + fg44.xx, (xy).toFloat + fg44.xy, (xz).toFloat + fg44.xz, (xw).toFloat + fg44.xw, (yx).toFloat + fg44.yx, (yy).toFloat + fg44.yy, (yz).toFloat + fg44.yz, (yw).toFloat + fg44.yw, (zx).toFloat + fg44.zx, (zy).toFloat + fg44.zy, (zz).toFloat + fg44.zz, (zw).toFloat + fg44.zw, (wx).toFloat + fg44.wx, (wy).toFloat + fg44.wy, (wz).toFloat + fg44.wz, (ww).toFloat + fg44.ww)
    def +(dg44: GMat4D) = new IMat4D((xx).toDouble + dg44.xx, (xy).toDouble + dg44.xy, (xz).toDouble + dg44.xz, (xw).toDouble + dg44.xw, (yx).toDouble + dg44.yx, (yy).toDouble + dg44.yy, (yz).toDouble + dg44.yz, (yw).toDouble + dg44.yw, (zx).toDouble + dg44.zx, (zy).toDouble + dg44.zy, (zz).toDouble + dg44.zz, (zw).toDouble + dg44.zw, (wx).toDouble + dg44.wx, (wy).toDouble + dg44.wy, (wz).toDouble + dg44.wz, (ww).toDouble + dg44.ww)
    def -(x0: Int) = new IMat4I(xx - x0, xy - x0, xz - x0, xw - x0, yx - x0, yy - x0, yz - x0, yw - x0, zx - x0, zy - x0, zz - x0, zw - x0, wx - x0, wy - x0, wz - x0, ww - x0)
    def -(x0: Long) = new IMat4L((xx).toLong - x0, (xy).toLong - x0, (xz).toLong - x0, (xw).toLong - x0, (yx).toLong - x0, (yy).toLong - x0, (yz).toLong - x0, (yw).toLong - x0, (zx).toLong - x0, (zy).toLong - x0, (zz).toLong - x0, (zw).toLong - x0, (wx).toLong - x0, (wy).toLong - x0, (wz).toLong - x0, (ww).toLong - x0)
    def -(x0: Float) = new IMat4F((xx).toFloat - x0, (xy).toFloat - x0, (xz).toFloat - x0, (xw).toFloat - x0, (yx).toFloat - x0, (yy).toFloat - x0, (yz).toFloat - x0, (yw).toFloat - x0, (zx).toFloat - x0, (zy).toFloat - x0, (zz).toFloat - x0, (zw).toFloat - x0, (wx).toFloat - x0, (wy).toFloat - x0, (wz).toFloat - x0, (ww).toFloat - x0)
    def -(x0: Double) = new IMat4D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (xw).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (yw).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0, (zw).toDouble - x0, (wx).toDouble - x0, (wy).toDouble - x0, (wz).toDouble - x0, (ww).toDouble - x0)
    def -(sg44: GMat4S) = new IMat4I(xx - (sg44.xx).toInt, xy - (sg44.xy).toInt, xz - (sg44.xz).toInt, xw - (sg44.xw).toInt, yx - (sg44.yx).toInt, yy - (sg44.yy).toInt, yz - (sg44.yz).toInt, yw - (sg44.yw).toInt, zx - (sg44.zx).toInt, zy - (sg44.zy).toInt, zz - (sg44.zz).toInt, zw - (sg44.zw).toInt, wx - (sg44.wx).toInt, wy - (sg44.wy).toInt, wz - (sg44.wz).toInt, ww - (sg44.ww).toInt)
    def -(ig44: GMat4I) = new IMat4I(xx - ig44.xx, xy - ig44.xy, xz - ig44.xz, xw - ig44.xw, yx - ig44.yx, yy - ig44.yy, yz - ig44.yz, yw - ig44.yw, zx - ig44.zx, zy - ig44.zy, zz - ig44.zz, zw - ig44.zw, wx - ig44.wx, wy - ig44.wy, wz - ig44.wz, ww - ig44.ww)
    def -(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int) = new IMat4I(xx - xx0, xy - xy0, xz - xz0, xw - xw0, yx - yx0, yy - yy0, yz - yz0, yw - yw0, zx - zx0, zy - zy0, zz - zz0, zw - zw0, wx - wx0, wy - wy0, wz - wz0, ww - ww0)
    def -(lg44: GMat4L) = new IMat4L((xx).toLong - lg44.xx, (xy).toLong - lg44.xy, (xz).toLong - lg44.xz, (xw).toLong - lg44.xw, (yx).toLong - lg44.yx, (yy).toLong - lg44.yy, (yz).toLong - lg44.yz, (yw).toLong - lg44.yw, (zx).toLong - lg44.zx, (zy).toLong - lg44.zy, (zz).toLong - lg44.zz, (zw).toLong - lg44.zw, (wx).toLong - lg44.wx, (wy).toLong - lg44.wy, (wz).toLong - lg44.wz, (ww).toLong - lg44.ww)
    def -(fg44: GMat4F) = new IMat4F((xx).toFloat - fg44.xx, (xy).toFloat - fg44.xy, (xz).toFloat - fg44.xz, (xw).toFloat - fg44.xw, (yx).toFloat - fg44.yx, (yy).toFloat - fg44.yy, (yz).toFloat - fg44.yz, (yw).toFloat - fg44.yw, (zx).toFloat - fg44.zx, (zy).toFloat - fg44.zy, (zz).toFloat - fg44.zz, (zw).toFloat - fg44.zw, (wx).toFloat - fg44.wx, (wy).toFloat - fg44.wy, (wz).toFloat - fg44.wz, (ww).toFloat - fg44.ww)
    def -(dg44: GMat4D) = new IMat4D((xx).toDouble - dg44.xx, (xy).toDouble - dg44.xy, (xz).toDouble - dg44.xz, (xw).toDouble - dg44.xw, (yx).toDouble - dg44.yx, (yy).toDouble - dg44.yy, (yz).toDouble - dg44.yz, (yw).toDouble - dg44.yw, (zx).toDouble - dg44.zx, (zy).toDouble - dg44.zy, (zz).toDouble - dg44.zz, (zw).toDouble - dg44.zw, (wx).toDouble - dg44.wx, (wy).toDouble - dg44.wy, (wz).toDouble - dg44.wz, (ww).toDouble - dg44.ww)
    def *(x0: Int) = new IMat4I(xx * x0, xy * x0, xz * x0, xw * x0, yx * x0, yy * x0, yz * x0, yw * x0, zx * x0, zy * x0, zz * x0, zw * x0, wx * x0, wy * x0, wz * x0, ww * x0)
    def *(x0: Long) = new IMat4L((xx).toLong * x0, (xy).toLong * x0, (xz).toLong * x0, (xw).toLong * x0, (yx).toLong * x0, (yy).toLong * x0, (yz).toLong * x0, (yw).toLong * x0, (zx).toLong * x0, (zy).toLong * x0, (zz).toLong * x0, (zw).toLong * x0, (wx).toLong * x0, (wy).toLong * x0, (wz).toLong * x0, (ww).toLong * x0)
    def *(x0: Float) = new IMat4F((xx).toFloat * x0, (xy).toFloat * x0, (xz).toFloat * x0, (xw).toFloat * x0, (yx).toFloat * x0, (yy).toFloat * x0, (yz).toFloat * x0, (yw).toFloat * x0, (zx).toFloat * x0, (zy).toFloat * x0, (zz).toFloat * x0, (zw).toFloat * x0, (wx).toFloat * x0, (wy).toFloat * x0, (wz).toFloat * x0, (ww).toFloat * x0)
    def *(x0: Double) = new IMat4D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (xw).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (yw).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0, (zw).toDouble * x0, (wx).toDouble * x0, (wy).toDouble * x0, (wz).toDouble * x0, (ww).toDouble * x0)
    def *(sg44: GMat4S) = new IMat4I(xx * (sg44.xx).toInt, xy * (sg44.xy).toInt, xz * (sg44.xz).toInt, xw * (sg44.xw).toInt, yx * (sg44.yx).toInt, yy * (sg44.yy).toInt, yz * (sg44.yz).toInt, yw * (sg44.yw).toInt, zx * (sg44.zx).toInt, zy * (sg44.zy).toInt, zz * (sg44.zz).toInt, zw * (sg44.zw).toInt, wx * (sg44.wx).toInt, wy * (sg44.wy).toInt, wz * (sg44.wz).toInt, ww * (sg44.ww).toInt)
    def *(ig44: GMat4I) = new IMat4I(xx * ig44.xx, xy * ig44.xy, xz * ig44.xz, xw * ig44.xw, yx * ig44.yx, yy * ig44.yy, yz * ig44.yz, yw * ig44.yw, zx * ig44.zx, zy * ig44.zy, zz * ig44.zz, zw * ig44.zw, wx * ig44.wx, wy * ig44.wy, wz * ig44.wz, ww * ig44.ww)
    def *(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int) = new IMat4I(xx * xx0, xy * xy0, xz * xz0, xw * xw0, yx * yx0, yy * yy0, yz * yz0, yw * yw0, zx * zx0, zy * zy0, zz * zz0, zw * zw0, wx * wx0, wy * wy0, wz * wz0, ww * ww0)
    def *(lg44: GMat4L) = new IMat4L((xx).toLong * lg44.xx, (xy).toLong * lg44.xy, (xz).toLong * lg44.xz, (xw).toLong * lg44.xw, (yx).toLong * lg44.yx, (yy).toLong * lg44.yy, (yz).toLong * lg44.yz, (yw).toLong * lg44.yw, (zx).toLong * lg44.zx, (zy).toLong * lg44.zy, (zz).toLong * lg44.zz, (zw).toLong * lg44.zw, (wx).toLong * lg44.wx, (wy).toLong * lg44.wy, (wz).toLong * lg44.wz, (ww).toLong * lg44.ww)
    def *(fg44: GMat4F) = new IMat4F((xx).toFloat * fg44.xx, (xy).toFloat * fg44.xy, (xz).toFloat * fg44.xz, (xw).toFloat * fg44.xw, (yx).toFloat * fg44.yx, (yy).toFloat * fg44.yy, (yz).toFloat * fg44.yz, (yw).toFloat * fg44.yw, (zx).toFloat * fg44.zx, (zy).toFloat * fg44.zy, (zz).toFloat * fg44.zz, (zw).toFloat * fg44.zw, (wx).toFloat * fg44.wx, (wy).toFloat * fg44.wy, (wz).toFloat * fg44.wz, (ww).toFloat * fg44.ww)
    def *(dg44: GMat4D) = new IMat4D((xx).toDouble * dg44.xx, (xy).toDouble * dg44.xy, (xz).toDouble * dg44.xz, (xw).toDouble * dg44.xw, (yx).toDouble * dg44.yx, (yy).toDouble * dg44.yy, (yz).toDouble * dg44.yz, (yw).toDouble * dg44.yw, (zx).toDouble * dg44.zx, (zy).toDouble * dg44.zy, (zz).toDouble * dg44.zz, (zw).toDouble * dg44.zw, (wx).toDouble * dg44.wx, (wy).toDouble * dg44.wy, (wz).toDouble * dg44.wz, (ww).toDouble * dg44.ww)
    def /(x0: Int) = new IMat4I(xx / x0, xy / x0, xz / x0, xw / x0, yx / x0, yy / x0, yz / x0, yw / x0, zx / x0, zy / x0, zz / x0, zw / x0, wx / x0, wy / x0, wz / x0, ww / x0)
    def /(x0: Long) = new IMat4L((xx).toLong / x0, (xy).toLong / x0, (xz).toLong / x0, (xw).toLong / x0, (yx).toLong / x0, (yy).toLong / x0, (yz).toLong / x0, (yw).toLong / x0, (zx).toLong / x0, (zy).toLong / x0, (zz).toLong / x0, (zw).toLong / x0, (wx).toLong / x0, (wy).toLong / x0, (wz).toLong / x0, (ww).toLong / x0)
    def /(x0: Float) = new IMat4F((xx).toFloat / x0, (xy).toFloat / x0, (xz).toFloat / x0, (xw).toFloat / x0, (yx).toFloat / x0, (yy).toFloat / x0, (yz).toFloat / x0, (yw).toFloat / x0, (zx).toFloat / x0, (zy).toFloat / x0, (zz).toFloat / x0, (zw).toFloat / x0, (wx).toFloat / x0, (wy).toFloat / x0, (wz).toFloat / x0, (ww).toFloat / x0)
    def /(x0: Double) = new IMat4D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (xw).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (yw).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0, (zw).toDouble / x0, (wx).toDouble / x0, (wy).toDouble / x0, (wz).toDouble / x0, (ww).toDouble / x0)
    def /(sg44: GMat4S) = new IMat4I(xx / (sg44.xx).toInt, xy / (sg44.xy).toInt, xz / (sg44.xz).toInt, xw / (sg44.xw).toInt, yx / (sg44.yx).toInt, yy / (sg44.yy).toInt, yz / (sg44.yz).toInt, yw / (sg44.yw).toInt, zx / (sg44.zx).toInt, zy / (sg44.zy).toInt, zz / (sg44.zz).toInt, zw / (sg44.zw).toInt, wx / (sg44.wx).toInt, wy / (sg44.wy).toInt, wz / (sg44.wz).toInt, ww / (sg44.ww).toInt)
    def /(ig44: GMat4I) = new IMat4I(xx / ig44.xx, xy / ig44.xy, xz / ig44.xz, xw / ig44.xw, yx / ig44.yx, yy / ig44.yy, yz / ig44.yz, yw / ig44.yw, zx / ig44.zx, zy / ig44.zy, zz / ig44.zz, zw / ig44.zw, wx / ig44.wx, wy / ig44.wy, wz / ig44.wz, ww / ig44.ww)
    def /(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int) = new IMat4I(xx / xx0, xy / xy0, xz / xz0, xw / xw0, yx / yx0, yy / yy0, yz / yz0, yw / yw0, zx / zx0, zy / zy0, zz / zz0, zw / zw0, wx / wx0, wy / wy0, wz / wz0, ww / ww0)
    def /(lg44: GMat4L) = new IMat4L((xx).toLong / lg44.xx, (xy).toLong / lg44.xy, (xz).toLong / lg44.xz, (xw).toLong / lg44.xw, (yx).toLong / lg44.yx, (yy).toLong / lg44.yy, (yz).toLong / lg44.yz, (yw).toLong / lg44.yw, (zx).toLong / lg44.zx, (zy).toLong / lg44.zy, (zz).toLong / lg44.zz, (zw).toLong / lg44.zw, (wx).toLong / lg44.wx, (wy).toLong / lg44.wy, (wz).toLong / lg44.wz, (ww).toLong / lg44.ww)
    def /(fg44: GMat4F) = new IMat4F((xx).toFloat / fg44.xx, (xy).toFloat / fg44.xy, (xz).toFloat / fg44.xz, (xw).toFloat / fg44.xw, (yx).toFloat / fg44.yx, (yy).toFloat / fg44.yy, (yz).toFloat / fg44.yz, (yw).toFloat / fg44.yw, (zx).toFloat / fg44.zx, (zy).toFloat / fg44.zy, (zz).toFloat / fg44.zz, (zw).toFloat / fg44.zw, (wx).toFloat / fg44.wx, (wy).toFloat / fg44.wy, (wz).toFloat / fg44.wz, (ww).toFloat / fg44.ww)
    def /(dg44: GMat4D) = new IMat4D((xx).toDouble / dg44.xx, (xy).toDouble / dg44.xy, (xz).toDouble / dg44.xz, (xw).toDouble / dg44.xw, (yx).toDouble / dg44.yx, (yy).toDouble / dg44.yy, (yz).toDouble / dg44.yz, (yw).toDouble / dg44.yw, (zx).toDouble / dg44.zx, (zy).toDouble / dg44.zy, (zz).toDouble / dg44.zz, (zw).toDouble / dg44.zw, (wx).toDouble / dg44.wx, (wy).toDouble / dg44.wy, (wz).toDouble / dg44.wz, (ww).toDouble / dg44.ww)
    def max(x0: Int) = new IMat4I(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(xw,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(yw,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0), math.max(zw,x0), math.max(wx,x0), math.max(wy,x0), math.max(wz,x0), math.max(ww,x0))
    def max(x0: Long) = new IMat4L(math.max((xx).toLong,x0), math.max((xy).toLong,x0), math.max((xz).toLong,x0), math.max((xw).toLong,x0), math.max((yx).toLong,x0), math.max((yy).toLong,x0), math.max((yz).toLong,x0), math.max((yw).toLong,x0), math.max((zx).toLong,x0), math.max((zy).toLong,x0), math.max((zz).toLong,x0), math.max((zw).toLong,x0), math.max((wx).toLong,x0), math.max((wy).toLong,x0), math.max((wz).toLong,x0), math.max((ww).toLong,x0))
    def max(x0: Float) = new IMat4F(math.max((xx).toFloat,x0), math.max((xy).toFloat,x0), math.max((xz).toFloat,x0), math.max((xw).toFloat,x0), math.max((yx).toFloat,x0), math.max((yy).toFloat,x0), math.max((yz).toFloat,x0), math.max((yw).toFloat,x0), math.max((zx).toFloat,x0), math.max((zy).toFloat,x0), math.max((zz).toFloat,x0), math.max((zw).toFloat,x0), math.max((wx).toFloat,x0), math.max((wy).toFloat,x0), math.max((wz).toFloat,x0), math.max((ww).toFloat,x0))
    def max(x0: Double) = new IMat4D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((xw).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((yw).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0), math.max((zw).toDouble,x0), math.max((wx).toDouble,x0), math.max((wy).toDouble,x0), math.max((wz).toDouble,x0), math.max((ww).toDouble,x0))
    def max(sg44: GMat4S) = new IMat4I(math.max(xx,(sg44.xx).toInt), math.max(xy,(sg44.xy).toInt), math.max(xz,(sg44.xz).toInt), math.max(xw,(sg44.xw).toInt), math.max(yx,(sg44.yx).toInt), math.max(yy,(sg44.yy).toInt), math.max(yz,(sg44.yz).toInt), math.max(yw,(sg44.yw).toInt), math.max(zx,(sg44.zx).toInt), math.max(zy,(sg44.zy).toInt), math.max(zz,(sg44.zz).toInt), math.max(zw,(sg44.zw).toInt), math.max(wx,(sg44.wx).toInt), math.max(wy,(sg44.wy).toInt), math.max(wz,(sg44.wz).toInt), math.max(ww,(sg44.ww).toInt))
    def max(ig44: GMat4I) = new IMat4I(math.max(xx,ig44.xx), math.max(xy,ig44.xy), math.max(xz,ig44.xz), math.max(xw,ig44.xw), math.max(yx,ig44.yx), math.max(yy,ig44.yy), math.max(yz,ig44.yz), math.max(yw,ig44.yw), math.max(zx,ig44.zx), math.max(zy,ig44.zy), math.max(zz,ig44.zz), math.max(zw,ig44.zw), math.max(wx,ig44.wx), math.max(wy,ig44.wy), math.max(wz,ig44.wz), math.max(ww,ig44.ww))
    def max(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int) = new IMat4I(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(xw,xw0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(yw,yw0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0), math.max(zw,zw0), math.max(wx,wx0), math.max(wy,wy0), math.max(wz,wz0), math.max(ww,ww0))
    def max(lg44: GMat4L) = new IMat4L(math.max((xx).toLong,lg44.xx), math.max((xy).toLong,lg44.xy), math.max((xz).toLong,lg44.xz), math.max((xw).toLong,lg44.xw), math.max((yx).toLong,lg44.yx), math.max((yy).toLong,lg44.yy), math.max((yz).toLong,lg44.yz), math.max((yw).toLong,lg44.yw), math.max((zx).toLong,lg44.zx), math.max((zy).toLong,lg44.zy), math.max((zz).toLong,lg44.zz), math.max((zw).toLong,lg44.zw), math.max((wx).toLong,lg44.wx), math.max((wy).toLong,lg44.wy), math.max((wz).toLong,lg44.wz), math.max((ww).toLong,lg44.ww))
    def max(fg44: GMat4F) = new IMat4F(math.max((xx).toFloat,fg44.xx), math.max((xy).toFloat,fg44.xy), math.max((xz).toFloat,fg44.xz), math.max((xw).toFloat,fg44.xw), math.max((yx).toFloat,fg44.yx), math.max((yy).toFloat,fg44.yy), math.max((yz).toFloat,fg44.yz), math.max((yw).toFloat,fg44.yw), math.max((zx).toFloat,fg44.zx), math.max((zy).toFloat,fg44.zy), math.max((zz).toFloat,fg44.zz), math.max((zw).toFloat,fg44.zw), math.max((wx).toFloat,fg44.wx), math.max((wy).toFloat,fg44.wy), math.max((wz).toFloat,fg44.wz), math.max((ww).toFloat,fg44.ww))
    def max(dg44: GMat4D) = new IMat4D(math.max((xx).toDouble,dg44.xx), math.max((xy).toDouble,dg44.xy), math.max((xz).toDouble,dg44.xz), math.max((xw).toDouble,dg44.xw), math.max((yx).toDouble,dg44.yx), math.max((yy).toDouble,dg44.yy), math.max((yz).toDouble,dg44.yz), math.max((yw).toDouble,dg44.yw), math.max((zx).toDouble,dg44.zx), math.max((zy).toDouble,dg44.zy), math.max((zz).toDouble,dg44.zz), math.max((zw).toDouble,dg44.zw), math.max((wx).toDouble,dg44.wx), math.max((wy).toDouble,dg44.wy), math.max((wz).toDouble,dg44.wz), math.max((ww).toDouble,dg44.ww))
    def min(x0: Int) = new IMat4I(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(xw,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(yw,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0), math.min(zw,x0), math.min(wx,x0), math.min(wy,x0), math.min(wz,x0), math.min(ww,x0))
    def min(x0: Long) = new IMat4L(math.min((xx).toLong,x0), math.min((xy).toLong,x0), math.min((xz).toLong,x0), math.min((xw).toLong,x0), math.min((yx).toLong,x0), math.min((yy).toLong,x0), math.min((yz).toLong,x0), math.min((yw).toLong,x0), math.min((zx).toLong,x0), math.min((zy).toLong,x0), math.min((zz).toLong,x0), math.min((zw).toLong,x0), math.min((wx).toLong,x0), math.min((wy).toLong,x0), math.min((wz).toLong,x0), math.min((ww).toLong,x0))
    def min(x0: Float) = new IMat4F(math.min((xx).toFloat,x0), math.min((xy).toFloat,x0), math.min((xz).toFloat,x0), math.min((xw).toFloat,x0), math.min((yx).toFloat,x0), math.min((yy).toFloat,x0), math.min((yz).toFloat,x0), math.min((yw).toFloat,x0), math.min((zx).toFloat,x0), math.min((zy).toFloat,x0), math.min((zz).toFloat,x0), math.min((zw).toFloat,x0), math.min((wx).toFloat,x0), math.min((wy).toFloat,x0), math.min((wz).toFloat,x0), math.min((ww).toFloat,x0))
    def min(x0: Double) = new IMat4D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((xw).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((yw).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0), math.min((zw).toDouble,x0), math.min((wx).toDouble,x0), math.min((wy).toDouble,x0), math.min((wz).toDouble,x0), math.min((ww).toDouble,x0))
    def min(sg44: GMat4S) = new IMat4I(math.min(xx,(sg44.xx).toInt), math.min(xy,(sg44.xy).toInt), math.min(xz,(sg44.xz).toInt), math.min(xw,(sg44.xw).toInt), math.min(yx,(sg44.yx).toInt), math.min(yy,(sg44.yy).toInt), math.min(yz,(sg44.yz).toInt), math.min(yw,(sg44.yw).toInt), math.min(zx,(sg44.zx).toInt), math.min(zy,(sg44.zy).toInt), math.min(zz,(sg44.zz).toInt), math.min(zw,(sg44.zw).toInt), math.min(wx,(sg44.wx).toInt), math.min(wy,(sg44.wy).toInt), math.min(wz,(sg44.wz).toInt), math.min(ww,(sg44.ww).toInt))
    def min(ig44: GMat4I) = new IMat4I(math.min(xx,ig44.xx), math.min(xy,ig44.xy), math.min(xz,ig44.xz), math.min(xw,ig44.xw), math.min(yx,ig44.yx), math.min(yy,ig44.yy), math.min(yz,ig44.yz), math.min(yw,ig44.yw), math.min(zx,ig44.zx), math.min(zy,ig44.zy), math.min(zz,ig44.zz), math.min(zw,ig44.zw), math.min(wx,ig44.wx), math.min(wy,ig44.wy), math.min(wz,ig44.wz), math.min(ww,ig44.ww))
    def min(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int) = new IMat4I(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(xw,xw0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(yw,yw0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0), math.min(zw,zw0), math.min(wx,wx0), math.min(wy,wy0), math.min(wz,wz0), math.min(ww,ww0))
    def min(lg44: GMat4L) = new IMat4L(math.min((xx).toLong,lg44.xx), math.min((xy).toLong,lg44.xy), math.min((xz).toLong,lg44.xz), math.min((xw).toLong,lg44.xw), math.min((yx).toLong,lg44.yx), math.min((yy).toLong,lg44.yy), math.min((yz).toLong,lg44.yz), math.min((yw).toLong,lg44.yw), math.min((zx).toLong,lg44.zx), math.min((zy).toLong,lg44.zy), math.min((zz).toLong,lg44.zz), math.min((zw).toLong,lg44.zw), math.min((wx).toLong,lg44.wx), math.min((wy).toLong,lg44.wy), math.min((wz).toLong,lg44.wz), math.min((ww).toLong,lg44.ww))
    def min(fg44: GMat4F) = new IMat4F(math.min((xx).toFloat,fg44.xx), math.min((xy).toFloat,fg44.xy), math.min((xz).toFloat,fg44.xz), math.min((xw).toFloat,fg44.xw), math.min((yx).toFloat,fg44.yx), math.min((yy).toFloat,fg44.yy), math.min((yz).toFloat,fg44.yz), math.min((yw).toFloat,fg44.yw), math.min((zx).toFloat,fg44.zx), math.min((zy).toFloat,fg44.zy), math.min((zz).toFloat,fg44.zz), math.min((zw).toFloat,fg44.zw), math.min((wx).toFloat,fg44.wx), math.min((wy).toFloat,fg44.wy), math.min((wz).toFloat,fg44.wz), math.min((ww).toFloat,fg44.ww))
    def min(dg44: GMat4D) = new IMat4D(math.min((xx).toDouble,dg44.xx), math.min((xy).toDouble,dg44.xy), math.min((xz).toDouble,dg44.xz), math.min((xw).toDouble,dg44.xw), math.min((yx).toDouble,dg44.yx), math.min((yy).toDouble,dg44.yy), math.min((yz).toDouble,dg44.yz), math.min((yw).toDouble,dg44.yw), math.min((zx).toDouble,dg44.zx), math.min((zy).toDouble,dg44.zy), math.min((zz).toDouble,dg44.zz), math.min((zw).toDouble,dg44.zw), math.min((wx).toDouble,dg44.wx), math.min((wy).toDouble,dg44.wy), math.min((wz).toDouble,dg44.wz), math.min((ww).toDouble,dg44.ww))
    def operate(sg44: GMat4S)(fun: (Int,Int)=>Int) = new IMat4I(fun(xx,(sg44.xx).toInt), fun(xy,(sg44.xy).toInt), fun(xz,(sg44.xz).toInt), fun(xw,(sg44.xw).toInt), fun(yx,(sg44.yx).toInt), fun(yy,(sg44.yy).toInt), fun(yz,(sg44.yz).toInt), fun(yw,(sg44.yw).toInt), fun(zx,(sg44.zx).toInt), fun(zy,(sg44.zy).toInt), fun(zz,(sg44.zz).toInt), fun(zw,(sg44.zw).toInt), fun(wx,(sg44.wx).toInt), fun(wy,(sg44.wy).toInt), fun(wz,(sg44.wz).toInt), fun(ww,(sg44.ww).toInt))
    def operate(ig44: GMat4I)(fun: (Int,Int)=>Int) = new IMat4I(fun(xx,ig44.xx), fun(xy,ig44.xy), fun(xz,ig44.xz), fun(xw,ig44.xw), fun(yx,ig44.yx), fun(yy,ig44.yy), fun(yz,ig44.yz), fun(yw,ig44.yw), fun(zx,ig44.zx), fun(zy,ig44.zy), fun(zz,ig44.zz), fun(zw,ig44.zw), fun(wx,ig44.wx), fun(wy,ig44.wy), fun(wz,ig44.wz), fun(ww,ig44.ww))
    def operate(lg44: GMat4L)(fun: (Long,Long)=>Long) = new IMat4L(fun((xx).toLong,lg44.xx), fun((xy).toLong,lg44.xy), fun((xz).toLong,lg44.xz), fun((xw).toLong,lg44.xw), fun((yx).toLong,lg44.yx), fun((yy).toLong,lg44.yy), fun((yz).toLong,lg44.yz), fun((yw).toLong,lg44.yw), fun((zx).toLong,lg44.zx), fun((zy).toLong,lg44.zy), fun((zz).toLong,lg44.zz), fun((zw).toLong,lg44.zw), fun((wx).toLong,lg44.wx), fun((wy).toLong,lg44.wy), fun((wz).toLong,lg44.wz), fun((ww).toLong,lg44.ww))
    def operate(fg44: GMat4F)(fun: (Float,Float)=>Float) = new IMat4F(fun((xx).toFloat,fg44.xx), fun((xy).toFloat,fg44.xy), fun((xz).toFloat,fg44.xz), fun((xw).toFloat,fg44.xw), fun((yx).toFloat,fg44.yx), fun((yy).toFloat,fg44.yy), fun((yz).toFloat,fg44.yz), fun((yw).toFloat,fg44.yw), fun((zx).toFloat,fg44.zx), fun((zy).toFloat,fg44.zy), fun((zz).toFloat,fg44.zz), fun((zw).toFloat,fg44.zw), fun((wx).toFloat,fg44.wx), fun((wy).toFloat,fg44.wy), fun((wz).toFloat,fg44.wz), fun((ww).toFloat,fg44.ww))
    def operate(dg44: GMat4D)(fun: (Double,Double)=>Double) = new IMat4D(fun((xx).toDouble,dg44.xx), fun((xy).toDouble,dg44.xy), fun((xz).toDouble,dg44.xz), fun((xw).toDouble,dg44.xw), fun((yx).toDouble,dg44.yx), fun((yy).toDouble,dg44.yy), fun((yz).toDouble,dg44.yz), fun((yw).toDouble,dg44.yw), fun((zx).toDouble,dg44.zx), fun((zy).toDouble,dg44.zy), fun((zz).toDouble,dg44.zz), fun((zw).toDouble,dg44.zw), fun((wx).toDouble,dg44.wx), fun((wy).toDouble,dg44.wy), fun((wz).toDouble,dg44.wz), fun((ww).toDouble,dg44.ww))
    def fold(zero: Int)(fun: (Int,Int)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Long)(fun: (Long,Int)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Float)(fun: (Float,Int)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Double)(fun: (Double,Int)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def reduce(fun: (Int,Int)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def ===(ig44: GMat4I) = xx==ig44.xx && xy==ig44.xy && xz==ig44.xz && xw==ig44.xw && yx==ig44.yx && yy==ig44.yy && yz==ig44.yz && yw==ig44.yw && zx==ig44.zx && zy==ig44.zy && zz==ig44.zz && zw==ig44.zw && wx==ig44.wx && wy==ig44.wy && wz==ig44.wz && ww==ig44.ww
    def ===(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int) = xx==xx0 && xy==xy0 && xz==xz0 && xw==xw0 && yx==yx0 && yy==yy0 && yz==yz0 && yw==yw0 && zx==zx0 && zy==zy0 && zz==zz0 && zw==zw0 && wx==wx0 && wy==wy0 && wz==wz0 && ww==ww0
    def det = xx*(yy*(zz*ww - zw*wz) + yz*(zw*wy - zy*ww) + yw*(zy*wz - zz*wy)) + xy*(yz*(zw*wx - zx*ww) + yw*(zx*wz - zz*wx) + yx*(zz*ww - zw*wz)) + xz*(yw*(zx*wy - zy*wx) + yx*(zy*ww - zw*wy) + yy*(zw*wx - zx*ww)) + xw*(yx*(zy*wz - zz*wy) + yy*(zz*wx - zx*wz) + yz*(zx*wy - zy*wx))
    def trace = new IVec4I(xx, yy, zz, ww)
    def xRow = new IVec4I(xx, xy, xz, xw)
    def xCol = new IVec4I(xx, yx, zx, wx)
    def yRow = new IVec4I(yx, yy, yz, yw)
    def yCol = new IVec4I(xy, yy, zy, wy)
    def zRow = new IVec4I(zx, zy, zz, zw)
    def zCol = new IVec4I(xz, yz, zz, wz)
    def wRow = new IVec4I(wx, wy, wz, ww)
    def wCol = new IVec4I(xw, yw, zw, ww)
    def t = new IMat4I(xx, yx, zx, wx, xy, yy, zy, wy, xz, yz, zz, wz, xw, yw, zw, ww)
    def **(sg4: GVec4S) = new IVec4I(xx*(sg4.x).toInt+xy*(sg4.y).toInt+xz*(sg4.z).toInt+xw*(sg4.w).toInt, yx*(sg4.x).toInt+yy*(sg4.y).toInt+yz*(sg4.z).toInt+yw*(sg4.w).toInt, zx*(sg4.x).toInt+zy*(sg4.y).toInt+zz*(sg4.z).toInt+zw*(sg4.w).toInt, wx*(sg4.x).toInt+wy*(sg4.y).toInt+wz*(sg4.z).toInt+ww*(sg4.w).toInt)
    def **(ig4: GVec4I) = new IVec4I(xx*ig4.x+xy*ig4.y+xz*ig4.z+xw*ig4.w, yx*ig4.x+yy*ig4.y+yz*ig4.z+yw*ig4.w, zx*ig4.x+zy*ig4.y+zz*ig4.z+zw*ig4.w, wx*ig4.x+wy*ig4.y+wz*ig4.z+ww*ig4.w)
    def **(lg4: GVec4L) = new IVec4L((xx).toLong*lg4.x+(xy).toLong*lg4.y+(xz).toLong*lg4.z+(xw).toLong*lg4.w, (yx).toLong*lg4.x+(yy).toLong*lg4.y+(yz).toLong*lg4.z+(yw).toLong*lg4.w, (zx).toLong*lg4.x+(zy).toLong*lg4.y+(zz).toLong*lg4.z+(zw).toLong*lg4.w, (wx).toLong*lg4.x+(wy).toLong*lg4.y+(wz).toLong*lg4.z+(ww).toLong*lg4.w)
    def **(fg4: GVec4F) = new IVec4F((xx).toFloat*fg4.x+(xy).toFloat*fg4.y+(xz).toFloat*fg4.z+(xw).toFloat*fg4.w, (yx).toFloat*fg4.x+(yy).toFloat*fg4.y+(yz).toFloat*fg4.z+(yw).toFloat*fg4.w, (zx).toFloat*fg4.x+(zy).toFloat*fg4.y+(zz).toFloat*fg4.z+(zw).toFloat*fg4.w, (wx).toFloat*fg4.x+(wy).toFloat*fg4.y+(wz).toFloat*fg4.z+(ww).toFloat*fg4.w)
    def **(dg4: GVec4D) = new IVec4D((xx).toDouble*dg4.x+(xy).toDouble*dg4.y+(xz).toDouble*dg4.z+(xw).toDouble*dg4.w, (yx).toDouble*dg4.x+(yy).toDouble*dg4.y+(yz).toDouble*dg4.z+(yw).toDouble*dg4.w, (zx).toDouble*dg4.x+(zy).toDouble*dg4.y+(zz).toDouble*dg4.z+(zw).toDouble*dg4.w, (wx).toDouble*dg4.x+(wy).toDouble*dg4.y+(wz).toDouble*dg4.z+(ww).toDouble*dg4.w)
    def **(sg44: GMat4S) = new IMat4I(xx*(sg44.xx).toInt+xy*(sg44.yx).toInt+xz*(sg44.zx).toInt+xw*(sg44.wx).toInt, xx*(sg44.xy).toInt+xy*(sg44.yy).toInt+xz*(sg44.zy).toInt+xw*(sg44.wy).toInt, xx*(sg44.xz).toInt+xy*(sg44.yz).toInt+xz*(sg44.zz).toInt+xw*(sg44.wz).toInt, xx*(sg44.xw).toInt+xy*(sg44.yw).toInt+xz*(sg44.zw).toInt+xw*(sg44.ww).toInt, yx*(sg44.xx).toInt+yy*(sg44.yx).toInt+yz*(sg44.zx).toInt+yw*(sg44.wx).toInt, yx*(sg44.xy).toInt+yy*(sg44.yy).toInt+yz*(sg44.zy).toInt+yw*(sg44.wy).toInt, yx*(sg44.xz).toInt+yy*(sg44.yz).toInt+yz*(sg44.zz).toInt+yw*(sg44.wz).toInt, yx*(sg44.xw).toInt+yy*(sg44.yw).toInt+yz*(sg44.zw).toInt+yw*(sg44.ww).toInt, zx*(sg44.xx).toInt+zy*(sg44.yx).toInt+zz*(sg44.zx).toInt+zw*(sg44.wx).toInt, zx*(sg44.xy).toInt+zy*(sg44.yy).toInt+zz*(sg44.zy).toInt+zw*(sg44.wy).toInt, zx*(sg44.xz).toInt+zy*(sg44.yz).toInt+zz*(sg44.zz).toInt+zw*(sg44.wz).toInt, zx*(sg44.xw).toInt+zy*(sg44.yw).toInt+zz*(sg44.zw).toInt+zw*(sg44.ww).toInt, wx*(sg44.xx).toInt+wy*(sg44.yx).toInt+wz*(sg44.zx).toInt+ww*(sg44.wx).toInt, wx*(sg44.xy).toInt+wy*(sg44.yy).toInt+wz*(sg44.zy).toInt+ww*(sg44.wy).toInt, wx*(sg44.xz).toInt+wy*(sg44.yz).toInt+wz*(sg44.zz).toInt+ww*(sg44.wz).toInt, wx*(sg44.xw).toInt+wy*(sg44.yw).toInt+wz*(sg44.zw).toInt+ww*(sg44.ww).toInt)
    def **(ig44: GMat4I) = new IMat4I(xx*ig44.xx+xy*ig44.yx+xz*ig44.zx+xw*ig44.wx, xx*ig44.xy+xy*ig44.yy+xz*ig44.zy+xw*ig44.wy, xx*ig44.xz+xy*ig44.yz+xz*ig44.zz+xw*ig44.wz, xx*ig44.xw+xy*ig44.yw+xz*ig44.zw+xw*ig44.ww, yx*ig44.xx+yy*ig44.yx+yz*ig44.zx+yw*ig44.wx, yx*ig44.xy+yy*ig44.yy+yz*ig44.zy+yw*ig44.wy, yx*ig44.xz+yy*ig44.yz+yz*ig44.zz+yw*ig44.wz, yx*ig44.xw+yy*ig44.yw+yz*ig44.zw+yw*ig44.ww, zx*ig44.xx+zy*ig44.yx+zz*ig44.zx+zw*ig44.wx, zx*ig44.xy+zy*ig44.yy+zz*ig44.zy+zw*ig44.wy, zx*ig44.xz+zy*ig44.yz+zz*ig44.zz+zw*ig44.wz, zx*ig44.xw+zy*ig44.yw+zz*ig44.zw+zw*ig44.ww, wx*ig44.xx+wy*ig44.yx+wz*ig44.zx+ww*ig44.wx, wx*ig44.xy+wy*ig44.yy+wz*ig44.zy+ww*ig44.wy, wx*ig44.xz+wy*ig44.yz+wz*ig44.zz+ww*ig44.wz, wx*ig44.xw+wy*ig44.yw+wz*ig44.zw+ww*ig44.ww)
    def **(lg44: GMat4L) = new IMat4L((xx).toLong*lg44.xx+(xy).toLong*lg44.yx+(xz).toLong*lg44.zx+(xw).toLong*lg44.wx, (xx).toLong*lg44.xy+(xy).toLong*lg44.yy+(xz).toLong*lg44.zy+(xw).toLong*lg44.wy, (xx).toLong*lg44.xz+(xy).toLong*lg44.yz+(xz).toLong*lg44.zz+(xw).toLong*lg44.wz, (xx).toLong*lg44.xw+(xy).toLong*lg44.yw+(xz).toLong*lg44.zw+(xw).toLong*lg44.ww, (yx).toLong*lg44.xx+(yy).toLong*lg44.yx+(yz).toLong*lg44.zx+(yw).toLong*lg44.wx, (yx).toLong*lg44.xy+(yy).toLong*lg44.yy+(yz).toLong*lg44.zy+(yw).toLong*lg44.wy, (yx).toLong*lg44.xz+(yy).toLong*lg44.yz+(yz).toLong*lg44.zz+(yw).toLong*lg44.wz, (yx).toLong*lg44.xw+(yy).toLong*lg44.yw+(yz).toLong*lg44.zw+(yw).toLong*lg44.ww, (zx).toLong*lg44.xx+(zy).toLong*lg44.yx+(zz).toLong*lg44.zx+(zw).toLong*lg44.wx, (zx).toLong*lg44.xy+(zy).toLong*lg44.yy+(zz).toLong*lg44.zy+(zw).toLong*lg44.wy, (zx).toLong*lg44.xz+(zy).toLong*lg44.yz+(zz).toLong*lg44.zz+(zw).toLong*lg44.wz, (zx).toLong*lg44.xw+(zy).toLong*lg44.yw+(zz).toLong*lg44.zw+(zw).toLong*lg44.ww, (wx).toLong*lg44.xx+(wy).toLong*lg44.yx+(wz).toLong*lg44.zx+(ww).toLong*lg44.wx, (wx).toLong*lg44.xy+(wy).toLong*lg44.yy+(wz).toLong*lg44.zy+(ww).toLong*lg44.wy, (wx).toLong*lg44.xz+(wy).toLong*lg44.yz+(wz).toLong*lg44.zz+(ww).toLong*lg44.wz, (wx).toLong*lg44.xw+(wy).toLong*lg44.yw+(wz).toLong*lg44.zw+(ww).toLong*lg44.ww)
    def **(fg44: GMat4F) = new IMat4F((xx).toFloat*fg44.xx+(xy).toFloat*fg44.yx+(xz).toFloat*fg44.zx+(xw).toFloat*fg44.wx, (xx).toFloat*fg44.xy+(xy).toFloat*fg44.yy+(xz).toFloat*fg44.zy+(xw).toFloat*fg44.wy, (xx).toFloat*fg44.xz+(xy).toFloat*fg44.yz+(xz).toFloat*fg44.zz+(xw).toFloat*fg44.wz, (xx).toFloat*fg44.xw+(xy).toFloat*fg44.yw+(xz).toFloat*fg44.zw+(xw).toFloat*fg44.ww, (yx).toFloat*fg44.xx+(yy).toFloat*fg44.yx+(yz).toFloat*fg44.zx+(yw).toFloat*fg44.wx, (yx).toFloat*fg44.xy+(yy).toFloat*fg44.yy+(yz).toFloat*fg44.zy+(yw).toFloat*fg44.wy, (yx).toFloat*fg44.xz+(yy).toFloat*fg44.yz+(yz).toFloat*fg44.zz+(yw).toFloat*fg44.wz, (yx).toFloat*fg44.xw+(yy).toFloat*fg44.yw+(yz).toFloat*fg44.zw+(yw).toFloat*fg44.ww, (zx).toFloat*fg44.xx+(zy).toFloat*fg44.yx+(zz).toFloat*fg44.zx+(zw).toFloat*fg44.wx, (zx).toFloat*fg44.xy+(zy).toFloat*fg44.yy+(zz).toFloat*fg44.zy+(zw).toFloat*fg44.wy, (zx).toFloat*fg44.xz+(zy).toFloat*fg44.yz+(zz).toFloat*fg44.zz+(zw).toFloat*fg44.wz, (zx).toFloat*fg44.xw+(zy).toFloat*fg44.yw+(zz).toFloat*fg44.zw+(zw).toFloat*fg44.ww, (wx).toFloat*fg44.xx+(wy).toFloat*fg44.yx+(wz).toFloat*fg44.zx+(ww).toFloat*fg44.wx, (wx).toFloat*fg44.xy+(wy).toFloat*fg44.yy+(wz).toFloat*fg44.zy+(ww).toFloat*fg44.wy, (wx).toFloat*fg44.xz+(wy).toFloat*fg44.yz+(wz).toFloat*fg44.zz+(ww).toFloat*fg44.wz, (wx).toFloat*fg44.xw+(wy).toFloat*fg44.yw+(wz).toFloat*fg44.zw+(ww).toFloat*fg44.ww)
    def **(dg44: GMat4D) = new IMat4D((xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx, (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy, (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz, (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww, (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx, (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy, (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz, (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww, (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx, (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy, (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz, (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww, (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx, (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy, (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz, (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww)
  } // class GMat4I

  object GMat4I {
    def apply(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): GMat4I = new IMat4I(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): GMat4I = IMat4I.parse(str)
    val identity: GMat4I = IMat4I.identity
    val zero: GMat4I = IMat4I.zero
    def traced(ig4: GVec4I) = new IMat4I(ig4.x, 0, 0, 0, 0, ig4.y, 0, 0, 0, 0, ig4.z, 0, 0, 0, 0, ig4.w)
  } // object GMat4I


  abstract class GMat4L extends Cloneable {
    def xx: Long
    def xy: Long
    def xz: Long
    def xw: Long
    def yx: Long
    def yy: Long
    def yz: Long
    def yw: Long
    def zx: Long
    def zy: Long
    def zz: Long
    def zw: Long
    def wx: Long
    def wy: Long
    def wz: Long
    def ww: Long
    override def toString = "["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]"
    override def hashCode = (((((((((((((((ww.##)*16777619 ^ wz.##)*16777619 ^ wy.##)*16777619 ^ wx.##)*16777619 ^ zw.##)*16777619 ^ zz.##)*16777619 ^ zy.##)*16777619 ^ zx.##)*16777619 ^ yw.##)*16777619 ^ yz.##)*16777619 ^ yy.##)*16777619 ^ yx.##)*16777619 ^ xw.##)*16777619 ^ xz.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg44: GMat4S => {xx==sg44.xx && xy==sg44.xy && xz==sg44.xz && xw==sg44.xw && yx==sg44.yx && yy==sg44.yy && yz==sg44.yz && yw==sg44.yw && zx==sg44.zx && zy==sg44.zy && zz==sg44.zz && zw==sg44.zw && wx==sg44.wx && wy==sg44.wy && wz==sg44.wz && ww==sg44.ww }; case ig44: GMat4I => {xx==ig44.xx && xy==ig44.xy && xz==ig44.xz && xw==ig44.xw && yx==ig44.yx && yy==ig44.yy && yz==ig44.yz && yw==ig44.yw && zx==ig44.zx && zy==ig44.zy && zz==ig44.zz && zw==ig44.zw && wx==ig44.wx && wy==ig44.wy && wz==ig44.wz && ww==ig44.ww }; case lg44: GMat4L => {xx==lg44.xx && xy==lg44.xy && xz==lg44.xz && xw==lg44.xw && yx==lg44.yx && yy==lg44.yy && yz==lg44.yz && yw==lg44.yw && zx==lg44.zx && zy==lg44.zy && zz==lg44.zz && zw==lg44.zw && wx==lg44.wx && wy==lg44.wy && wz==lg44.wz && ww==lg44.ww }; case fg44: GMat4F => {xx==fg44.xx && xy==fg44.xy && xz==fg44.xz && xw==fg44.xw && yx==fg44.yx && yy==fg44.yy && yz==fg44.yz && yw==fg44.yw && zx==fg44.zx && zy==fg44.zy && zz==fg44.zz && zw==fg44.zw && wx==fg44.wx && wy==fg44.wy && wz==fg44.wz && ww==fg44.ww }; case dg44: GMat4D => {xx==dg44.xx && xy==dg44.xy && xz==dg44.xz && xw==dg44.xw && yx==dg44.yx && yy==dg44.yy && yz==dg44.yz && yw==dg44.yw && zx==dg44.zx && zy==dg44.zy && zz==dg44.zz && zw==dg44.zw && wx==dg44.wx && wy==dg44.wy && wz==dg44.wz && ww==dg44.ww }; case _ => false }
    override def clone(): GMat4L = new IMat4L(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def toS: GMat4S = new IMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    def toI: GMat4I = new IMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    def mapI(fun: Long => Int) = new IMat4I((fun(xx)).toInt, (fun(xy)).toInt, (fun(xz)).toInt, (fun(xw)).toInt, (fun(yx)).toInt, (fun(yy)).toInt, (fun(yz)).toInt, (fun(yw)).toInt, (fun(zx)).toInt, (fun(zy)).toInt, (fun(zz)).toInt, (fun(zw)).toInt, (fun(wx)).toInt, (fun(wy)).toInt, (fun(wz)).toInt, (fun(ww)).toInt)
    def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, xw0: Long = xw, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, yw0: Long = yw, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz, zw0: Long = zw, wx0: Long = wx, wy0: Long = wy, wz0: Long = wz, ww0: Long = ww): GMat4L = new IMat4L(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def trim: GMat3L = new IMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapL(fun: Long => Long) = new IMat4L(fun(xx), fun(xy), fun(xz), fun(xw), fun(yx), fun(yy), fun(yz), fun(yw), fun(zx), fun(zy), fun(zz), fun(zw), fun(wx), fun(wy), fun(wz), fun(ww))
    def toF: GMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    def mapF(fun: Long => Float) = new IMat4F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(xz)).toFloat, (fun(xw)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat, (fun(yz)).toFloat, (fun(yw)).toFloat, (fun(zx)).toFloat, (fun(zy)).toFloat, (fun(zz)).toFloat, (fun(zw)).toFloat, (fun(wx)).toFloat, (fun(wy)).toFloat, (fun(wz)).toFloat, (fun(ww)).toFloat)
    def toD: GMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def mapD(fun: Long => Double) = new IMat4D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(xz)).toDouble, (fun(xw)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble, (fun(yz)).toDouble, (fun(yw)).toDouble, (fun(zx)).toDouble, (fun(zy)).toDouble, (fun(zz)).toDouble, (fun(zw)).toDouble, (fun(wx)).toDouble, (fun(wy)).toDouble, (fun(wz)).toDouble, (fun(ww)).toDouble)
    def imm = new IMat4L(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def mut = new MMat4L(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def unary_-() = new IMat4L(-xx, -xy, -xz, -xw, -yx, -yy, -yz, -yw, -zx, -zy, -zz, -zw, -wx, -wy, -wz, -ww)
    def +(x0: Long) = new IMat4L(xx + x0, xy + x0, xz + x0, xw + x0, yx + x0, yy + x0, yz + x0, yw + x0, zx + x0, zy + x0, zz + x0, zw + x0, wx + x0, wy + x0, wz + x0, ww + x0)
    def +(x0: Double) = new IMat4D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (xw).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (yw).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0, (zw).toDouble + x0, (wx).toDouble + x0, (wy).toDouble + x0, (wz).toDouble + x0, (ww).toDouble + x0)
    def +(sg44: GMat4S) = new IMat4L(xx + (sg44.xx).toLong, xy + (sg44.xy).toLong, xz + (sg44.xz).toLong, xw + (sg44.xw).toLong, yx + (sg44.yx).toLong, yy + (sg44.yy).toLong, yz + (sg44.yz).toLong, yw + (sg44.yw).toLong, zx + (sg44.zx).toLong, zy + (sg44.zy).toLong, zz + (sg44.zz).toLong, zw + (sg44.zw).toLong, wx + (sg44.wx).toLong, wy + (sg44.wy).toLong, wz + (sg44.wz).toLong, ww + (sg44.ww).toLong)
    def +(ig44: GMat4I) = new IMat4L(xx + (ig44.xx).toLong, xy + (ig44.xy).toLong, xz + (ig44.xz).toLong, xw + (ig44.xw).toLong, yx + (ig44.yx).toLong, yy + (ig44.yy).toLong, yz + (ig44.yz).toLong, yw + (ig44.yw).toLong, zx + (ig44.zx).toLong, zy + (ig44.zy).toLong, zz + (ig44.zz).toLong, zw + (ig44.zw).toLong, wx + (ig44.wx).toLong, wy + (ig44.wy).toLong, wz + (ig44.wz).toLong, ww + (ig44.ww).toLong)
    def +(lg44: GMat4L) = new IMat4L(xx + lg44.xx, xy + lg44.xy, xz + lg44.xz, xw + lg44.xw, yx + lg44.yx, yy + lg44.yy, yz + lg44.yz, yw + lg44.yw, zx + lg44.zx, zy + lg44.zy, zz + lg44.zz, zw + lg44.zw, wx + lg44.wx, wy + lg44.wy, wz + lg44.wz, ww + lg44.ww)
    def +(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long) = new IMat4L(xx + xx0, xy + xy0, xz + xz0, xw + xw0, yx + yx0, yy + yy0, yz + yz0, yw + yw0, zx + zx0, zy + zy0, zz + zz0, zw + zw0, wx + wx0, wy + wy0, wz + wz0, ww + ww0)
    def +(fg44: GMat4F) = new IMat4D((xx).toDouble + (fg44.xx).toDouble, (xy).toDouble + (fg44.xy).toDouble, (xz).toDouble + (fg44.xz).toDouble, (xw).toDouble + (fg44.xw).toDouble, (yx).toDouble + (fg44.yx).toDouble, (yy).toDouble + (fg44.yy).toDouble, (yz).toDouble + (fg44.yz).toDouble, (yw).toDouble + (fg44.yw).toDouble, (zx).toDouble + (fg44.zx).toDouble, (zy).toDouble + (fg44.zy).toDouble, (zz).toDouble + (fg44.zz).toDouble, (zw).toDouble + (fg44.zw).toDouble, (wx).toDouble + (fg44.wx).toDouble, (wy).toDouble + (fg44.wy).toDouble, (wz).toDouble + (fg44.wz).toDouble, (ww).toDouble + (fg44.ww).toDouble)
    def +(dg44: GMat4D) = new IMat4D((xx).toDouble + dg44.xx, (xy).toDouble + dg44.xy, (xz).toDouble + dg44.xz, (xw).toDouble + dg44.xw, (yx).toDouble + dg44.yx, (yy).toDouble + dg44.yy, (yz).toDouble + dg44.yz, (yw).toDouble + dg44.yw, (zx).toDouble + dg44.zx, (zy).toDouble + dg44.zy, (zz).toDouble + dg44.zz, (zw).toDouble + dg44.zw, (wx).toDouble + dg44.wx, (wy).toDouble + dg44.wy, (wz).toDouble + dg44.wz, (ww).toDouble + dg44.ww)
    def -(x0: Long) = new IMat4L(xx - x0, xy - x0, xz - x0, xw - x0, yx - x0, yy - x0, yz - x0, yw - x0, zx - x0, zy - x0, zz - x0, zw - x0, wx - x0, wy - x0, wz - x0, ww - x0)
    def -(x0: Double) = new IMat4D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (xw).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (yw).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0, (zw).toDouble - x0, (wx).toDouble - x0, (wy).toDouble - x0, (wz).toDouble - x0, (ww).toDouble - x0)
    def -(sg44: GMat4S) = new IMat4L(xx - (sg44.xx).toLong, xy - (sg44.xy).toLong, xz - (sg44.xz).toLong, xw - (sg44.xw).toLong, yx - (sg44.yx).toLong, yy - (sg44.yy).toLong, yz - (sg44.yz).toLong, yw - (sg44.yw).toLong, zx - (sg44.zx).toLong, zy - (sg44.zy).toLong, zz - (sg44.zz).toLong, zw - (sg44.zw).toLong, wx - (sg44.wx).toLong, wy - (sg44.wy).toLong, wz - (sg44.wz).toLong, ww - (sg44.ww).toLong)
    def -(ig44: GMat4I) = new IMat4L(xx - (ig44.xx).toLong, xy - (ig44.xy).toLong, xz - (ig44.xz).toLong, xw - (ig44.xw).toLong, yx - (ig44.yx).toLong, yy - (ig44.yy).toLong, yz - (ig44.yz).toLong, yw - (ig44.yw).toLong, zx - (ig44.zx).toLong, zy - (ig44.zy).toLong, zz - (ig44.zz).toLong, zw - (ig44.zw).toLong, wx - (ig44.wx).toLong, wy - (ig44.wy).toLong, wz - (ig44.wz).toLong, ww - (ig44.ww).toLong)
    def -(lg44: GMat4L) = new IMat4L(xx - lg44.xx, xy - lg44.xy, xz - lg44.xz, xw - lg44.xw, yx - lg44.yx, yy - lg44.yy, yz - lg44.yz, yw - lg44.yw, zx - lg44.zx, zy - lg44.zy, zz - lg44.zz, zw - lg44.zw, wx - lg44.wx, wy - lg44.wy, wz - lg44.wz, ww - lg44.ww)
    def -(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long) = new IMat4L(xx - xx0, xy - xy0, xz - xz0, xw - xw0, yx - yx0, yy - yy0, yz - yz0, yw - yw0, zx - zx0, zy - zy0, zz - zz0, zw - zw0, wx - wx0, wy - wy0, wz - wz0, ww - ww0)
    def -(fg44: GMat4F) = new IMat4D((xx).toDouble - (fg44.xx).toDouble, (xy).toDouble - (fg44.xy).toDouble, (xz).toDouble - (fg44.xz).toDouble, (xw).toDouble - (fg44.xw).toDouble, (yx).toDouble - (fg44.yx).toDouble, (yy).toDouble - (fg44.yy).toDouble, (yz).toDouble - (fg44.yz).toDouble, (yw).toDouble - (fg44.yw).toDouble, (zx).toDouble - (fg44.zx).toDouble, (zy).toDouble - (fg44.zy).toDouble, (zz).toDouble - (fg44.zz).toDouble, (zw).toDouble - (fg44.zw).toDouble, (wx).toDouble - (fg44.wx).toDouble, (wy).toDouble - (fg44.wy).toDouble, (wz).toDouble - (fg44.wz).toDouble, (ww).toDouble - (fg44.ww).toDouble)
    def -(dg44: GMat4D) = new IMat4D((xx).toDouble - dg44.xx, (xy).toDouble - dg44.xy, (xz).toDouble - dg44.xz, (xw).toDouble - dg44.xw, (yx).toDouble - dg44.yx, (yy).toDouble - dg44.yy, (yz).toDouble - dg44.yz, (yw).toDouble - dg44.yw, (zx).toDouble - dg44.zx, (zy).toDouble - dg44.zy, (zz).toDouble - dg44.zz, (zw).toDouble - dg44.zw, (wx).toDouble - dg44.wx, (wy).toDouble - dg44.wy, (wz).toDouble - dg44.wz, (ww).toDouble - dg44.ww)
    def *(x0: Long) = new IMat4L(xx * x0, xy * x0, xz * x0, xw * x0, yx * x0, yy * x0, yz * x0, yw * x0, zx * x0, zy * x0, zz * x0, zw * x0, wx * x0, wy * x0, wz * x0, ww * x0)
    def *(x0: Double) = new IMat4D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (xw).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (yw).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0, (zw).toDouble * x0, (wx).toDouble * x0, (wy).toDouble * x0, (wz).toDouble * x0, (ww).toDouble * x0)
    def *(sg44: GMat4S) = new IMat4L(xx * (sg44.xx).toLong, xy * (sg44.xy).toLong, xz * (sg44.xz).toLong, xw * (sg44.xw).toLong, yx * (sg44.yx).toLong, yy * (sg44.yy).toLong, yz * (sg44.yz).toLong, yw * (sg44.yw).toLong, zx * (sg44.zx).toLong, zy * (sg44.zy).toLong, zz * (sg44.zz).toLong, zw * (sg44.zw).toLong, wx * (sg44.wx).toLong, wy * (sg44.wy).toLong, wz * (sg44.wz).toLong, ww * (sg44.ww).toLong)
    def *(ig44: GMat4I) = new IMat4L(xx * (ig44.xx).toLong, xy * (ig44.xy).toLong, xz * (ig44.xz).toLong, xw * (ig44.xw).toLong, yx * (ig44.yx).toLong, yy * (ig44.yy).toLong, yz * (ig44.yz).toLong, yw * (ig44.yw).toLong, zx * (ig44.zx).toLong, zy * (ig44.zy).toLong, zz * (ig44.zz).toLong, zw * (ig44.zw).toLong, wx * (ig44.wx).toLong, wy * (ig44.wy).toLong, wz * (ig44.wz).toLong, ww * (ig44.ww).toLong)
    def *(lg44: GMat4L) = new IMat4L(xx * lg44.xx, xy * lg44.xy, xz * lg44.xz, xw * lg44.xw, yx * lg44.yx, yy * lg44.yy, yz * lg44.yz, yw * lg44.yw, zx * lg44.zx, zy * lg44.zy, zz * lg44.zz, zw * lg44.zw, wx * lg44.wx, wy * lg44.wy, wz * lg44.wz, ww * lg44.ww)
    def *(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long) = new IMat4L(xx * xx0, xy * xy0, xz * xz0, xw * xw0, yx * yx0, yy * yy0, yz * yz0, yw * yw0, zx * zx0, zy * zy0, zz * zz0, zw * zw0, wx * wx0, wy * wy0, wz * wz0, ww * ww0)
    def *(fg44: GMat4F) = new IMat4D((xx).toDouble * (fg44.xx).toDouble, (xy).toDouble * (fg44.xy).toDouble, (xz).toDouble * (fg44.xz).toDouble, (xw).toDouble * (fg44.xw).toDouble, (yx).toDouble * (fg44.yx).toDouble, (yy).toDouble * (fg44.yy).toDouble, (yz).toDouble * (fg44.yz).toDouble, (yw).toDouble * (fg44.yw).toDouble, (zx).toDouble * (fg44.zx).toDouble, (zy).toDouble * (fg44.zy).toDouble, (zz).toDouble * (fg44.zz).toDouble, (zw).toDouble * (fg44.zw).toDouble, (wx).toDouble * (fg44.wx).toDouble, (wy).toDouble * (fg44.wy).toDouble, (wz).toDouble * (fg44.wz).toDouble, (ww).toDouble * (fg44.ww).toDouble)
    def *(dg44: GMat4D) = new IMat4D((xx).toDouble * dg44.xx, (xy).toDouble * dg44.xy, (xz).toDouble * dg44.xz, (xw).toDouble * dg44.xw, (yx).toDouble * dg44.yx, (yy).toDouble * dg44.yy, (yz).toDouble * dg44.yz, (yw).toDouble * dg44.yw, (zx).toDouble * dg44.zx, (zy).toDouble * dg44.zy, (zz).toDouble * dg44.zz, (zw).toDouble * dg44.zw, (wx).toDouble * dg44.wx, (wy).toDouble * dg44.wy, (wz).toDouble * dg44.wz, (ww).toDouble * dg44.ww)
    def /(x0: Long) = new IMat4L(xx / x0, xy / x0, xz / x0, xw / x0, yx / x0, yy / x0, yz / x0, yw / x0, zx / x0, zy / x0, zz / x0, zw / x0, wx / x0, wy / x0, wz / x0, ww / x0)
    def /(x0: Double) = new IMat4D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (xw).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (yw).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0, (zw).toDouble / x0, (wx).toDouble / x0, (wy).toDouble / x0, (wz).toDouble / x0, (ww).toDouble / x0)
    def /(sg44: GMat4S) = new IMat4L(xx / (sg44.xx).toLong, xy / (sg44.xy).toLong, xz / (sg44.xz).toLong, xw / (sg44.xw).toLong, yx / (sg44.yx).toLong, yy / (sg44.yy).toLong, yz / (sg44.yz).toLong, yw / (sg44.yw).toLong, zx / (sg44.zx).toLong, zy / (sg44.zy).toLong, zz / (sg44.zz).toLong, zw / (sg44.zw).toLong, wx / (sg44.wx).toLong, wy / (sg44.wy).toLong, wz / (sg44.wz).toLong, ww / (sg44.ww).toLong)
    def /(ig44: GMat4I) = new IMat4L(xx / (ig44.xx).toLong, xy / (ig44.xy).toLong, xz / (ig44.xz).toLong, xw / (ig44.xw).toLong, yx / (ig44.yx).toLong, yy / (ig44.yy).toLong, yz / (ig44.yz).toLong, yw / (ig44.yw).toLong, zx / (ig44.zx).toLong, zy / (ig44.zy).toLong, zz / (ig44.zz).toLong, zw / (ig44.zw).toLong, wx / (ig44.wx).toLong, wy / (ig44.wy).toLong, wz / (ig44.wz).toLong, ww / (ig44.ww).toLong)
    def /(lg44: GMat4L) = new IMat4L(xx / lg44.xx, xy / lg44.xy, xz / lg44.xz, xw / lg44.xw, yx / lg44.yx, yy / lg44.yy, yz / lg44.yz, yw / lg44.yw, zx / lg44.zx, zy / lg44.zy, zz / lg44.zz, zw / lg44.zw, wx / lg44.wx, wy / lg44.wy, wz / lg44.wz, ww / lg44.ww)
    def /(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long) = new IMat4L(xx / xx0, xy / xy0, xz / xz0, xw / xw0, yx / yx0, yy / yy0, yz / yz0, yw / yw0, zx / zx0, zy / zy0, zz / zz0, zw / zw0, wx / wx0, wy / wy0, wz / wz0, ww / ww0)
    def /(fg44: GMat4F) = new IMat4D((xx).toDouble / (fg44.xx).toDouble, (xy).toDouble / (fg44.xy).toDouble, (xz).toDouble / (fg44.xz).toDouble, (xw).toDouble / (fg44.xw).toDouble, (yx).toDouble / (fg44.yx).toDouble, (yy).toDouble / (fg44.yy).toDouble, (yz).toDouble / (fg44.yz).toDouble, (yw).toDouble / (fg44.yw).toDouble, (zx).toDouble / (fg44.zx).toDouble, (zy).toDouble / (fg44.zy).toDouble, (zz).toDouble / (fg44.zz).toDouble, (zw).toDouble / (fg44.zw).toDouble, (wx).toDouble / (fg44.wx).toDouble, (wy).toDouble / (fg44.wy).toDouble, (wz).toDouble / (fg44.wz).toDouble, (ww).toDouble / (fg44.ww).toDouble)
    def /(dg44: GMat4D) = new IMat4D((xx).toDouble / dg44.xx, (xy).toDouble / dg44.xy, (xz).toDouble / dg44.xz, (xw).toDouble / dg44.xw, (yx).toDouble / dg44.yx, (yy).toDouble / dg44.yy, (yz).toDouble / dg44.yz, (yw).toDouble / dg44.yw, (zx).toDouble / dg44.zx, (zy).toDouble / dg44.zy, (zz).toDouble / dg44.zz, (zw).toDouble / dg44.zw, (wx).toDouble / dg44.wx, (wy).toDouble / dg44.wy, (wz).toDouble / dg44.wz, (ww).toDouble / dg44.ww)
    def max(x0: Long) = new IMat4L(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(xw,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(yw,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0), math.max(zw,x0), math.max(wx,x0), math.max(wy,x0), math.max(wz,x0), math.max(ww,x0))
    def max(x0: Double) = new IMat4D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((xw).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((yw).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0), math.max((zw).toDouble,x0), math.max((wx).toDouble,x0), math.max((wy).toDouble,x0), math.max((wz).toDouble,x0), math.max((ww).toDouble,x0))
    def max(sg44: GMat4S) = new IMat4L(math.max(xx,(sg44.xx).toLong), math.max(xy,(sg44.xy).toLong), math.max(xz,(sg44.xz).toLong), math.max(xw,(sg44.xw).toLong), math.max(yx,(sg44.yx).toLong), math.max(yy,(sg44.yy).toLong), math.max(yz,(sg44.yz).toLong), math.max(yw,(sg44.yw).toLong), math.max(zx,(sg44.zx).toLong), math.max(zy,(sg44.zy).toLong), math.max(zz,(sg44.zz).toLong), math.max(zw,(sg44.zw).toLong), math.max(wx,(sg44.wx).toLong), math.max(wy,(sg44.wy).toLong), math.max(wz,(sg44.wz).toLong), math.max(ww,(sg44.ww).toLong))
    def max(ig44: GMat4I) = new IMat4L(math.max(xx,(ig44.xx).toLong), math.max(xy,(ig44.xy).toLong), math.max(xz,(ig44.xz).toLong), math.max(xw,(ig44.xw).toLong), math.max(yx,(ig44.yx).toLong), math.max(yy,(ig44.yy).toLong), math.max(yz,(ig44.yz).toLong), math.max(yw,(ig44.yw).toLong), math.max(zx,(ig44.zx).toLong), math.max(zy,(ig44.zy).toLong), math.max(zz,(ig44.zz).toLong), math.max(zw,(ig44.zw).toLong), math.max(wx,(ig44.wx).toLong), math.max(wy,(ig44.wy).toLong), math.max(wz,(ig44.wz).toLong), math.max(ww,(ig44.ww).toLong))
    def max(lg44: GMat4L) = new IMat4L(math.max(xx,lg44.xx), math.max(xy,lg44.xy), math.max(xz,lg44.xz), math.max(xw,lg44.xw), math.max(yx,lg44.yx), math.max(yy,lg44.yy), math.max(yz,lg44.yz), math.max(yw,lg44.yw), math.max(zx,lg44.zx), math.max(zy,lg44.zy), math.max(zz,lg44.zz), math.max(zw,lg44.zw), math.max(wx,lg44.wx), math.max(wy,lg44.wy), math.max(wz,lg44.wz), math.max(ww,lg44.ww))
    def max(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long) = new IMat4L(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(xw,xw0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(yw,yw0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0), math.max(zw,zw0), math.max(wx,wx0), math.max(wy,wy0), math.max(wz,wz0), math.max(ww,ww0))
    def max(fg44: GMat4F) = new IMat4D(math.max((xx).toDouble,(fg44.xx).toDouble), math.max((xy).toDouble,(fg44.xy).toDouble), math.max((xz).toDouble,(fg44.xz).toDouble), math.max((xw).toDouble,(fg44.xw).toDouble), math.max((yx).toDouble,(fg44.yx).toDouble), math.max((yy).toDouble,(fg44.yy).toDouble), math.max((yz).toDouble,(fg44.yz).toDouble), math.max((yw).toDouble,(fg44.yw).toDouble), math.max((zx).toDouble,(fg44.zx).toDouble), math.max((zy).toDouble,(fg44.zy).toDouble), math.max((zz).toDouble,(fg44.zz).toDouble), math.max((zw).toDouble,(fg44.zw).toDouble), math.max((wx).toDouble,(fg44.wx).toDouble), math.max((wy).toDouble,(fg44.wy).toDouble), math.max((wz).toDouble,(fg44.wz).toDouble), math.max((ww).toDouble,(fg44.ww).toDouble))
    def max(dg44: GMat4D) = new IMat4D(math.max((xx).toDouble,dg44.xx), math.max((xy).toDouble,dg44.xy), math.max((xz).toDouble,dg44.xz), math.max((xw).toDouble,dg44.xw), math.max((yx).toDouble,dg44.yx), math.max((yy).toDouble,dg44.yy), math.max((yz).toDouble,dg44.yz), math.max((yw).toDouble,dg44.yw), math.max((zx).toDouble,dg44.zx), math.max((zy).toDouble,dg44.zy), math.max((zz).toDouble,dg44.zz), math.max((zw).toDouble,dg44.zw), math.max((wx).toDouble,dg44.wx), math.max((wy).toDouble,dg44.wy), math.max((wz).toDouble,dg44.wz), math.max((ww).toDouble,dg44.ww))
    def min(x0: Long) = new IMat4L(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(xw,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(yw,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0), math.min(zw,x0), math.min(wx,x0), math.min(wy,x0), math.min(wz,x0), math.min(ww,x0))
    def min(x0: Double) = new IMat4D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((xw).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((yw).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0), math.min((zw).toDouble,x0), math.min((wx).toDouble,x0), math.min((wy).toDouble,x0), math.min((wz).toDouble,x0), math.min((ww).toDouble,x0))
    def min(sg44: GMat4S) = new IMat4L(math.min(xx,(sg44.xx).toLong), math.min(xy,(sg44.xy).toLong), math.min(xz,(sg44.xz).toLong), math.min(xw,(sg44.xw).toLong), math.min(yx,(sg44.yx).toLong), math.min(yy,(sg44.yy).toLong), math.min(yz,(sg44.yz).toLong), math.min(yw,(sg44.yw).toLong), math.min(zx,(sg44.zx).toLong), math.min(zy,(sg44.zy).toLong), math.min(zz,(sg44.zz).toLong), math.min(zw,(sg44.zw).toLong), math.min(wx,(sg44.wx).toLong), math.min(wy,(sg44.wy).toLong), math.min(wz,(sg44.wz).toLong), math.min(ww,(sg44.ww).toLong))
    def min(ig44: GMat4I) = new IMat4L(math.min(xx,(ig44.xx).toLong), math.min(xy,(ig44.xy).toLong), math.min(xz,(ig44.xz).toLong), math.min(xw,(ig44.xw).toLong), math.min(yx,(ig44.yx).toLong), math.min(yy,(ig44.yy).toLong), math.min(yz,(ig44.yz).toLong), math.min(yw,(ig44.yw).toLong), math.min(zx,(ig44.zx).toLong), math.min(zy,(ig44.zy).toLong), math.min(zz,(ig44.zz).toLong), math.min(zw,(ig44.zw).toLong), math.min(wx,(ig44.wx).toLong), math.min(wy,(ig44.wy).toLong), math.min(wz,(ig44.wz).toLong), math.min(ww,(ig44.ww).toLong))
    def min(lg44: GMat4L) = new IMat4L(math.min(xx,lg44.xx), math.min(xy,lg44.xy), math.min(xz,lg44.xz), math.min(xw,lg44.xw), math.min(yx,lg44.yx), math.min(yy,lg44.yy), math.min(yz,lg44.yz), math.min(yw,lg44.yw), math.min(zx,lg44.zx), math.min(zy,lg44.zy), math.min(zz,lg44.zz), math.min(zw,lg44.zw), math.min(wx,lg44.wx), math.min(wy,lg44.wy), math.min(wz,lg44.wz), math.min(ww,lg44.ww))
    def min(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long) = new IMat4L(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(xw,xw0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(yw,yw0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0), math.min(zw,zw0), math.min(wx,wx0), math.min(wy,wy0), math.min(wz,wz0), math.min(ww,ww0))
    def min(fg44: GMat4F) = new IMat4D(math.min((xx).toDouble,(fg44.xx).toDouble), math.min((xy).toDouble,(fg44.xy).toDouble), math.min((xz).toDouble,(fg44.xz).toDouble), math.min((xw).toDouble,(fg44.xw).toDouble), math.min((yx).toDouble,(fg44.yx).toDouble), math.min((yy).toDouble,(fg44.yy).toDouble), math.min((yz).toDouble,(fg44.yz).toDouble), math.min((yw).toDouble,(fg44.yw).toDouble), math.min((zx).toDouble,(fg44.zx).toDouble), math.min((zy).toDouble,(fg44.zy).toDouble), math.min((zz).toDouble,(fg44.zz).toDouble), math.min((zw).toDouble,(fg44.zw).toDouble), math.min((wx).toDouble,(fg44.wx).toDouble), math.min((wy).toDouble,(fg44.wy).toDouble), math.min((wz).toDouble,(fg44.wz).toDouble), math.min((ww).toDouble,(fg44.ww).toDouble))
    def min(dg44: GMat4D) = new IMat4D(math.min((xx).toDouble,dg44.xx), math.min((xy).toDouble,dg44.xy), math.min((xz).toDouble,dg44.xz), math.min((xw).toDouble,dg44.xw), math.min((yx).toDouble,dg44.yx), math.min((yy).toDouble,dg44.yy), math.min((yz).toDouble,dg44.yz), math.min((yw).toDouble,dg44.yw), math.min((zx).toDouble,dg44.zx), math.min((zy).toDouble,dg44.zy), math.min((zz).toDouble,dg44.zz), math.min((zw).toDouble,dg44.zw), math.min((wx).toDouble,dg44.wx), math.min((wy).toDouble,dg44.wy), math.min((wz).toDouble,dg44.wz), math.min((ww).toDouble,dg44.ww))
    def operate(sg44: GMat4S)(fun: (Long,Long)=>Long) = new IMat4L(fun(xx,(sg44.xx).toLong), fun(xy,(sg44.xy).toLong), fun(xz,(sg44.xz).toLong), fun(xw,(sg44.xw).toLong), fun(yx,(sg44.yx).toLong), fun(yy,(sg44.yy).toLong), fun(yz,(sg44.yz).toLong), fun(yw,(sg44.yw).toLong), fun(zx,(sg44.zx).toLong), fun(zy,(sg44.zy).toLong), fun(zz,(sg44.zz).toLong), fun(zw,(sg44.zw).toLong), fun(wx,(sg44.wx).toLong), fun(wy,(sg44.wy).toLong), fun(wz,(sg44.wz).toLong), fun(ww,(sg44.ww).toLong))
    def operate(ig44: GMat4I)(fun: (Long,Long)=>Long) = new IMat4L(fun(xx,(ig44.xx).toLong), fun(xy,(ig44.xy).toLong), fun(xz,(ig44.xz).toLong), fun(xw,(ig44.xw).toLong), fun(yx,(ig44.yx).toLong), fun(yy,(ig44.yy).toLong), fun(yz,(ig44.yz).toLong), fun(yw,(ig44.yw).toLong), fun(zx,(ig44.zx).toLong), fun(zy,(ig44.zy).toLong), fun(zz,(ig44.zz).toLong), fun(zw,(ig44.zw).toLong), fun(wx,(ig44.wx).toLong), fun(wy,(ig44.wy).toLong), fun(wz,(ig44.wz).toLong), fun(ww,(ig44.ww).toLong))
    def operate(lg44: GMat4L)(fun: (Long,Long)=>Long) = new IMat4L(fun(xx,lg44.xx), fun(xy,lg44.xy), fun(xz,lg44.xz), fun(xw,lg44.xw), fun(yx,lg44.yx), fun(yy,lg44.yy), fun(yz,lg44.yz), fun(yw,lg44.yw), fun(zx,lg44.zx), fun(zy,lg44.zy), fun(zz,lg44.zz), fun(zw,lg44.zw), fun(wx,lg44.wx), fun(wy,lg44.wy), fun(wz,lg44.wz), fun(ww,lg44.ww))
    def operate(fg44: GMat4F)(fun: (Double,Double)=>Double) = new IMat4D(fun((xx).toDouble,(fg44.xx).toDouble), fun((xy).toDouble,(fg44.xy).toDouble), fun((xz).toDouble,(fg44.xz).toDouble), fun((xw).toDouble,(fg44.xw).toDouble), fun((yx).toDouble,(fg44.yx).toDouble), fun((yy).toDouble,(fg44.yy).toDouble), fun((yz).toDouble,(fg44.yz).toDouble), fun((yw).toDouble,(fg44.yw).toDouble), fun((zx).toDouble,(fg44.zx).toDouble), fun((zy).toDouble,(fg44.zy).toDouble), fun((zz).toDouble,(fg44.zz).toDouble), fun((zw).toDouble,(fg44.zw).toDouble), fun((wx).toDouble,(fg44.wx).toDouble), fun((wy).toDouble,(fg44.wy).toDouble), fun((wz).toDouble,(fg44.wz).toDouble), fun((ww).toDouble,(fg44.ww).toDouble))
    def operate(dg44: GMat4D)(fun: (Double,Double)=>Double) = new IMat4D(fun((xx).toDouble,dg44.xx), fun((xy).toDouble,dg44.xy), fun((xz).toDouble,dg44.xz), fun((xw).toDouble,dg44.xw), fun((yx).toDouble,dg44.yx), fun((yy).toDouble,dg44.yy), fun((yz).toDouble,dg44.yz), fun((yw).toDouble,dg44.yw), fun((zx).toDouble,dg44.zx), fun((zy).toDouble,dg44.zy), fun((zz).toDouble,dg44.zz), fun((zw).toDouble,dg44.zw), fun((wx).toDouble,dg44.wx), fun((wy).toDouble,dg44.wy), fun((wz).toDouble,dg44.wz), fun((ww).toDouble,dg44.ww))
    def fold(zero: Int)(fun: (Int,Long)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Long)(fun: (Long,Long)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Float)(fun: (Float,Long)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Double)(fun: (Double,Long)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def reduce(fun: (Long,Long)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def ===(lg44: GMat4L) = xx==lg44.xx && xy==lg44.xy && xz==lg44.xz && xw==lg44.xw && yx==lg44.yx && yy==lg44.yy && yz==lg44.yz && yw==lg44.yw && zx==lg44.zx && zy==lg44.zy && zz==lg44.zz && zw==lg44.zw && wx==lg44.wx && wy==lg44.wy && wz==lg44.wz && ww==lg44.ww
    def ===(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long) = xx==xx0 && xy==xy0 && xz==xz0 && xw==xw0 && yx==yx0 && yy==yy0 && yz==yz0 && yw==yw0 && zx==zx0 && zy==zy0 && zz==zz0 && zw==zw0 && wx==wx0 && wy==wy0 && wz==wz0 && ww==ww0
    def det = xx*(yy*(zz*ww - zw*wz) + yz*(zw*wy - zy*ww) + yw*(zy*wz - zz*wy)) + xy*(yz*(zw*wx - zx*ww) + yw*(zx*wz - zz*wx) + yx*(zz*ww - zw*wz)) + xz*(yw*(zx*wy - zy*wx) + yx*(zy*ww - zw*wy) + yy*(zw*wx - zx*ww)) + xw*(yx*(zy*wz - zz*wy) + yy*(zz*wx - zx*wz) + yz*(zx*wy - zy*wx))
    def trace = new IVec4L(xx, yy, zz, ww)
    def xRow = new IVec4L(xx, xy, xz, xw)
    def xCol = new IVec4L(xx, yx, zx, wx)
    def yRow = new IVec4L(yx, yy, yz, yw)
    def yCol = new IVec4L(xy, yy, zy, wy)
    def zRow = new IVec4L(zx, zy, zz, zw)
    def zCol = new IVec4L(xz, yz, zz, wz)
    def wRow = new IVec4L(wx, wy, wz, ww)
    def wCol = new IVec4L(xw, yw, zw, ww)
    def t = new IMat4L(xx, yx, zx, wx, xy, yy, zy, wy, xz, yz, zz, wz, xw, yw, zw, ww)
    def **(sg4: GVec4S) = new IVec4L(xx*(sg4.x).toLong+xy*(sg4.y).toLong+xz*(sg4.z).toLong+xw*(sg4.w).toLong, yx*(sg4.x).toLong+yy*(sg4.y).toLong+yz*(sg4.z).toLong+yw*(sg4.w).toLong, zx*(sg4.x).toLong+zy*(sg4.y).toLong+zz*(sg4.z).toLong+zw*(sg4.w).toLong, wx*(sg4.x).toLong+wy*(sg4.y).toLong+wz*(sg4.z).toLong+ww*(sg4.w).toLong)
    def **(ig4: GVec4I) = new IVec4L(xx*(ig4.x).toLong+xy*(ig4.y).toLong+xz*(ig4.z).toLong+xw*(ig4.w).toLong, yx*(ig4.x).toLong+yy*(ig4.y).toLong+yz*(ig4.z).toLong+yw*(ig4.w).toLong, zx*(ig4.x).toLong+zy*(ig4.y).toLong+zz*(ig4.z).toLong+zw*(ig4.w).toLong, wx*(ig4.x).toLong+wy*(ig4.y).toLong+wz*(ig4.z).toLong+ww*(ig4.w).toLong)
    def **(lg4: GVec4L) = new IVec4L(xx*lg4.x+xy*lg4.y+xz*lg4.z+xw*lg4.w, yx*lg4.x+yy*lg4.y+yz*lg4.z+yw*lg4.w, zx*lg4.x+zy*lg4.y+zz*lg4.z+zw*lg4.w, wx*lg4.x+wy*lg4.y+wz*lg4.z+ww*lg4.w)
    def **(fg4: GVec4F) = new IVec4D((xx).toDouble*(fg4.x).toDouble+(xy).toDouble*(fg4.y).toDouble+(xz).toDouble*(fg4.z).toDouble+(xw).toDouble*(fg4.w).toDouble, (yx).toDouble*(fg4.x).toDouble+(yy).toDouble*(fg4.y).toDouble+(yz).toDouble*(fg4.z).toDouble+(yw).toDouble*(fg4.w).toDouble, (zx).toDouble*(fg4.x).toDouble+(zy).toDouble*(fg4.y).toDouble+(zz).toDouble*(fg4.z).toDouble+(zw).toDouble*(fg4.w).toDouble, (wx).toDouble*(fg4.x).toDouble+(wy).toDouble*(fg4.y).toDouble+(wz).toDouble*(fg4.z).toDouble+(ww).toDouble*(fg4.w).toDouble)
    def **(dg4: GVec4D) = new IVec4D((xx).toDouble*dg4.x+(xy).toDouble*dg4.y+(xz).toDouble*dg4.z+(xw).toDouble*dg4.w, (yx).toDouble*dg4.x+(yy).toDouble*dg4.y+(yz).toDouble*dg4.z+(yw).toDouble*dg4.w, (zx).toDouble*dg4.x+(zy).toDouble*dg4.y+(zz).toDouble*dg4.z+(zw).toDouble*dg4.w, (wx).toDouble*dg4.x+(wy).toDouble*dg4.y+(wz).toDouble*dg4.z+(ww).toDouble*dg4.w)
    def **(sg44: GMat4S) = new IMat4L(xx*(sg44.xx).toLong+xy*(sg44.yx).toLong+xz*(sg44.zx).toLong+xw*(sg44.wx).toLong, xx*(sg44.xy).toLong+xy*(sg44.yy).toLong+xz*(sg44.zy).toLong+xw*(sg44.wy).toLong, xx*(sg44.xz).toLong+xy*(sg44.yz).toLong+xz*(sg44.zz).toLong+xw*(sg44.wz).toLong, xx*(sg44.xw).toLong+xy*(sg44.yw).toLong+xz*(sg44.zw).toLong+xw*(sg44.ww).toLong, yx*(sg44.xx).toLong+yy*(sg44.yx).toLong+yz*(sg44.zx).toLong+yw*(sg44.wx).toLong, yx*(sg44.xy).toLong+yy*(sg44.yy).toLong+yz*(sg44.zy).toLong+yw*(sg44.wy).toLong, yx*(sg44.xz).toLong+yy*(sg44.yz).toLong+yz*(sg44.zz).toLong+yw*(sg44.wz).toLong, yx*(sg44.xw).toLong+yy*(sg44.yw).toLong+yz*(sg44.zw).toLong+yw*(sg44.ww).toLong, zx*(sg44.xx).toLong+zy*(sg44.yx).toLong+zz*(sg44.zx).toLong+zw*(sg44.wx).toLong, zx*(sg44.xy).toLong+zy*(sg44.yy).toLong+zz*(sg44.zy).toLong+zw*(sg44.wy).toLong, zx*(sg44.xz).toLong+zy*(sg44.yz).toLong+zz*(sg44.zz).toLong+zw*(sg44.wz).toLong, zx*(sg44.xw).toLong+zy*(sg44.yw).toLong+zz*(sg44.zw).toLong+zw*(sg44.ww).toLong, wx*(sg44.xx).toLong+wy*(sg44.yx).toLong+wz*(sg44.zx).toLong+ww*(sg44.wx).toLong, wx*(sg44.xy).toLong+wy*(sg44.yy).toLong+wz*(sg44.zy).toLong+ww*(sg44.wy).toLong, wx*(sg44.xz).toLong+wy*(sg44.yz).toLong+wz*(sg44.zz).toLong+ww*(sg44.wz).toLong, wx*(sg44.xw).toLong+wy*(sg44.yw).toLong+wz*(sg44.zw).toLong+ww*(sg44.ww).toLong)
    def **(ig44: GMat4I) = new IMat4L(xx*(ig44.xx).toLong+xy*(ig44.yx).toLong+xz*(ig44.zx).toLong+xw*(ig44.wx).toLong, xx*(ig44.xy).toLong+xy*(ig44.yy).toLong+xz*(ig44.zy).toLong+xw*(ig44.wy).toLong, xx*(ig44.xz).toLong+xy*(ig44.yz).toLong+xz*(ig44.zz).toLong+xw*(ig44.wz).toLong, xx*(ig44.xw).toLong+xy*(ig44.yw).toLong+xz*(ig44.zw).toLong+xw*(ig44.ww).toLong, yx*(ig44.xx).toLong+yy*(ig44.yx).toLong+yz*(ig44.zx).toLong+yw*(ig44.wx).toLong, yx*(ig44.xy).toLong+yy*(ig44.yy).toLong+yz*(ig44.zy).toLong+yw*(ig44.wy).toLong, yx*(ig44.xz).toLong+yy*(ig44.yz).toLong+yz*(ig44.zz).toLong+yw*(ig44.wz).toLong, yx*(ig44.xw).toLong+yy*(ig44.yw).toLong+yz*(ig44.zw).toLong+yw*(ig44.ww).toLong, zx*(ig44.xx).toLong+zy*(ig44.yx).toLong+zz*(ig44.zx).toLong+zw*(ig44.wx).toLong, zx*(ig44.xy).toLong+zy*(ig44.yy).toLong+zz*(ig44.zy).toLong+zw*(ig44.wy).toLong, zx*(ig44.xz).toLong+zy*(ig44.yz).toLong+zz*(ig44.zz).toLong+zw*(ig44.wz).toLong, zx*(ig44.xw).toLong+zy*(ig44.yw).toLong+zz*(ig44.zw).toLong+zw*(ig44.ww).toLong, wx*(ig44.xx).toLong+wy*(ig44.yx).toLong+wz*(ig44.zx).toLong+ww*(ig44.wx).toLong, wx*(ig44.xy).toLong+wy*(ig44.yy).toLong+wz*(ig44.zy).toLong+ww*(ig44.wy).toLong, wx*(ig44.xz).toLong+wy*(ig44.yz).toLong+wz*(ig44.zz).toLong+ww*(ig44.wz).toLong, wx*(ig44.xw).toLong+wy*(ig44.yw).toLong+wz*(ig44.zw).toLong+ww*(ig44.ww).toLong)
    def **(lg44: GMat4L) = new IMat4L(xx*lg44.xx+xy*lg44.yx+xz*lg44.zx+xw*lg44.wx, xx*lg44.xy+xy*lg44.yy+xz*lg44.zy+xw*lg44.wy, xx*lg44.xz+xy*lg44.yz+xz*lg44.zz+xw*lg44.wz, xx*lg44.xw+xy*lg44.yw+xz*lg44.zw+xw*lg44.ww, yx*lg44.xx+yy*lg44.yx+yz*lg44.zx+yw*lg44.wx, yx*lg44.xy+yy*lg44.yy+yz*lg44.zy+yw*lg44.wy, yx*lg44.xz+yy*lg44.yz+yz*lg44.zz+yw*lg44.wz, yx*lg44.xw+yy*lg44.yw+yz*lg44.zw+yw*lg44.ww, zx*lg44.xx+zy*lg44.yx+zz*lg44.zx+zw*lg44.wx, zx*lg44.xy+zy*lg44.yy+zz*lg44.zy+zw*lg44.wy, zx*lg44.xz+zy*lg44.yz+zz*lg44.zz+zw*lg44.wz, zx*lg44.xw+zy*lg44.yw+zz*lg44.zw+zw*lg44.ww, wx*lg44.xx+wy*lg44.yx+wz*lg44.zx+ww*lg44.wx, wx*lg44.xy+wy*lg44.yy+wz*lg44.zy+ww*lg44.wy, wx*lg44.xz+wy*lg44.yz+wz*lg44.zz+ww*lg44.wz, wx*lg44.xw+wy*lg44.yw+wz*lg44.zw+ww*lg44.ww)
    def **(fg44: GMat4F) = new IMat4D((xx).toDouble*(fg44.xx).toDouble+(xy).toDouble*(fg44.yx).toDouble+(xz).toDouble*(fg44.zx).toDouble+(xw).toDouble*(fg44.wx).toDouble, (xx).toDouble*(fg44.xy).toDouble+(xy).toDouble*(fg44.yy).toDouble+(xz).toDouble*(fg44.zy).toDouble+(xw).toDouble*(fg44.wy).toDouble, (xx).toDouble*(fg44.xz).toDouble+(xy).toDouble*(fg44.yz).toDouble+(xz).toDouble*(fg44.zz).toDouble+(xw).toDouble*(fg44.wz).toDouble, (xx).toDouble*(fg44.xw).toDouble+(xy).toDouble*(fg44.yw).toDouble+(xz).toDouble*(fg44.zw).toDouble+(xw).toDouble*(fg44.ww).toDouble, (yx).toDouble*(fg44.xx).toDouble+(yy).toDouble*(fg44.yx).toDouble+(yz).toDouble*(fg44.zx).toDouble+(yw).toDouble*(fg44.wx).toDouble, (yx).toDouble*(fg44.xy).toDouble+(yy).toDouble*(fg44.yy).toDouble+(yz).toDouble*(fg44.zy).toDouble+(yw).toDouble*(fg44.wy).toDouble, (yx).toDouble*(fg44.xz).toDouble+(yy).toDouble*(fg44.yz).toDouble+(yz).toDouble*(fg44.zz).toDouble+(yw).toDouble*(fg44.wz).toDouble, (yx).toDouble*(fg44.xw).toDouble+(yy).toDouble*(fg44.yw).toDouble+(yz).toDouble*(fg44.zw).toDouble+(yw).toDouble*(fg44.ww).toDouble, (zx).toDouble*(fg44.xx).toDouble+(zy).toDouble*(fg44.yx).toDouble+(zz).toDouble*(fg44.zx).toDouble+(zw).toDouble*(fg44.wx).toDouble, (zx).toDouble*(fg44.xy).toDouble+(zy).toDouble*(fg44.yy).toDouble+(zz).toDouble*(fg44.zy).toDouble+(zw).toDouble*(fg44.wy).toDouble, (zx).toDouble*(fg44.xz).toDouble+(zy).toDouble*(fg44.yz).toDouble+(zz).toDouble*(fg44.zz).toDouble+(zw).toDouble*(fg44.wz).toDouble, (zx).toDouble*(fg44.xw).toDouble+(zy).toDouble*(fg44.yw).toDouble+(zz).toDouble*(fg44.zw).toDouble+(zw).toDouble*(fg44.ww).toDouble, (wx).toDouble*(fg44.xx).toDouble+(wy).toDouble*(fg44.yx).toDouble+(wz).toDouble*(fg44.zx).toDouble+(ww).toDouble*(fg44.wx).toDouble, (wx).toDouble*(fg44.xy).toDouble+(wy).toDouble*(fg44.yy).toDouble+(wz).toDouble*(fg44.zy).toDouble+(ww).toDouble*(fg44.wy).toDouble, (wx).toDouble*(fg44.xz).toDouble+(wy).toDouble*(fg44.yz).toDouble+(wz).toDouble*(fg44.zz).toDouble+(ww).toDouble*(fg44.wz).toDouble, (wx).toDouble*(fg44.xw).toDouble+(wy).toDouble*(fg44.yw).toDouble+(wz).toDouble*(fg44.zw).toDouble+(ww).toDouble*(fg44.ww).toDouble)
    def **(dg44: GMat4D) = new IMat4D((xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx, (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy, (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz, (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww, (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx, (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy, (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz, (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww, (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx, (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy, (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz, (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww, (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx, (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy, (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz, (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww)
  } // class GMat4L

  object GMat4L {
    def apply(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): GMat4L = new IMat4L(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): GMat4L = IMat4L.parse(str)
    val identity: GMat4L = IMat4L.identity
    val zero: GMat4L = IMat4L.zero
    def traced(lg4: GVec4L) = new IMat4L(lg4.x, 0, 0, 0, 0, lg4.y, 0, 0, 0, 0, lg4.z, 0, 0, 0, 0, lg4.w)
  } // object GMat4L


  abstract class GMat4F extends Cloneable {
    def xx: Float
    def xy: Float
    def xz: Float
    def xw: Float
    def yx: Float
    def yy: Float
    def yz: Float
    def yw: Float
    def zx: Float
    def zy: Float
    def zz: Float
    def zw: Float
    def wx: Float
    def wy: Float
    def wz: Float
    def ww: Float
    override def toString = "["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]"
    override def hashCode = (((((((((((((((ww.##)*16777619 ^ wz.##)*16777619 ^ wy.##)*16777619 ^ wx.##)*16777619 ^ zw.##)*16777619 ^ zz.##)*16777619 ^ zy.##)*16777619 ^ zx.##)*16777619 ^ yw.##)*16777619 ^ yz.##)*16777619 ^ yy.##)*16777619 ^ yx.##)*16777619 ^ xw.##)*16777619 ^ xz.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg44: GMat4S => {xx==sg44.xx && xy==sg44.xy && xz==sg44.xz && xw==sg44.xw && yx==sg44.yx && yy==sg44.yy && yz==sg44.yz && yw==sg44.yw && zx==sg44.zx && zy==sg44.zy && zz==sg44.zz && zw==sg44.zw && wx==sg44.wx && wy==sg44.wy && wz==sg44.wz && ww==sg44.ww }; case ig44: GMat4I => {xx==ig44.xx && xy==ig44.xy && xz==ig44.xz && xw==ig44.xw && yx==ig44.yx && yy==ig44.yy && yz==ig44.yz && yw==ig44.yw && zx==ig44.zx && zy==ig44.zy && zz==ig44.zz && zw==ig44.zw && wx==ig44.wx && wy==ig44.wy && wz==ig44.wz && ww==ig44.ww }; case lg44: GMat4L => {xx==lg44.xx && xy==lg44.xy && xz==lg44.xz && xw==lg44.xw && yx==lg44.yx && yy==lg44.yy && yz==lg44.yz && yw==lg44.yw && zx==lg44.zx && zy==lg44.zy && zz==lg44.zz && zw==lg44.zw && wx==lg44.wx && wy==lg44.wy && wz==lg44.wz && ww==lg44.ww }; case fg44: GMat4F => {xx==fg44.xx && xy==fg44.xy && xz==fg44.xz && xw==fg44.xw && yx==fg44.yx && yy==fg44.yy && yz==fg44.yz && yw==fg44.yw && zx==fg44.zx && zy==fg44.zy && zz==fg44.zz && zw==fg44.zw && wx==fg44.wx && wy==fg44.wy && wz==fg44.wz && ww==fg44.ww }; case dg44: GMat4D => {xx==dg44.xx && xy==dg44.xy && xz==dg44.xz && xw==dg44.xw && yx==dg44.yx && yy==dg44.yy && yz==dg44.yz && yw==dg44.yw && zx==dg44.zx && zy==dg44.zy && zz==dg44.zz && zw==dg44.zw && wx==dg44.wx && wy==dg44.wy && wz==dg44.wz && ww==dg44.ww }; case _ => false }
    override def clone(): GMat4F = new IMat4F(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def toS: GMat4S = new IMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    def toI: GMat4I = new IMat4I(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    def mapI(fun: Float => Int) = new IMat4I(math.round(fun(xx)), math.round(fun(xy)), math.round(fun(xz)), math.round(fun(xw)), math.round(fun(yx)), math.round(fun(yy)), math.round(fun(yz)), math.round(fun(yw)), math.round(fun(zx)), math.round(fun(zy)), math.round(fun(zz)), math.round(fun(zw)), math.round(fun(wx)), math.round(fun(wy)), math.round(fun(wz)), math.round(fun(ww)))
    def toL: GMat4L = new IMat4L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((xw).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((yw).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble), math.round((zw).toDouble), math.round((wx).toDouble), math.round((wy).toDouble), math.round((wz).toDouble), math.round((ww).toDouble))
    def mapL(fun: Float => Long) = new IMat4L(math.round((fun(xx)).toDouble), math.round((fun(xy)).toDouble), math.round((fun(xz)).toDouble), math.round((fun(xw)).toDouble), math.round((fun(yx)).toDouble), math.round((fun(yy)).toDouble), math.round((fun(yz)).toDouble), math.round((fun(yw)).toDouble), math.round((fun(zx)).toDouble), math.round((fun(zy)).toDouble), math.round((fun(zz)).toDouble), math.round((fun(zw)).toDouble), math.round((fun(wx)).toDouble), math.round((fun(wy)).toDouble), math.round((fun(wz)).toDouble), math.round((fun(ww)).toDouble))
    def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, xw0: Float = xw, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, yw0: Float = yw, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz, zw0: Float = zw, wx0: Float = wx, wy0: Float = wy, wz0: Float = wz, ww0: Float = ww): GMat4F = new IMat4F(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def trim: GMat3F = new IMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapF(fun: Float => Float) = new IMat4F(fun(xx), fun(xy), fun(xz), fun(xw), fun(yx), fun(yy), fun(yz), fun(yw), fun(zx), fun(zy), fun(zz), fun(zw), fun(wx), fun(wy), fun(wz), fun(ww))
    def toD: GMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def mapD(fun: Float => Double) = new IMat4D((fun(xx)).toDouble, (fun(xy)).toDouble, (fun(xz)).toDouble, (fun(xw)).toDouble, (fun(yx)).toDouble, (fun(yy)).toDouble, (fun(yz)).toDouble, (fun(yw)).toDouble, (fun(zx)).toDouble, (fun(zy)).toDouble, (fun(zz)).toDouble, (fun(zw)).toDouble, (fun(wx)).toDouble, (fun(wy)).toDouble, (fun(wz)).toDouble, (fun(ww)).toDouble)
    def imm = new IMat4F(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def mut = new MMat4F(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def unary_-() = new IMat4F(-xx, -xy, -xz, -xw, -yx, -yy, -yz, -yw, -zx, -zy, -zz, -zw, -wx, -wy, -wz, -ww)
    def +(x0: Long) = new IMat4D((xx).toDouble + (x0).toDouble, (xy).toDouble + (x0).toDouble, (xz).toDouble + (x0).toDouble, (xw).toDouble + (x0).toDouble, (yx).toDouble + (x0).toDouble, (yy).toDouble + (x0).toDouble, (yz).toDouble + (x0).toDouble, (yw).toDouble + (x0).toDouble, (zx).toDouble + (x0).toDouble, (zy).toDouble + (x0).toDouble, (zz).toDouble + (x0).toDouble, (zw).toDouble + (x0).toDouble, (wx).toDouble + (x0).toDouble, (wy).toDouble + (x0).toDouble, (wz).toDouble + (x0).toDouble, (ww).toDouble + (x0).toDouble)
    def +(x0: Float) = new IMat4F(xx + x0, xy + x0, xz + x0, xw + x0, yx + x0, yy + x0, yz + x0, yw + x0, zx + x0, zy + x0, zz + x0, zw + x0, wx + x0, wy + x0, wz + x0, ww + x0)
    def +(x0: Double) = new IMat4D((xx).toDouble + x0, (xy).toDouble + x0, (xz).toDouble + x0, (xw).toDouble + x0, (yx).toDouble + x0, (yy).toDouble + x0, (yz).toDouble + x0, (yw).toDouble + x0, (zx).toDouble + x0, (zy).toDouble + x0, (zz).toDouble + x0, (zw).toDouble + x0, (wx).toDouble + x0, (wy).toDouble + x0, (wz).toDouble + x0, (ww).toDouble + x0)
    def +(sg44: GMat4S) = new IMat4F(xx + (sg44.xx).toFloat, xy + (sg44.xy).toFloat, xz + (sg44.xz).toFloat, xw + (sg44.xw).toFloat, yx + (sg44.yx).toFloat, yy + (sg44.yy).toFloat, yz + (sg44.yz).toFloat, yw + (sg44.yw).toFloat, zx + (sg44.zx).toFloat, zy + (sg44.zy).toFloat, zz + (sg44.zz).toFloat, zw + (sg44.zw).toFloat, wx + (sg44.wx).toFloat, wy + (sg44.wy).toFloat, wz + (sg44.wz).toFloat, ww + (sg44.ww).toFloat)
    def +(ig44: GMat4I) = new IMat4F(xx + (ig44.xx).toFloat, xy + (ig44.xy).toFloat, xz + (ig44.xz).toFloat, xw + (ig44.xw).toFloat, yx + (ig44.yx).toFloat, yy + (ig44.yy).toFloat, yz + (ig44.yz).toFloat, yw + (ig44.yw).toFloat, zx + (ig44.zx).toFloat, zy + (ig44.zy).toFloat, zz + (ig44.zz).toFloat, zw + (ig44.zw).toFloat, wx + (ig44.wx).toFloat, wy + (ig44.wy).toFloat, wz + (ig44.wz).toFloat, ww + (ig44.ww).toFloat)
    def +(lg44: GMat4L) = new IMat4D((xx).toDouble + (lg44.xx).toDouble, (xy).toDouble + (lg44.xy).toDouble, (xz).toDouble + (lg44.xz).toDouble, (xw).toDouble + (lg44.xw).toDouble, (yx).toDouble + (lg44.yx).toDouble, (yy).toDouble + (lg44.yy).toDouble, (yz).toDouble + (lg44.yz).toDouble, (yw).toDouble + (lg44.yw).toDouble, (zx).toDouble + (lg44.zx).toDouble, (zy).toDouble + (lg44.zy).toDouble, (zz).toDouble + (lg44.zz).toDouble, (zw).toDouble + (lg44.zw).toDouble, (wx).toDouble + (lg44.wx).toDouble, (wy).toDouble + (lg44.wy).toDouble, (wz).toDouble + (lg44.wz).toDouble, (ww).toDouble + (lg44.ww).toDouble)
    def +(fg44: GMat4F) = new IMat4F(xx + fg44.xx, xy + fg44.xy, xz + fg44.xz, xw + fg44.xw, yx + fg44.yx, yy + fg44.yy, yz + fg44.yz, yw + fg44.yw, zx + fg44.zx, zy + fg44.zy, zz + fg44.zz, zw + fg44.zw, wx + fg44.wx, wy + fg44.wy, wz + fg44.wz, ww + fg44.ww)
    def +(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float) = new IMat4F(xx + xx0, xy + xy0, xz + xz0, xw + xw0, yx + yx0, yy + yy0, yz + yz0, yw + yw0, zx + zx0, zy + zy0, zz + zz0, zw + zw0, wx + wx0, wy + wy0, wz + wz0, ww + ww0)
    def +(dg44: GMat4D) = new IMat4D((xx).toDouble + dg44.xx, (xy).toDouble + dg44.xy, (xz).toDouble + dg44.xz, (xw).toDouble + dg44.xw, (yx).toDouble + dg44.yx, (yy).toDouble + dg44.yy, (yz).toDouble + dg44.yz, (yw).toDouble + dg44.yw, (zx).toDouble + dg44.zx, (zy).toDouble + dg44.zy, (zz).toDouble + dg44.zz, (zw).toDouble + dg44.zw, (wx).toDouble + dg44.wx, (wy).toDouble + dg44.wy, (wz).toDouble + dg44.wz, (ww).toDouble + dg44.ww)
    def -(x0: Long) = new IMat4D((xx).toDouble - (x0).toDouble, (xy).toDouble - (x0).toDouble, (xz).toDouble - (x0).toDouble, (xw).toDouble - (x0).toDouble, (yx).toDouble - (x0).toDouble, (yy).toDouble - (x0).toDouble, (yz).toDouble - (x0).toDouble, (yw).toDouble - (x0).toDouble, (zx).toDouble - (x0).toDouble, (zy).toDouble - (x0).toDouble, (zz).toDouble - (x0).toDouble, (zw).toDouble - (x0).toDouble, (wx).toDouble - (x0).toDouble, (wy).toDouble - (x0).toDouble, (wz).toDouble - (x0).toDouble, (ww).toDouble - (x0).toDouble)
    def -(x0: Float) = new IMat4F(xx - x0, xy - x0, xz - x0, xw - x0, yx - x0, yy - x0, yz - x0, yw - x0, zx - x0, zy - x0, zz - x0, zw - x0, wx - x0, wy - x0, wz - x0, ww - x0)
    def -(x0: Double) = new IMat4D((xx).toDouble - x0, (xy).toDouble - x0, (xz).toDouble - x0, (xw).toDouble - x0, (yx).toDouble - x0, (yy).toDouble - x0, (yz).toDouble - x0, (yw).toDouble - x0, (zx).toDouble - x0, (zy).toDouble - x0, (zz).toDouble - x0, (zw).toDouble - x0, (wx).toDouble - x0, (wy).toDouble - x0, (wz).toDouble - x0, (ww).toDouble - x0)
    def -(sg44: GMat4S) = new IMat4F(xx - (sg44.xx).toFloat, xy - (sg44.xy).toFloat, xz - (sg44.xz).toFloat, xw - (sg44.xw).toFloat, yx - (sg44.yx).toFloat, yy - (sg44.yy).toFloat, yz - (sg44.yz).toFloat, yw - (sg44.yw).toFloat, zx - (sg44.zx).toFloat, zy - (sg44.zy).toFloat, zz - (sg44.zz).toFloat, zw - (sg44.zw).toFloat, wx - (sg44.wx).toFloat, wy - (sg44.wy).toFloat, wz - (sg44.wz).toFloat, ww - (sg44.ww).toFloat)
    def -(ig44: GMat4I) = new IMat4F(xx - (ig44.xx).toFloat, xy - (ig44.xy).toFloat, xz - (ig44.xz).toFloat, xw - (ig44.xw).toFloat, yx - (ig44.yx).toFloat, yy - (ig44.yy).toFloat, yz - (ig44.yz).toFloat, yw - (ig44.yw).toFloat, zx - (ig44.zx).toFloat, zy - (ig44.zy).toFloat, zz - (ig44.zz).toFloat, zw - (ig44.zw).toFloat, wx - (ig44.wx).toFloat, wy - (ig44.wy).toFloat, wz - (ig44.wz).toFloat, ww - (ig44.ww).toFloat)
    def -(lg44: GMat4L) = new IMat4D((xx).toDouble - (lg44.xx).toDouble, (xy).toDouble - (lg44.xy).toDouble, (xz).toDouble - (lg44.xz).toDouble, (xw).toDouble - (lg44.xw).toDouble, (yx).toDouble - (lg44.yx).toDouble, (yy).toDouble - (lg44.yy).toDouble, (yz).toDouble - (lg44.yz).toDouble, (yw).toDouble - (lg44.yw).toDouble, (zx).toDouble - (lg44.zx).toDouble, (zy).toDouble - (lg44.zy).toDouble, (zz).toDouble - (lg44.zz).toDouble, (zw).toDouble - (lg44.zw).toDouble, (wx).toDouble - (lg44.wx).toDouble, (wy).toDouble - (lg44.wy).toDouble, (wz).toDouble - (lg44.wz).toDouble, (ww).toDouble - (lg44.ww).toDouble)
    def -(fg44: GMat4F) = new IMat4F(xx - fg44.xx, xy - fg44.xy, xz - fg44.xz, xw - fg44.xw, yx - fg44.yx, yy - fg44.yy, yz - fg44.yz, yw - fg44.yw, zx - fg44.zx, zy - fg44.zy, zz - fg44.zz, zw - fg44.zw, wx - fg44.wx, wy - fg44.wy, wz - fg44.wz, ww - fg44.ww)
    def -(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float) = new IMat4F(xx - xx0, xy - xy0, xz - xz0, xw - xw0, yx - yx0, yy - yy0, yz - yz0, yw - yw0, zx - zx0, zy - zy0, zz - zz0, zw - zw0, wx - wx0, wy - wy0, wz - wz0, ww - ww0)
    def -(dg44: GMat4D) = new IMat4D((xx).toDouble - dg44.xx, (xy).toDouble - dg44.xy, (xz).toDouble - dg44.xz, (xw).toDouble - dg44.xw, (yx).toDouble - dg44.yx, (yy).toDouble - dg44.yy, (yz).toDouble - dg44.yz, (yw).toDouble - dg44.yw, (zx).toDouble - dg44.zx, (zy).toDouble - dg44.zy, (zz).toDouble - dg44.zz, (zw).toDouble - dg44.zw, (wx).toDouble - dg44.wx, (wy).toDouble - dg44.wy, (wz).toDouble - dg44.wz, (ww).toDouble - dg44.ww)
    def *(x0: Long) = new IMat4D((xx).toDouble * (x0).toDouble, (xy).toDouble * (x0).toDouble, (xz).toDouble * (x0).toDouble, (xw).toDouble * (x0).toDouble, (yx).toDouble * (x0).toDouble, (yy).toDouble * (x0).toDouble, (yz).toDouble * (x0).toDouble, (yw).toDouble * (x0).toDouble, (zx).toDouble * (x0).toDouble, (zy).toDouble * (x0).toDouble, (zz).toDouble * (x0).toDouble, (zw).toDouble * (x0).toDouble, (wx).toDouble * (x0).toDouble, (wy).toDouble * (x0).toDouble, (wz).toDouble * (x0).toDouble, (ww).toDouble * (x0).toDouble)
    def *(x0: Float) = new IMat4F(xx * x0, xy * x0, xz * x0, xw * x0, yx * x0, yy * x0, yz * x0, yw * x0, zx * x0, zy * x0, zz * x0, zw * x0, wx * x0, wy * x0, wz * x0, ww * x0)
    def *(x0: Double) = new IMat4D((xx).toDouble * x0, (xy).toDouble * x0, (xz).toDouble * x0, (xw).toDouble * x0, (yx).toDouble * x0, (yy).toDouble * x0, (yz).toDouble * x0, (yw).toDouble * x0, (zx).toDouble * x0, (zy).toDouble * x0, (zz).toDouble * x0, (zw).toDouble * x0, (wx).toDouble * x0, (wy).toDouble * x0, (wz).toDouble * x0, (ww).toDouble * x0)
    def *(sg44: GMat4S) = new IMat4F(xx * (sg44.xx).toFloat, xy * (sg44.xy).toFloat, xz * (sg44.xz).toFloat, xw * (sg44.xw).toFloat, yx * (sg44.yx).toFloat, yy * (sg44.yy).toFloat, yz * (sg44.yz).toFloat, yw * (sg44.yw).toFloat, zx * (sg44.zx).toFloat, zy * (sg44.zy).toFloat, zz * (sg44.zz).toFloat, zw * (sg44.zw).toFloat, wx * (sg44.wx).toFloat, wy * (sg44.wy).toFloat, wz * (sg44.wz).toFloat, ww * (sg44.ww).toFloat)
    def *(ig44: GMat4I) = new IMat4F(xx * (ig44.xx).toFloat, xy * (ig44.xy).toFloat, xz * (ig44.xz).toFloat, xw * (ig44.xw).toFloat, yx * (ig44.yx).toFloat, yy * (ig44.yy).toFloat, yz * (ig44.yz).toFloat, yw * (ig44.yw).toFloat, zx * (ig44.zx).toFloat, zy * (ig44.zy).toFloat, zz * (ig44.zz).toFloat, zw * (ig44.zw).toFloat, wx * (ig44.wx).toFloat, wy * (ig44.wy).toFloat, wz * (ig44.wz).toFloat, ww * (ig44.ww).toFloat)
    def *(lg44: GMat4L) = new IMat4D((xx).toDouble * (lg44.xx).toDouble, (xy).toDouble * (lg44.xy).toDouble, (xz).toDouble * (lg44.xz).toDouble, (xw).toDouble * (lg44.xw).toDouble, (yx).toDouble * (lg44.yx).toDouble, (yy).toDouble * (lg44.yy).toDouble, (yz).toDouble * (lg44.yz).toDouble, (yw).toDouble * (lg44.yw).toDouble, (zx).toDouble * (lg44.zx).toDouble, (zy).toDouble * (lg44.zy).toDouble, (zz).toDouble * (lg44.zz).toDouble, (zw).toDouble * (lg44.zw).toDouble, (wx).toDouble * (lg44.wx).toDouble, (wy).toDouble * (lg44.wy).toDouble, (wz).toDouble * (lg44.wz).toDouble, (ww).toDouble * (lg44.ww).toDouble)
    def *(fg44: GMat4F) = new IMat4F(xx * fg44.xx, xy * fg44.xy, xz * fg44.xz, xw * fg44.xw, yx * fg44.yx, yy * fg44.yy, yz * fg44.yz, yw * fg44.yw, zx * fg44.zx, zy * fg44.zy, zz * fg44.zz, zw * fg44.zw, wx * fg44.wx, wy * fg44.wy, wz * fg44.wz, ww * fg44.ww)
    def *(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float) = new IMat4F(xx * xx0, xy * xy0, xz * xz0, xw * xw0, yx * yx0, yy * yy0, yz * yz0, yw * yw0, zx * zx0, zy * zy0, zz * zz0, zw * zw0, wx * wx0, wy * wy0, wz * wz0, ww * ww0)
    def *(dg44: GMat4D) = new IMat4D((xx).toDouble * dg44.xx, (xy).toDouble * dg44.xy, (xz).toDouble * dg44.xz, (xw).toDouble * dg44.xw, (yx).toDouble * dg44.yx, (yy).toDouble * dg44.yy, (yz).toDouble * dg44.yz, (yw).toDouble * dg44.yw, (zx).toDouble * dg44.zx, (zy).toDouble * dg44.zy, (zz).toDouble * dg44.zz, (zw).toDouble * dg44.zw, (wx).toDouble * dg44.wx, (wy).toDouble * dg44.wy, (wz).toDouble * dg44.wz, (ww).toDouble * dg44.ww)
    def /(x0: Long) = new IMat4D((xx).toDouble / (x0).toDouble, (xy).toDouble / (x0).toDouble, (xz).toDouble / (x0).toDouble, (xw).toDouble / (x0).toDouble, (yx).toDouble / (x0).toDouble, (yy).toDouble / (x0).toDouble, (yz).toDouble / (x0).toDouble, (yw).toDouble / (x0).toDouble, (zx).toDouble / (x0).toDouble, (zy).toDouble / (x0).toDouble, (zz).toDouble / (x0).toDouble, (zw).toDouble / (x0).toDouble, (wx).toDouble / (x0).toDouble, (wy).toDouble / (x0).toDouble, (wz).toDouble / (x0).toDouble, (ww).toDouble / (x0).toDouble)
    def /(x0: Float) = new IMat4F(xx / x0, xy / x0, xz / x0, xw / x0, yx / x0, yy / x0, yz / x0, yw / x0, zx / x0, zy / x0, zz / x0, zw / x0, wx / x0, wy / x0, wz / x0, ww / x0)
    def /(x0: Double) = new IMat4D((xx).toDouble / x0, (xy).toDouble / x0, (xz).toDouble / x0, (xw).toDouble / x0, (yx).toDouble / x0, (yy).toDouble / x0, (yz).toDouble / x0, (yw).toDouble / x0, (zx).toDouble / x0, (zy).toDouble / x0, (zz).toDouble / x0, (zw).toDouble / x0, (wx).toDouble / x0, (wy).toDouble / x0, (wz).toDouble / x0, (ww).toDouble / x0)
    def /(sg44: GMat4S) = new IMat4F(xx / (sg44.xx).toFloat, xy / (sg44.xy).toFloat, xz / (sg44.xz).toFloat, xw / (sg44.xw).toFloat, yx / (sg44.yx).toFloat, yy / (sg44.yy).toFloat, yz / (sg44.yz).toFloat, yw / (sg44.yw).toFloat, zx / (sg44.zx).toFloat, zy / (sg44.zy).toFloat, zz / (sg44.zz).toFloat, zw / (sg44.zw).toFloat, wx / (sg44.wx).toFloat, wy / (sg44.wy).toFloat, wz / (sg44.wz).toFloat, ww / (sg44.ww).toFloat)
    def /(ig44: GMat4I) = new IMat4F(xx / (ig44.xx).toFloat, xy / (ig44.xy).toFloat, xz / (ig44.xz).toFloat, xw / (ig44.xw).toFloat, yx / (ig44.yx).toFloat, yy / (ig44.yy).toFloat, yz / (ig44.yz).toFloat, yw / (ig44.yw).toFloat, zx / (ig44.zx).toFloat, zy / (ig44.zy).toFloat, zz / (ig44.zz).toFloat, zw / (ig44.zw).toFloat, wx / (ig44.wx).toFloat, wy / (ig44.wy).toFloat, wz / (ig44.wz).toFloat, ww / (ig44.ww).toFloat)
    def /(lg44: GMat4L) = new IMat4D((xx).toDouble / (lg44.xx).toDouble, (xy).toDouble / (lg44.xy).toDouble, (xz).toDouble / (lg44.xz).toDouble, (xw).toDouble / (lg44.xw).toDouble, (yx).toDouble / (lg44.yx).toDouble, (yy).toDouble / (lg44.yy).toDouble, (yz).toDouble / (lg44.yz).toDouble, (yw).toDouble / (lg44.yw).toDouble, (zx).toDouble / (lg44.zx).toDouble, (zy).toDouble / (lg44.zy).toDouble, (zz).toDouble / (lg44.zz).toDouble, (zw).toDouble / (lg44.zw).toDouble, (wx).toDouble / (lg44.wx).toDouble, (wy).toDouble / (lg44.wy).toDouble, (wz).toDouble / (lg44.wz).toDouble, (ww).toDouble / (lg44.ww).toDouble)
    def /(fg44: GMat4F) = new IMat4F(xx / fg44.xx, xy / fg44.xy, xz / fg44.xz, xw / fg44.xw, yx / fg44.yx, yy / fg44.yy, yz / fg44.yz, yw / fg44.yw, zx / fg44.zx, zy / fg44.zy, zz / fg44.zz, zw / fg44.zw, wx / fg44.wx, wy / fg44.wy, wz / fg44.wz, ww / fg44.ww)
    def /(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float) = new IMat4F(xx / xx0, xy / xy0, xz / xz0, xw / xw0, yx / yx0, yy / yy0, yz / yz0, yw / yw0, zx / zx0, zy / zy0, zz / zz0, zw / zw0, wx / wx0, wy / wy0, wz / wz0, ww / ww0)
    def /(dg44: GMat4D) = new IMat4D((xx).toDouble / dg44.xx, (xy).toDouble / dg44.xy, (xz).toDouble / dg44.xz, (xw).toDouble / dg44.xw, (yx).toDouble / dg44.yx, (yy).toDouble / dg44.yy, (yz).toDouble / dg44.yz, (yw).toDouble / dg44.yw, (zx).toDouble / dg44.zx, (zy).toDouble / dg44.zy, (zz).toDouble / dg44.zz, (zw).toDouble / dg44.zw, (wx).toDouble / dg44.wx, (wy).toDouble / dg44.wy, (wz).toDouble / dg44.wz, (ww).toDouble / dg44.ww)
    def max(x0: Long) = new IMat4D(math.max((xx).toDouble,(x0).toDouble), math.max((xy).toDouble,(x0).toDouble), math.max((xz).toDouble,(x0).toDouble), math.max((xw).toDouble,(x0).toDouble), math.max((yx).toDouble,(x0).toDouble), math.max((yy).toDouble,(x0).toDouble), math.max((yz).toDouble,(x0).toDouble), math.max((yw).toDouble,(x0).toDouble), math.max((zx).toDouble,(x0).toDouble), math.max((zy).toDouble,(x0).toDouble), math.max((zz).toDouble,(x0).toDouble), math.max((zw).toDouble,(x0).toDouble), math.max((wx).toDouble,(x0).toDouble), math.max((wy).toDouble,(x0).toDouble), math.max((wz).toDouble,(x0).toDouble), math.max((ww).toDouble,(x0).toDouble))
    def max(x0: Float) = new IMat4F(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(xw,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(yw,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0), math.max(zw,x0), math.max(wx,x0), math.max(wy,x0), math.max(wz,x0), math.max(ww,x0))
    def max(x0: Double) = new IMat4D(math.max((xx).toDouble,x0), math.max((xy).toDouble,x0), math.max((xz).toDouble,x0), math.max((xw).toDouble,x0), math.max((yx).toDouble,x0), math.max((yy).toDouble,x0), math.max((yz).toDouble,x0), math.max((yw).toDouble,x0), math.max((zx).toDouble,x0), math.max((zy).toDouble,x0), math.max((zz).toDouble,x0), math.max((zw).toDouble,x0), math.max((wx).toDouble,x0), math.max((wy).toDouble,x0), math.max((wz).toDouble,x0), math.max((ww).toDouble,x0))
    def max(sg44: GMat4S) = new IMat4F(math.max(xx,(sg44.xx).toFloat), math.max(xy,(sg44.xy).toFloat), math.max(xz,(sg44.xz).toFloat), math.max(xw,(sg44.xw).toFloat), math.max(yx,(sg44.yx).toFloat), math.max(yy,(sg44.yy).toFloat), math.max(yz,(sg44.yz).toFloat), math.max(yw,(sg44.yw).toFloat), math.max(zx,(sg44.zx).toFloat), math.max(zy,(sg44.zy).toFloat), math.max(zz,(sg44.zz).toFloat), math.max(zw,(sg44.zw).toFloat), math.max(wx,(sg44.wx).toFloat), math.max(wy,(sg44.wy).toFloat), math.max(wz,(sg44.wz).toFloat), math.max(ww,(sg44.ww).toFloat))
    def max(ig44: GMat4I) = new IMat4F(math.max(xx,(ig44.xx).toFloat), math.max(xy,(ig44.xy).toFloat), math.max(xz,(ig44.xz).toFloat), math.max(xw,(ig44.xw).toFloat), math.max(yx,(ig44.yx).toFloat), math.max(yy,(ig44.yy).toFloat), math.max(yz,(ig44.yz).toFloat), math.max(yw,(ig44.yw).toFloat), math.max(zx,(ig44.zx).toFloat), math.max(zy,(ig44.zy).toFloat), math.max(zz,(ig44.zz).toFloat), math.max(zw,(ig44.zw).toFloat), math.max(wx,(ig44.wx).toFloat), math.max(wy,(ig44.wy).toFloat), math.max(wz,(ig44.wz).toFloat), math.max(ww,(ig44.ww).toFloat))
    def max(lg44: GMat4L) = new IMat4D(math.max((xx).toDouble,(lg44.xx).toDouble), math.max((xy).toDouble,(lg44.xy).toDouble), math.max((xz).toDouble,(lg44.xz).toDouble), math.max((xw).toDouble,(lg44.xw).toDouble), math.max((yx).toDouble,(lg44.yx).toDouble), math.max((yy).toDouble,(lg44.yy).toDouble), math.max((yz).toDouble,(lg44.yz).toDouble), math.max((yw).toDouble,(lg44.yw).toDouble), math.max((zx).toDouble,(lg44.zx).toDouble), math.max((zy).toDouble,(lg44.zy).toDouble), math.max((zz).toDouble,(lg44.zz).toDouble), math.max((zw).toDouble,(lg44.zw).toDouble), math.max((wx).toDouble,(lg44.wx).toDouble), math.max((wy).toDouble,(lg44.wy).toDouble), math.max((wz).toDouble,(lg44.wz).toDouble), math.max((ww).toDouble,(lg44.ww).toDouble))
    def max(fg44: GMat4F) = new IMat4F(math.max(xx,fg44.xx), math.max(xy,fg44.xy), math.max(xz,fg44.xz), math.max(xw,fg44.xw), math.max(yx,fg44.yx), math.max(yy,fg44.yy), math.max(yz,fg44.yz), math.max(yw,fg44.yw), math.max(zx,fg44.zx), math.max(zy,fg44.zy), math.max(zz,fg44.zz), math.max(zw,fg44.zw), math.max(wx,fg44.wx), math.max(wy,fg44.wy), math.max(wz,fg44.wz), math.max(ww,fg44.ww))
    def max(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float) = new IMat4F(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(xw,xw0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(yw,yw0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0), math.max(zw,zw0), math.max(wx,wx0), math.max(wy,wy0), math.max(wz,wz0), math.max(ww,ww0))
    def max(dg44: GMat4D) = new IMat4D(math.max((xx).toDouble,dg44.xx), math.max((xy).toDouble,dg44.xy), math.max((xz).toDouble,dg44.xz), math.max((xw).toDouble,dg44.xw), math.max((yx).toDouble,dg44.yx), math.max((yy).toDouble,dg44.yy), math.max((yz).toDouble,dg44.yz), math.max((yw).toDouble,dg44.yw), math.max((zx).toDouble,dg44.zx), math.max((zy).toDouble,dg44.zy), math.max((zz).toDouble,dg44.zz), math.max((zw).toDouble,dg44.zw), math.max((wx).toDouble,dg44.wx), math.max((wy).toDouble,dg44.wy), math.max((wz).toDouble,dg44.wz), math.max((ww).toDouble,dg44.ww))
    def min(x0: Long) = new IMat4D(math.min((xx).toDouble,(x0).toDouble), math.min((xy).toDouble,(x0).toDouble), math.min((xz).toDouble,(x0).toDouble), math.min((xw).toDouble,(x0).toDouble), math.min((yx).toDouble,(x0).toDouble), math.min((yy).toDouble,(x0).toDouble), math.min((yz).toDouble,(x0).toDouble), math.min((yw).toDouble,(x0).toDouble), math.min((zx).toDouble,(x0).toDouble), math.min((zy).toDouble,(x0).toDouble), math.min((zz).toDouble,(x0).toDouble), math.min((zw).toDouble,(x0).toDouble), math.min((wx).toDouble,(x0).toDouble), math.min((wy).toDouble,(x0).toDouble), math.min((wz).toDouble,(x0).toDouble), math.min((ww).toDouble,(x0).toDouble))
    def min(x0: Float) = new IMat4F(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(xw,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(yw,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0), math.min(zw,x0), math.min(wx,x0), math.min(wy,x0), math.min(wz,x0), math.min(ww,x0))
    def min(x0: Double) = new IMat4D(math.min((xx).toDouble,x0), math.min((xy).toDouble,x0), math.min((xz).toDouble,x0), math.min((xw).toDouble,x0), math.min((yx).toDouble,x0), math.min((yy).toDouble,x0), math.min((yz).toDouble,x0), math.min((yw).toDouble,x0), math.min((zx).toDouble,x0), math.min((zy).toDouble,x0), math.min((zz).toDouble,x0), math.min((zw).toDouble,x0), math.min((wx).toDouble,x0), math.min((wy).toDouble,x0), math.min((wz).toDouble,x0), math.min((ww).toDouble,x0))
    def min(sg44: GMat4S) = new IMat4F(math.min(xx,(sg44.xx).toFloat), math.min(xy,(sg44.xy).toFloat), math.min(xz,(sg44.xz).toFloat), math.min(xw,(sg44.xw).toFloat), math.min(yx,(sg44.yx).toFloat), math.min(yy,(sg44.yy).toFloat), math.min(yz,(sg44.yz).toFloat), math.min(yw,(sg44.yw).toFloat), math.min(zx,(sg44.zx).toFloat), math.min(zy,(sg44.zy).toFloat), math.min(zz,(sg44.zz).toFloat), math.min(zw,(sg44.zw).toFloat), math.min(wx,(sg44.wx).toFloat), math.min(wy,(sg44.wy).toFloat), math.min(wz,(sg44.wz).toFloat), math.min(ww,(sg44.ww).toFloat))
    def min(ig44: GMat4I) = new IMat4F(math.min(xx,(ig44.xx).toFloat), math.min(xy,(ig44.xy).toFloat), math.min(xz,(ig44.xz).toFloat), math.min(xw,(ig44.xw).toFloat), math.min(yx,(ig44.yx).toFloat), math.min(yy,(ig44.yy).toFloat), math.min(yz,(ig44.yz).toFloat), math.min(yw,(ig44.yw).toFloat), math.min(zx,(ig44.zx).toFloat), math.min(zy,(ig44.zy).toFloat), math.min(zz,(ig44.zz).toFloat), math.min(zw,(ig44.zw).toFloat), math.min(wx,(ig44.wx).toFloat), math.min(wy,(ig44.wy).toFloat), math.min(wz,(ig44.wz).toFloat), math.min(ww,(ig44.ww).toFloat))
    def min(lg44: GMat4L) = new IMat4D(math.min((xx).toDouble,(lg44.xx).toDouble), math.min((xy).toDouble,(lg44.xy).toDouble), math.min((xz).toDouble,(lg44.xz).toDouble), math.min((xw).toDouble,(lg44.xw).toDouble), math.min((yx).toDouble,(lg44.yx).toDouble), math.min((yy).toDouble,(lg44.yy).toDouble), math.min((yz).toDouble,(lg44.yz).toDouble), math.min((yw).toDouble,(lg44.yw).toDouble), math.min((zx).toDouble,(lg44.zx).toDouble), math.min((zy).toDouble,(lg44.zy).toDouble), math.min((zz).toDouble,(lg44.zz).toDouble), math.min((zw).toDouble,(lg44.zw).toDouble), math.min((wx).toDouble,(lg44.wx).toDouble), math.min((wy).toDouble,(lg44.wy).toDouble), math.min((wz).toDouble,(lg44.wz).toDouble), math.min((ww).toDouble,(lg44.ww).toDouble))
    def min(fg44: GMat4F) = new IMat4F(math.min(xx,fg44.xx), math.min(xy,fg44.xy), math.min(xz,fg44.xz), math.min(xw,fg44.xw), math.min(yx,fg44.yx), math.min(yy,fg44.yy), math.min(yz,fg44.yz), math.min(yw,fg44.yw), math.min(zx,fg44.zx), math.min(zy,fg44.zy), math.min(zz,fg44.zz), math.min(zw,fg44.zw), math.min(wx,fg44.wx), math.min(wy,fg44.wy), math.min(wz,fg44.wz), math.min(ww,fg44.ww))
    def min(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float) = new IMat4F(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(xw,xw0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(yw,yw0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0), math.min(zw,zw0), math.min(wx,wx0), math.min(wy,wy0), math.min(wz,wz0), math.min(ww,ww0))
    def min(dg44: GMat4D) = new IMat4D(math.min((xx).toDouble,dg44.xx), math.min((xy).toDouble,dg44.xy), math.min((xz).toDouble,dg44.xz), math.min((xw).toDouble,dg44.xw), math.min((yx).toDouble,dg44.yx), math.min((yy).toDouble,dg44.yy), math.min((yz).toDouble,dg44.yz), math.min((yw).toDouble,dg44.yw), math.min((zx).toDouble,dg44.zx), math.min((zy).toDouble,dg44.zy), math.min((zz).toDouble,dg44.zz), math.min((zw).toDouble,dg44.zw), math.min((wx).toDouble,dg44.wx), math.min((wy).toDouble,dg44.wy), math.min((wz).toDouble,dg44.wz), math.min((ww).toDouble,dg44.ww))
    def operate(sg44: GMat4S)(fun: (Float,Float)=>Float) = new IMat4F(fun(xx,(sg44.xx).toFloat), fun(xy,(sg44.xy).toFloat), fun(xz,(sg44.xz).toFloat), fun(xw,(sg44.xw).toFloat), fun(yx,(sg44.yx).toFloat), fun(yy,(sg44.yy).toFloat), fun(yz,(sg44.yz).toFloat), fun(yw,(sg44.yw).toFloat), fun(zx,(sg44.zx).toFloat), fun(zy,(sg44.zy).toFloat), fun(zz,(sg44.zz).toFloat), fun(zw,(sg44.zw).toFloat), fun(wx,(sg44.wx).toFloat), fun(wy,(sg44.wy).toFloat), fun(wz,(sg44.wz).toFloat), fun(ww,(sg44.ww).toFloat))
    def operate(ig44: GMat4I)(fun: (Float,Float)=>Float) = new IMat4F(fun(xx,(ig44.xx).toFloat), fun(xy,(ig44.xy).toFloat), fun(xz,(ig44.xz).toFloat), fun(xw,(ig44.xw).toFloat), fun(yx,(ig44.yx).toFloat), fun(yy,(ig44.yy).toFloat), fun(yz,(ig44.yz).toFloat), fun(yw,(ig44.yw).toFloat), fun(zx,(ig44.zx).toFloat), fun(zy,(ig44.zy).toFloat), fun(zz,(ig44.zz).toFloat), fun(zw,(ig44.zw).toFloat), fun(wx,(ig44.wx).toFloat), fun(wy,(ig44.wy).toFloat), fun(wz,(ig44.wz).toFloat), fun(ww,(ig44.ww).toFloat))
    def operate(lg44: GMat4L)(fun: (Double,Double)=>Double) = new IMat4D(fun((xx).toDouble,(lg44.xx).toDouble), fun((xy).toDouble,(lg44.xy).toDouble), fun((xz).toDouble,(lg44.xz).toDouble), fun((xw).toDouble,(lg44.xw).toDouble), fun((yx).toDouble,(lg44.yx).toDouble), fun((yy).toDouble,(lg44.yy).toDouble), fun((yz).toDouble,(lg44.yz).toDouble), fun((yw).toDouble,(lg44.yw).toDouble), fun((zx).toDouble,(lg44.zx).toDouble), fun((zy).toDouble,(lg44.zy).toDouble), fun((zz).toDouble,(lg44.zz).toDouble), fun((zw).toDouble,(lg44.zw).toDouble), fun((wx).toDouble,(lg44.wx).toDouble), fun((wy).toDouble,(lg44.wy).toDouble), fun((wz).toDouble,(lg44.wz).toDouble), fun((ww).toDouble,(lg44.ww).toDouble))
    def operate(fg44: GMat4F)(fun: (Float,Float)=>Float) = new IMat4F(fun(xx,fg44.xx), fun(xy,fg44.xy), fun(xz,fg44.xz), fun(xw,fg44.xw), fun(yx,fg44.yx), fun(yy,fg44.yy), fun(yz,fg44.yz), fun(yw,fg44.yw), fun(zx,fg44.zx), fun(zy,fg44.zy), fun(zz,fg44.zz), fun(zw,fg44.zw), fun(wx,fg44.wx), fun(wy,fg44.wy), fun(wz,fg44.wz), fun(ww,fg44.ww))
    def operate(dg44: GMat4D)(fun: (Double,Double)=>Double) = new IMat4D(fun((xx).toDouble,dg44.xx), fun((xy).toDouble,dg44.xy), fun((xz).toDouble,dg44.xz), fun((xw).toDouble,dg44.xw), fun((yx).toDouble,dg44.yx), fun((yy).toDouble,dg44.yy), fun((yz).toDouble,dg44.yz), fun((yw).toDouble,dg44.yw), fun((zx).toDouble,dg44.zx), fun((zy).toDouble,dg44.zy), fun((zz).toDouble,dg44.zz), fun((zw).toDouble,dg44.zw), fun((wx).toDouble,dg44.wx), fun((wy).toDouble,dg44.wy), fun((wz).toDouble,dg44.wz), fun((ww).toDouble,dg44.ww))
    def fold(zero: Int)(fun: (Int,Float)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Long)(fun: (Long,Float)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Float)(fun: (Float,Float)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Double)(fun: (Double,Float)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def reduce(fun: (Float,Float)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def ===(fg44: GMat4F) = xx==fg44.xx && xy==fg44.xy && xz==fg44.xz && xw==fg44.xw && yx==fg44.yx && yy==fg44.yy && yz==fg44.yz && yw==fg44.yw && zx==fg44.zx && zy==fg44.zy && zz==fg44.zz && zw==fg44.zw && wx==fg44.wx && wy==fg44.wy && wz==fg44.wz && ww==fg44.ww
    def ===(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float) = xx==xx0 && xy==xy0 && xz==xz0 && xw==xw0 && yx==yx0 && yy==yy0 && yz==yz0 && yw==yw0 && zx==zx0 && zy==zy0 && zz==zz0 && zw==zw0 && wx==wx0 && wy==wy0 && wz==wz0 && ww==ww0
    def approx(fg44: GMat4F, eps: Float) = ScalarF.close(xx,fg44.xx,eps) && ScalarF.close(xy,fg44.xy,eps) && ScalarF.close(xz,fg44.xz,eps) && ScalarF.close(xw,fg44.xw,eps) && ScalarF.close(yx,fg44.yx,eps) && ScalarF.close(yy,fg44.yy,eps) && ScalarF.close(yz,fg44.yz,eps) && ScalarF.close(yw,fg44.yw,eps) && ScalarF.close(zx,fg44.zx,eps) && ScalarF.close(zy,fg44.zy,eps) && ScalarF.close(zz,fg44.zz,eps) && ScalarF.close(zw,fg44.zw,eps) && ScalarF.close(wx,fg44.wx,eps) && ScalarF.close(wy,fg44.wy,eps) && ScalarF.close(wz,fg44.wz,eps) && ScalarF.close(ww,fg44.ww,eps)
    def approx(dg44: GMat4D, eps: Double) = ScalarD.close(xx,dg44.xx,eps) && ScalarD.close(xy,dg44.xy,eps) && ScalarD.close(xz,dg44.xz,eps) && ScalarD.close(xw,dg44.xw,eps) && ScalarD.close(yx,dg44.yx,eps) && ScalarD.close(yy,dg44.yy,eps) && ScalarD.close(yz,dg44.yz,eps) && ScalarD.close(yw,dg44.yw,eps) && ScalarD.close(zx,dg44.zx,eps) && ScalarD.close(zy,dg44.zy,eps) && ScalarD.close(zz,dg44.zz,eps) && ScalarD.close(zw,dg44.zw,eps) && ScalarD.close(wx,dg44.wx,eps) && ScalarD.close(wy,dg44.wy,eps) && ScalarD.close(wz,dg44.wz,eps) && ScalarD.close(ww,dg44.ww,eps)
    final def =~=(fg44: GMat4F) = approx(fg44, 1e-10f)
    final def =~=(dg44: GMat4D) = approx(dg44, 1e-10)
    def approx(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float, eps: Float) = ScalarF.close(xx,xx0,eps) && ScalarF.close(xy,xy0,eps) && ScalarF.close(xz,xz0,eps) && ScalarF.close(xw,xw0,eps) && ScalarF.close(yx,yx0,eps) && ScalarF.close(yy,yy0,eps) && ScalarF.close(yz,yz0,eps) && ScalarF.close(yw,yw0,eps) && ScalarF.close(zx,zx0,eps) && ScalarF.close(zy,zy0,eps) && ScalarF.close(zz,zz0,eps) && ScalarF.close(zw,zw0,eps) && ScalarF.close(wx,wx0,eps) && ScalarF.close(wy,wy0,eps) && ScalarF.close(wz,wz0,eps) && ScalarF.close(ww,ww0,eps)
    def det = xx*(yy*(zz*ww - zw*wz) + yz*(zw*wy - zy*ww) + yw*(zy*wz - zz*wy)) + xy*(yz*(zw*wx - zx*ww) + yw*(zx*wz - zz*wx) + yx*(zz*ww - zw*wz)) + xz*(yw*(zx*wy - zy*wx) + yx*(zy*ww - zw*wy) + yy*(zw*wx - zx*ww)) + xw*(yx*(zy*wz - zz*wy) + yy*(zz*wx - zx*wz) + yz*(zx*wy - zy*wx))
    def trace = new IVec4F(xx, yy, zz, ww)
    def xRow = new IVec4F(xx, xy, xz, xw)
    def xCol = new IVec4F(xx, yx, zx, wx)
    def yRow = new IVec4F(yx, yy, yz, yw)
    def yCol = new IVec4F(xy, yy, zy, wy)
    def zRow = new IVec4F(zx, zy, zz, zw)
    def zCol = new IVec4F(xz, yz, zz, wz)
    def wRow = new IVec4F(wx, wy, wz, ww)
    def wCol = new IVec4F(xw, yw, zw, ww)
    def t = new IMat4F(xx, yx, zx, wx, xy, yy, zy, wy, xz, yz, zz, wz, xw, yw, zw, ww)
    def inv = mut.invEq.imm
    def **(sg4: GVec4S) = new IVec4F(xx*(sg4.x).toFloat+xy*(sg4.y).toFloat+xz*(sg4.z).toFloat+xw*(sg4.w).toFloat, yx*(sg4.x).toFloat+yy*(sg4.y).toFloat+yz*(sg4.z).toFloat+yw*(sg4.w).toFloat, zx*(sg4.x).toFloat+zy*(sg4.y).toFloat+zz*(sg4.z).toFloat+zw*(sg4.w).toFloat, wx*(sg4.x).toFloat+wy*(sg4.y).toFloat+wz*(sg4.z).toFloat+ww*(sg4.w).toFloat)
    def **(ig4: GVec4I) = new IVec4F(xx*(ig4.x).toFloat+xy*(ig4.y).toFloat+xz*(ig4.z).toFloat+xw*(ig4.w).toFloat, yx*(ig4.x).toFloat+yy*(ig4.y).toFloat+yz*(ig4.z).toFloat+yw*(ig4.w).toFloat, zx*(ig4.x).toFloat+zy*(ig4.y).toFloat+zz*(ig4.z).toFloat+zw*(ig4.w).toFloat, wx*(ig4.x).toFloat+wy*(ig4.y).toFloat+wz*(ig4.z).toFloat+ww*(ig4.w).toFloat)
    def **(lg4: GVec4L) = new IVec4D((xx).toDouble*(lg4.x).toDouble+(xy).toDouble*(lg4.y).toDouble+(xz).toDouble*(lg4.z).toDouble+(xw).toDouble*(lg4.w).toDouble, (yx).toDouble*(lg4.x).toDouble+(yy).toDouble*(lg4.y).toDouble+(yz).toDouble*(lg4.z).toDouble+(yw).toDouble*(lg4.w).toDouble, (zx).toDouble*(lg4.x).toDouble+(zy).toDouble*(lg4.y).toDouble+(zz).toDouble*(lg4.z).toDouble+(zw).toDouble*(lg4.w).toDouble, (wx).toDouble*(lg4.x).toDouble+(wy).toDouble*(lg4.y).toDouble+(wz).toDouble*(lg4.z).toDouble+(ww).toDouble*(lg4.w).toDouble)
    def **(fg4: GVec4F) = new IVec4F(xx*fg4.x+xy*fg4.y+xz*fg4.z+xw*fg4.w, yx*fg4.x+yy*fg4.y+yz*fg4.z+yw*fg4.w, zx*fg4.x+zy*fg4.y+zz*fg4.z+zw*fg4.w, wx*fg4.x+wy*fg4.y+wz*fg4.z+ww*fg4.w)
    def **(dg4: GVec4D) = new IVec4D((xx).toDouble*dg4.x+(xy).toDouble*dg4.y+(xz).toDouble*dg4.z+(xw).toDouble*dg4.w, (yx).toDouble*dg4.x+(yy).toDouble*dg4.y+(yz).toDouble*dg4.z+(yw).toDouble*dg4.w, (zx).toDouble*dg4.x+(zy).toDouble*dg4.y+(zz).toDouble*dg4.z+(zw).toDouble*dg4.w, (wx).toDouble*dg4.x+(wy).toDouble*dg4.y+(wz).toDouble*dg4.z+(ww).toDouble*dg4.w)
    def **(sg44: GMat4S) = new IMat4F(xx*(sg44.xx).toFloat+xy*(sg44.yx).toFloat+xz*(sg44.zx).toFloat+xw*(sg44.wx).toFloat, xx*(sg44.xy).toFloat+xy*(sg44.yy).toFloat+xz*(sg44.zy).toFloat+xw*(sg44.wy).toFloat, xx*(sg44.xz).toFloat+xy*(sg44.yz).toFloat+xz*(sg44.zz).toFloat+xw*(sg44.wz).toFloat, xx*(sg44.xw).toFloat+xy*(sg44.yw).toFloat+xz*(sg44.zw).toFloat+xw*(sg44.ww).toFloat, yx*(sg44.xx).toFloat+yy*(sg44.yx).toFloat+yz*(sg44.zx).toFloat+yw*(sg44.wx).toFloat, yx*(sg44.xy).toFloat+yy*(sg44.yy).toFloat+yz*(sg44.zy).toFloat+yw*(sg44.wy).toFloat, yx*(sg44.xz).toFloat+yy*(sg44.yz).toFloat+yz*(sg44.zz).toFloat+yw*(sg44.wz).toFloat, yx*(sg44.xw).toFloat+yy*(sg44.yw).toFloat+yz*(sg44.zw).toFloat+yw*(sg44.ww).toFloat, zx*(sg44.xx).toFloat+zy*(sg44.yx).toFloat+zz*(sg44.zx).toFloat+zw*(sg44.wx).toFloat, zx*(sg44.xy).toFloat+zy*(sg44.yy).toFloat+zz*(sg44.zy).toFloat+zw*(sg44.wy).toFloat, zx*(sg44.xz).toFloat+zy*(sg44.yz).toFloat+zz*(sg44.zz).toFloat+zw*(sg44.wz).toFloat, zx*(sg44.xw).toFloat+zy*(sg44.yw).toFloat+zz*(sg44.zw).toFloat+zw*(sg44.ww).toFloat, wx*(sg44.xx).toFloat+wy*(sg44.yx).toFloat+wz*(sg44.zx).toFloat+ww*(sg44.wx).toFloat, wx*(sg44.xy).toFloat+wy*(sg44.yy).toFloat+wz*(sg44.zy).toFloat+ww*(sg44.wy).toFloat, wx*(sg44.xz).toFloat+wy*(sg44.yz).toFloat+wz*(sg44.zz).toFloat+ww*(sg44.wz).toFloat, wx*(sg44.xw).toFloat+wy*(sg44.yw).toFloat+wz*(sg44.zw).toFloat+ww*(sg44.ww).toFloat)
    def **(ig44: GMat4I) = new IMat4F(xx*(ig44.xx).toFloat+xy*(ig44.yx).toFloat+xz*(ig44.zx).toFloat+xw*(ig44.wx).toFloat, xx*(ig44.xy).toFloat+xy*(ig44.yy).toFloat+xz*(ig44.zy).toFloat+xw*(ig44.wy).toFloat, xx*(ig44.xz).toFloat+xy*(ig44.yz).toFloat+xz*(ig44.zz).toFloat+xw*(ig44.wz).toFloat, xx*(ig44.xw).toFloat+xy*(ig44.yw).toFloat+xz*(ig44.zw).toFloat+xw*(ig44.ww).toFloat, yx*(ig44.xx).toFloat+yy*(ig44.yx).toFloat+yz*(ig44.zx).toFloat+yw*(ig44.wx).toFloat, yx*(ig44.xy).toFloat+yy*(ig44.yy).toFloat+yz*(ig44.zy).toFloat+yw*(ig44.wy).toFloat, yx*(ig44.xz).toFloat+yy*(ig44.yz).toFloat+yz*(ig44.zz).toFloat+yw*(ig44.wz).toFloat, yx*(ig44.xw).toFloat+yy*(ig44.yw).toFloat+yz*(ig44.zw).toFloat+yw*(ig44.ww).toFloat, zx*(ig44.xx).toFloat+zy*(ig44.yx).toFloat+zz*(ig44.zx).toFloat+zw*(ig44.wx).toFloat, zx*(ig44.xy).toFloat+zy*(ig44.yy).toFloat+zz*(ig44.zy).toFloat+zw*(ig44.wy).toFloat, zx*(ig44.xz).toFloat+zy*(ig44.yz).toFloat+zz*(ig44.zz).toFloat+zw*(ig44.wz).toFloat, zx*(ig44.xw).toFloat+zy*(ig44.yw).toFloat+zz*(ig44.zw).toFloat+zw*(ig44.ww).toFloat, wx*(ig44.xx).toFloat+wy*(ig44.yx).toFloat+wz*(ig44.zx).toFloat+ww*(ig44.wx).toFloat, wx*(ig44.xy).toFloat+wy*(ig44.yy).toFloat+wz*(ig44.zy).toFloat+ww*(ig44.wy).toFloat, wx*(ig44.xz).toFloat+wy*(ig44.yz).toFloat+wz*(ig44.zz).toFloat+ww*(ig44.wz).toFloat, wx*(ig44.xw).toFloat+wy*(ig44.yw).toFloat+wz*(ig44.zw).toFloat+ww*(ig44.ww).toFloat)
    def **(lg44: GMat4L) = new IMat4D((xx).toDouble*(lg44.xx).toDouble+(xy).toDouble*(lg44.yx).toDouble+(xz).toDouble*(lg44.zx).toDouble+(xw).toDouble*(lg44.wx).toDouble, (xx).toDouble*(lg44.xy).toDouble+(xy).toDouble*(lg44.yy).toDouble+(xz).toDouble*(lg44.zy).toDouble+(xw).toDouble*(lg44.wy).toDouble, (xx).toDouble*(lg44.xz).toDouble+(xy).toDouble*(lg44.yz).toDouble+(xz).toDouble*(lg44.zz).toDouble+(xw).toDouble*(lg44.wz).toDouble, (xx).toDouble*(lg44.xw).toDouble+(xy).toDouble*(lg44.yw).toDouble+(xz).toDouble*(lg44.zw).toDouble+(xw).toDouble*(lg44.ww).toDouble, (yx).toDouble*(lg44.xx).toDouble+(yy).toDouble*(lg44.yx).toDouble+(yz).toDouble*(lg44.zx).toDouble+(yw).toDouble*(lg44.wx).toDouble, (yx).toDouble*(lg44.xy).toDouble+(yy).toDouble*(lg44.yy).toDouble+(yz).toDouble*(lg44.zy).toDouble+(yw).toDouble*(lg44.wy).toDouble, (yx).toDouble*(lg44.xz).toDouble+(yy).toDouble*(lg44.yz).toDouble+(yz).toDouble*(lg44.zz).toDouble+(yw).toDouble*(lg44.wz).toDouble, (yx).toDouble*(lg44.xw).toDouble+(yy).toDouble*(lg44.yw).toDouble+(yz).toDouble*(lg44.zw).toDouble+(yw).toDouble*(lg44.ww).toDouble, (zx).toDouble*(lg44.xx).toDouble+(zy).toDouble*(lg44.yx).toDouble+(zz).toDouble*(lg44.zx).toDouble+(zw).toDouble*(lg44.wx).toDouble, (zx).toDouble*(lg44.xy).toDouble+(zy).toDouble*(lg44.yy).toDouble+(zz).toDouble*(lg44.zy).toDouble+(zw).toDouble*(lg44.wy).toDouble, (zx).toDouble*(lg44.xz).toDouble+(zy).toDouble*(lg44.yz).toDouble+(zz).toDouble*(lg44.zz).toDouble+(zw).toDouble*(lg44.wz).toDouble, (zx).toDouble*(lg44.xw).toDouble+(zy).toDouble*(lg44.yw).toDouble+(zz).toDouble*(lg44.zw).toDouble+(zw).toDouble*(lg44.ww).toDouble, (wx).toDouble*(lg44.xx).toDouble+(wy).toDouble*(lg44.yx).toDouble+(wz).toDouble*(lg44.zx).toDouble+(ww).toDouble*(lg44.wx).toDouble, (wx).toDouble*(lg44.xy).toDouble+(wy).toDouble*(lg44.yy).toDouble+(wz).toDouble*(lg44.zy).toDouble+(ww).toDouble*(lg44.wy).toDouble, (wx).toDouble*(lg44.xz).toDouble+(wy).toDouble*(lg44.yz).toDouble+(wz).toDouble*(lg44.zz).toDouble+(ww).toDouble*(lg44.wz).toDouble, (wx).toDouble*(lg44.xw).toDouble+(wy).toDouble*(lg44.yw).toDouble+(wz).toDouble*(lg44.zw).toDouble+(ww).toDouble*(lg44.ww).toDouble)
    def **(fg44: GMat4F) = new IMat4F(xx*fg44.xx+xy*fg44.yx+xz*fg44.zx+xw*fg44.wx, xx*fg44.xy+xy*fg44.yy+xz*fg44.zy+xw*fg44.wy, xx*fg44.xz+xy*fg44.yz+xz*fg44.zz+xw*fg44.wz, xx*fg44.xw+xy*fg44.yw+xz*fg44.zw+xw*fg44.ww, yx*fg44.xx+yy*fg44.yx+yz*fg44.zx+yw*fg44.wx, yx*fg44.xy+yy*fg44.yy+yz*fg44.zy+yw*fg44.wy, yx*fg44.xz+yy*fg44.yz+yz*fg44.zz+yw*fg44.wz, yx*fg44.xw+yy*fg44.yw+yz*fg44.zw+yw*fg44.ww, zx*fg44.xx+zy*fg44.yx+zz*fg44.zx+zw*fg44.wx, zx*fg44.xy+zy*fg44.yy+zz*fg44.zy+zw*fg44.wy, zx*fg44.xz+zy*fg44.yz+zz*fg44.zz+zw*fg44.wz, zx*fg44.xw+zy*fg44.yw+zz*fg44.zw+zw*fg44.ww, wx*fg44.xx+wy*fg44.yx+wz*fg44.zx+ww*fg44.wx, wx*fg44.xy+wy*fg44.yy+wz*fg44.zy+ww*fg44.wy, wx*fg44.xz+wy*fg44.yz+wz*fg44.zz+ww*fg44.wz, wx*fg44.xw+wy*fg44.yw+wz*fg44.zw+ww*fg44.ww)
    def **(dg44: GMat4D) = new IMat4D((xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx, (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy, (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz, (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww, (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx, (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy, (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz, (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww, (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx, (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy, (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz, (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww, (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx, (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy, (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz, (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww)
  } // class GMat4F

  object GMat4F {
    def apply(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): GMat4F = new IMat4F(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): GMat4F = IMat4F.parse(str)
    val identity: GMat4F = IMat4F.identity
    val zero: GMat4F = IMat4F.zero
    def traced(fg4: GVec4F) = new IMat4F(fg4.x, 0, 0, 0, 0, fg4.y, 0, 0, 0, 0, fg4.z, 0, 0, 0, 0, fg4.w)
  } // object GMat4F


  abstract class GMat4D extends Cloneable {
    def xx: Double
    def xy: Double
    def xz: Double
    def xw: Double
    def yx: Double
    def yy: Double
    def yz: Double
    def yw: Double
    def zx: Double
    def zy: Double
    def zz: Double
    def zw: Double
    def wx: Double
    def wy: Double
    def wz: Double
    def ww: Double
    override def toString = "["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]"
    override def hashCode = (((((((((((((((ww.##)*16777619 ^ wz.##)*16777619 ^ wy.##)*16777619 ^ wx.##)*16777619 ^ zw.##)*16777619 ^ zz.##)*16777619 ^ zy.##)*16777619 ^ zx.##)*16777619 ^ yw.##)*16777619 ^ yz.##)*16777619 ^ yy.##)*16777619 ^ yx.##)*16777619 ^ xw.##)*16777619 ^ xz.##)*16777619 ^ xy.##)*16777619 ^ xx.##
    override def equals(any: Any) = any match { case sg44: GMat4S => {xx==sg44.xx && xy==sg44.xy && xz==sg44.xz && xw==sg44.xw && yx==sg44.yx && yy==sg44.yy && yz==sg44.yz && yw==sg44.yw && zx==sg44.zx && zy==sg44.zy && zz==sg44.zz && zw==sg44.zw && wx==sg44.wx && wy==sg44.wy && wz==sg44.wz && ww==sg44.ww }; case ig44: GMat4I => {xx==ig44.xx && xy==ig44.xy && xz==ig44.xz && xw==ig44.xw && yx==ig44.yx && yy==ig44.yy && yz==ig44.yz && yw==ig44.yw && zx==ig44.zx && zy==ig44.zy && zz==ig44.zz && zw==ig44.zw && wx==ig44.wx && wy==ig44.wy && wz==ig44.wz && ww==ig44.ww }; case lg44: GMat4L => {xx==lg44.xx && xy==lg44.xy && xz==lg44.xz && xw==lg44.xw && yx==lg44.yx && yy==lg44.yy && yz==lg44.yz && yw==lg44.yw && zx==lg44.zx && zy==lg44.zy && zz==lg44.zz && zw==lg44.zw && wx==lg44.wx && wy==lg44.wy && wz==lg44.wz && ww==lg44.ww }; case fg44: GMat4F => {xx==fg44.xx && xy==fg44.xy && xz==fg44.xz && xw==fg44.xw && yx==fg44.yx && yy==fg44.yy && yz==fg44.yz && yw==fg44.yw && zx==fg44.zx && zy==fg44.zy && zz==fg44.zz && zw==fg44.zw && wx==fg44.wx && wy==fg44.wy && wz==fg44.wz && ww==fg44.ww }; case dg44: GMat4D => {xx==dg44.xx && xy==dg44.xy && xz==dg44.xz && xw==dg44.xw && yx==dg44.yx && yy==dg44.yy && yz==dg44.yz && yw==dg44.yw && zx==dg44.zx && zy==dg44.zy && zz==dg44.zz && zw==dg44.zw && wx==dg44.wx && wy==dg44.wy && wz==dg44.wz && ww==dg44.ww }; case _ => false }
    override def clone(): GMat4D = new IMat4D(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def toS: GMat4S = new IMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    def toI: GMat4I = new IMat4I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(xw)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(yw)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt, (math.round(zw)).toInt, (math.round(wx)).toInt, (math.round(wy)).toInt, (math.round(wz)).toInt, (math.round(ww)).toInt)
    def mapI(fun: Double => Int) = new IMat4I((math.round(fun(xx))).toInt, (math.round(fun(xy))).toInt, (math.round(fun(xz))).toInt, (math.round(fun(xw))).toInt, (math.round(fun(yx))).toInt, (math.round(fun(yy))).toInt, (math.round(fun(yz))).toInt, (math.round(fun(yw))).toInt, (math.round(fun(zx))).toInt, (math.round(fun(zy))).toInt, (math.round(fun(zz))).toInt, (math.round(fun(zw))).toInt, (math.round(fun(wx))).toInt, (math.round(fun(wy))).toInt, (math.round(fun(wz))).toInt, (math.round(fun(ww))).toInt)
    def toL: GMat4L = new IMat4L(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    def mapL(fun: Double => Long) = new IMat4L(math.round(fun(xx)), math.round(fun(xy)), math.round(fun(xz)), math.round(fun(xw)), math.round(fun(yx)), math.round(fun(yy)), math.round(fun(yz)), math.round(fun(yw)), math.round(fun(zx)), math.round(fun(zy)), math.round(fun(zz)), math.round(fun(zw)), math.round(fun(wx)), math.round(fun(wy)), math.round(fun(wz)), math.round(fun(ww)))
    def toF: GMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    def mapF(fun: Double => Float) = new IMat4F((fun(xx)).toFloat, (fun(xy)).toFloat, (fun(xz)).toFloat, (fun(xw)).toFloat, (fun(yx)).toFloat, (fun(yy)).toFloat, (fun(yz)).toFloat, (fun(yw)).toFloat, (fun(zx)).toFloat, (fun(zy)).toFloat, (fun(zz)).toFloat, (fun(zw)).toFloat, (fun(wx)).toFloat, (fun(wy)).toFloat, (fun(wz)).toFloat, (fun(ww)).toFloat)
    def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, xw0: Double = xw, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, yw0: Double = yw, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz, zw0: Double = zw, wx0: Double = wx, wy0: Double = wy, wz0: Double = wz, ww0: Double = ww): GMat4D = new IMat4D(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def trim: GMat3D = new IMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapD(fun: Double => Double) = new IMat4D(fun(xx), fun(xy), fun(xz), fun(xw), fun(yx), fun(yy), fun(yz), fun(yw), fun(zx), fun(zy), fun(zz), fun(zw), fun(wx), fun(wy), fun(wz), fun(ww))
    def imm = new IMat4D(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def mut = new MMat4D(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    def unary_-() = new IMat4D(-xx, -xy, -xz, -xw, -yx, -yy, -yz, -yw, -zx, -zy, -zz, -zw, -wx, -wy, -wz, -ww)
    def +(x0: Double) = new IMat4D(xx + x0, xy + x0, xz + x0, xw + x0, yx + x0, yy + x0, yz + x0, yw + x0, zx + x0, zy + x0, zz + x0, zw + x0, wx + x0, wy + x0, wz + x0, ww + x0)
    def +(sg44: GMat4S) = new IMat4D(xx + (sg44.xx).toDouble, xy + (sg44.xy).toDouble, xz + (sg44.xz).toDouble, xw + (sg44.xw).toDouble, yx + (sg44.yx).toDouble, yy + (sg44.yy).toDouble, yz + (sg44.yz).toDouble, yw + (sg44.yw).toDouble, zx + (sg44.zx).toDouble, zy + (sg44.zy).toDouble, zz + (sg44.zz).toDouble, zw + (sg44.zw).toDouble, wx + (sg44.wx).toDouble, wy + (sg44.wy).toDouble, wz + (sg44.wz).toDouble, ww + (sg44.ww).toDouble)
    def +(ig44: GMat4I) = new IMat4D(xx + (ig44.xx).toDouble, xy + (ig44.xy).toDouble, xz + (ig44.xz).toDouble, xw + (ig44.xw).toDouble, yx + (ig44.yx).toDouble, yy + (ig44.yy).toDouble, yz + (ig44.yz).toDouble, yw + (ig44.yw).toDouble, zx + (ig44.zx).toDouble, zy + (ig44.zy).toDouble, zz + (ig44.zz).toDouble, zw + (ig44.zw).toDouble, wx + (ig44.wx).toDouble, wy + (ig44.wy).toDouble, wz + (ig44.wz).toDouble, ww + (ig44.ww).toDouble)
    def +(lg44: GMat4L) = new IMat4D(xx + (lg44.xx).toDouble, xy + (lg44.xy).toDouble, xz + (lg44.xz).toDouble, xw + (lg44.xw).toDouble, yx + (lg44.yx).toDouble, yy + (lg44.yy).toDouble, yz + (lg44.yz).toDouble, yw + (lg44.yw).toDouble, zx + (lg44.zx).toDouble, zy + (lg44.zy).toDouble, zz + (lg44.zz).toDouble, zw + (lg44.zw).toDouble, wx + (lg44.wx).toDouble, wy + (lg44.wy).toDouble, wz + (lg44.wz).toDouble, ww + (lg44.ww).toDouble)
    def +(fg44: GMat4F) = new IMat4D(xx + (fg44.xx).toDouble, xy + (fg44.xy).toDouble, xz + (fg44.xz).toDouble, xw + (fg44.xw).toDouble, yx + (fg44.yx).toDouble, yy + (fg44.yy).toDouble, yz + (fg44.yz).toDouble, yw + (fg44.yw).toDouble, zx + (fg44.zx).toDouble, zy + (fg44.zy).toDouble, zz + (fg44.zz).toDouble, zw + (fg44.zw).toDouble, wx + (fg44.wx).toDouble, wy + (fg44.wy).toDouble, wz + (fg44.wz).toDouble, ww + (fg44.ww).toDouble)
    def +(dg44: GMat4D) = new IMat4D(xx + dg44.xx, xy + dg44.xy, xz + dg44.xz, xw + dg44.xw, yx + dg44.yx, yy + dg44.yy, yz + dg44.yz, yw + dg44.yw, zx + dg44.zx, zy + dg44.zy, zz + dg44.zz, zw + dg44.zw, wx + dg44.wx, wy + dg44.wy, wz + dg44.wz, ww + dg44.ww)
    def +(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double) = new IMat4D(xx + xx0, xy + xy0, xz + xz0, xw + xw0, yx + yx0, yy + yy0, yz + yz0, yw + yw0, zx + zx0, zy + zy0, zz + zz0, zw + zw0, wx + wx0, wy + wy0, wz + wz0, ww + ww0)
    def -(x0: Double) = new IMat4D(xx - x0, xy - x0, xz - x0, xw - x0, yx - x0, yy - x0, yz - x0, yw - x0, zx - x0, zy - x0, zz - x0, zw - x0, wx - x0, wy - x0, wz - x0, ww - x0)
    def -(sg44: GMat4S) = new IMat4D(xx - (sg44.xx).toDouble, xy - (sg44.xy).toDouble, xz - (sg44.xz).toDouble, xw - (sg44.xw).toDouble, yx - (sg44.yx).toDouble, yy - (sg44.yy).toDouble, yz - (sg44.yz).toDouble, yw - (sg44.yw).toDouble, zx - (sg44.zx).toDouble, zy - (sg44.zy).toDouble, zz - (sg44.zz).toDouble, zw - (sg44.zw).toDouble, wx - (sg44.wx).toDouble, wy - (sg44.wy).toDouble, wz - (sg44.wz).toDouble, ww - (sg44.ww).toDouble)
    def -(ig44: GMat4I) = new IMat4D(xx - (ig44.xx).toDouble, xy - (ig44.xy).toDouble, xz - (ig44.xz).toDouble, xw - (ig44.xw).toDouble, yx - (ig44.yx).toDouble, yy - (ig44.yy).toDouble, yz - (ig44.yz).toDouble, yw - (ig44.yw).toDouble, zx - (ig44.zx).toDouble, zy - (ig44.zy).toDouble, zz - (ig44.zz).toDouble, zw - (ig44.zw).toDouble, wx - (ig44.wx).toDouble, wy - (ig44.wy).toDouble, wz - (ig44.wz).toDouble, ww - (ig44.ww).toDouble)
    def -(lg44: GMat4L) = new IMat4D(xx - (lg44.xx).toDouble, xy - (lg44.xy).toDouble, xz - (lg44.xz).toDouble, xw - (lg44.xw).toDouble, yx - (lg44.yx).toDouble, yy - (lg44.yy).toDouble, yz - (lg44.yz).toDouble, yw - (lg44.yw).toDouble, zx - (lg44.zx).toDouble, zy - (lg44.zy).toDouble, zz - (lg44.zz).toDouble, zw - (lg44.zw).toDouble, wx - (lg44.wx).toDouble, wy - (lg44.wy).toDouble, wz - (lg44.wz).toDouble, ww - (lg44.ww).toDouble)
    def -(fg44: GMat4F) = new IMat4D(xx - (fg44.xx).toDouble, xy - (fg44.xy).toDouble, xz - (fg44.xz).toDouble, xw - (fg44.xw).toDouble, yx - (fg44.yx).toDouble, yy - (fg44.yy).toDouble, yz - (fg44.yz).toDouble, yw - (fg44.yw).toDouble, zx - (fg44.zx).toDouble, zy - (fg44.zy).toDouble, zz - (fg44.zz).toDouble, zw - (fg44.zw).toDouble, wx - (fg44.wx).toDouble, wy - (fg44.wy).toDouble, wz - (fg44.wz).toDouble, ww - (fg44.ww).toDouble)
    def -(dg44: GMat4D) = new IMat4D(xx - dg44.xx, xy - dg44.xy, xz - dg44.xz, xw - dg44.xw, yx - dg44.yx, yy - dg44.yy, yz - dg44.yz, yw - dg44.yw, zx - dg44.zx, zy - dg44.zy, zz - dg44.zz, zw - dg44.zw, wx - dg44.wx, wy - dg44.wy, wz - dg44.wz, ww - dg44.ww)
    def -(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double) = new IMat4D(xx - xx0, xy - xy0, xz - xz0, xw - xw0, yx - yx0, yy - yy0, yz - yz0, yw - yw0, zx - zx0, zy - zy0, zz - zz0, zw - zw0, wx - wx0, wy - wy0, wz - wz0, ww - ww0)
    def *(x0: Double) = new IMat4D(xx * x0, xy * x0, xz * x0, xw * x0, yx * x0, yy * x0, yz * x0, yw * x0, zx * x0, zy * x0, zz * x0, zw * x0, wx * x0, wy * x0, wz * x0, ww * x0)
    def *(sg44: GMat4S) = new IMat4D(xx * (sg44.xx).toDouble, xy * (sg44.xy).toDouble, xz * (sg44.xz).toDouble, xw * (sg44.xw).toDouble, yx * (sg44.yx).toDouble, yy * (sg44.yy).toDouble, yz * (sg44.yz).toDouble, yw * (sg44.yw).toDouble, zx * (sg44.zx).toDouble, zy * (sg44.zy).toDouble, zz * (sg44.zz).toDouble, zw * (sg44.zw).toDouble, wx * (sg44.wx).toDouble, wy * (sg44.wy).toDouble, wz * (sg44.wz).toDouble, ww * (sg44.ww).toDouble)
    def *(ig44: GMat4I) = new IMat4D(xx * (ig44.xx).toDouble, xy * (ig44.xy).toDouble, xz * (ig44.xz).toDouble, xw * (ig44.xw).toDouble, yx * (ig44.yx).toDouble, yy * (ig44.yy).toDouble, yz * (ig44.yz).toDouble, yw * (ig44.yw).toDouble, zx * (ig44.zx).toDouble, zy * (ig44.zy).toDouble, zz * (ig44.zz).toDouble, zw * (ig44.zw).toDouble, wx * (ig44.wx).toDouble, wy * (ig44.wy).toDouble, wz * (ig44.wz).toDouble, ww * (ig44.ww).toDouble)
    def *(lg44: GMat4L) = new IMat4D(xx * (lg44.xx).toDouble, xy * (lg44.xy).toDouble, xz * (lg44.xz).toDouble, xw * (lg44.xw).toDouble, yx * (lg44.yx).toDouble, yy * (lg44.yy).toDouble, yz * (lg44.yz).toDouble, yw * (lg44.yw).toDouble, zx * (lg44.zx).toDouble, zy * (lg44.zy).toDouble, zz * (lg44.zz).toDouble, zw * (lg44.zw).toDouble, wx * (lg44.wx).toDouble, wy * (lg44.wy).toDouble, wz * (lg44.wz).toDouble, ww * (lg44.ww).toDouble)
    def *(fg44: GMat4F) = new IMat4D(xx * (fg44.xx).toDouble, xy * (fg44.xy).toDouble, xz * (fg44.xz).toDouble, xw * (fg44.xw).toDouble, yx * (fg44.yx).toDouble, yy * (fg44.yy).toDouble, yz * (fg44.yz).toDouble, yw * (fg44.yw).toDouble, zx * (fg44.zx).toDouble, zy * (fg44.zy).toDouble, zz * (fg44.zz).toDouble, zw * (fg44.zw).toDouble, wx * (fg44.wx).toDouble, wy * (fg44.wy).toDouble, wz * (fg44.wz).toDouble, ww * (fg44.ww).toDouble)
    def *(dg44: GMat4D) = new IMat4D(xx * dg44.xx, xy * dg44.xy, xz * dg44.xz, xw * dg44.xw, yx * dg44.yx, yy * dg44.yy, yz * dg44.yz, yw * dg44.yw, zx * dg44.zx, zy * dg44.zy, zz * dg44.zz, zw * dg44.zw, wx * dg44.wx, wy * dg44.wy, wz * dg44.wz, ww * dg44.ww)
    def *(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double) = new IMat4D(xx * xx0, xy * xy0, xz * xz0, xw * xw0, yx * yx0, yy * yy0, yz * yz0, yw * yw0, zx * zx0, zy * zy0, zz * zz0, zw * zw0, wx * wx0, wy * wy0, wz * wz0, ww * ww0)
    def /(x0: Double) = new IMat4D(xx / x0, xy / x0, xz / x0, xw / x0, yx / x0, yy / x0, yz / x0, yw / x0, zx / x0, zy / x0, zz / x0, zw / x0, wx / x0, wy / x0, wz / x0, ww / x0)
    def /(sg44: GMat4S) = new IMat4D(xx / (sg44.xx).toDouble, xy / (sg44.xy).toDouble, xz / (sg44.xz).toDouble, xw / (sg44.xw).toDouble, yx / (sg44.yx).toDouble, yy / (sg44.yy).toDouble, yz / (sg44.yz).toDouble, yw / (sg44.yw).toDouble, zx / (sg44.zx).toDouble, zy / (sg44.zy).toDouble, zz / (sg44.zz).toDouble, zw / (sg44.zw).toDouble, wx / (sg44.wx).toDouble, wy / (sg44.wy).toDouble, wz / (sg44.wz).toDouble, ww / (sg44.ww).toDouble)
    def /(ig44: GMat4I) = new IMat4D(xx / (ig44.xx).toDouble, xy / (ig44.xy).toDouble, xz / (ig44.xz).toDouble, xw / (ig44.xw).toDouble, yx / (ig44.yx).toDouble, yy / (ig44.yy).toDouble, yz / (ig44.yz).toDouble, yw / (ig44.yw).toDouble, zx / (ig44.zx).toDouble, zy / (ig44.zy).toDouble, zz / (ig44.zz).toDouble, zw / (ig44.zw).toDouble, wx / (ig44.wx).toDouble, wy / (ig44.wy).toDouble, wz / (ig44.wz).toDouble, ww / (ig44.ww).toDouble)
    def /(lg44: GMat4L) = new IMat4D(xx / (lg44.xx).toDouble, xy / (lg44.xy).toDouble, xz / (lg44.xz).toDouble, xw / (lg44.xw).toDouble, yx / (lg44.yx).toDouble, yy / (lg44.yy).toDouble, yz / (lg44.yz).toDouble, yw / (lg44.yw).toDouble, zx / (lg44.zx).toDouble, zy / (lg44.zy).toDouble, zz / (lg44.zz).toDouble, zw / (lg44.zw).toDouble, wx / (lg44.wx).toDouble, wy / (lg44.wy).toDouble, wz / (lg44.wz).toDouble, ww / (lg44.ww).toDouble)
    def /(fg44: GMat4F) = new IMat4D(xx / (fg44.xx).toDouble, xy / (fg44.xy).toDouble, xz / (fg44.xz).toDouble, xw / (fg44.xw).toDouble, yx / (fg44.yx).toDouble, yy / (fg44.yy).toDouble, yz / (fg44.yz).toDouble, yw / (fg44.yw).toDouble, zx / (fg44.zx).toDouble, zy / (fg44.zy).toDouble, zz / (fg44.zz).toDouble, zw / (fg44.zw).toDouble, wx / (fg44.wx).toDouble, wy / (fg44.wy).toDouble, wz / (fg44.wz).toDouble, ww / (fg44.ww).toDouble)
    def /(dg44: GMat4D) = new IMat4D(xx / dg44.xx, xy / dg44.xy, xz / dg44.xz, xw / dg44.xw, yx / dg44.yx, yy / dg44.yy, yz / dg44.yz, yw / dg44.yw, zx / dg44.zx, zy / dg44.zy, zz / dg44.zz, zw / dg44.zw, wx / dg44.wx, wy / dg44.wy, wz / dg44.wz, ww / dg44.ww)
    def /(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double) = new IMat4D(xx / xx0, xy / xy0, xz / xz0, xw / xw0, yx / yx0, yy / yy0, yz / yz0, yw / yw0, zx / zx0, zy / zy0, zz / zz0, zw / zw0, wx / wx0, wy / wy0, wz / wz0, ww / ww0)
    def max(x0: Double) = new IMat4D(math.max(xx,x0), math.max(xy,x0), math.max(xz,x0), math.max(xw,x0), math.max(yx,x0), math.max(yy,x0), math.max(yz,x0), math.max(yw,x0), math.max(zx,x0), math.max(zy,x0), math.max(zz,x0), math.max(zw,x0), math.max(wx,x0), math.max(wy,x0), math.max(wz,x0), math.max(ww,x0))
    def max(sg44: GMat4S) = new IMat4D(math.max(xx,(sg44.xx).toDouble), math.max(xy,(sg44.xy).toDouble), math.max(xz,(sg44.xz).toDouble), math.max(xw,(sg44.xw).toDouble), math.max(yx,(sg44.yx).toDouble), math.max(yy,(sg44.yy).toDouble), math.max(yz,(sg44.yz).toDouble), math.max(yw,(sg44.yw).toDouble), math.max(zx,(sg44.zx).toDouble), math.max(zy,(sg44.zy).toDouble), math.max(zz,(sg44.zz).toDouble), math.max(zw,(sg44.zw).toDouble), math.max(wx,(sg44.wx).toDouble), math.max(wy,(sg44.wy).toDouble), math.max(wz,(sg44.wz).toDouble), math.max(ww,(sg44.ww).toDouble))
    def max(ig44: GMat4I) = new IMat4D(math.max(xx,(ig44.xx).toDouble), math.max(xy,(ig44.xy).toDouble), math.max(xz,(ig44.xz).toDouble), math.max(xw,(ig44.xw).toDouble), math.max(yx,(ig44.yx).toDouble), math.max(yy,(ig44.yy).toDouble), math.max(yz,(ig44.yz).toDouble), math.max(yw,(ig44.yw).toDouble), math.max(zx,(ig44.zx).toDouble), math.max(zy,(ig44.zy).toDouble), math.max(zz,(ig44.zz).toDouble), math.max(zw,(ig44.zw).toDouble), math.max(wx,(ig44.wx).toDouble), math.max(wy,(ig44.wy).toDouble), math.max(wz,(ig44.wz).toDouble), math.max(ww,(ig44.ww).toDouble))
    def max(lg44: GMat4L) = new IMat4D(math.max(xx,(lg44.xx).toDouble), math.max(xy,(lg44.xy).toDouble), math.max(xz,(lg44.xz).toDouble), math.max(xw,(lg44.xw).toDouble), math.max(yx,(lg44.yx).toDouble), math.max(yy,(lg44.yy).toDouble), math.max(yz,(lg44.yz).toDouble), math.max(yw,(lg44.yw).toDouble), math.max(zx,(lg44.zx).toDouble), math.max(zy,(lg44.zy).toDouble), math.max(zz,(lg44.zz).toDouble), math.max(zw,(lg44.zw).toDouble), math.max(wx,(lg44.wx).toDouble), math.max(wy,(lg44.wy).toDouble), math.max(wz,(lg44.wz).toDouble), math.max(ww,(lg44.ww).toDouble))
    def max(fg44: GMat4F) = new IMat4D(math.max(xx,(fg44.xx).toDouble), math.max(xy,(fg44.xy).toDouble), math.max(xz,(fg44.xz).toDouble), math.max(xw,(fg44.xw).toDouble), math.max(yx,(fg44.yx).toDouble), math.max(yy,(fg44.yy).toDouble), math.max(yz,(fg44.yz).toDouble), math.max(yw,(fg44.yw).toDouble), math.max(zx,(fg44.zx).toDouble), math.max(zy,(fg44.zy).toDouble), math.max(zz,(fg44.zz).toDouble), math.max(zw,(fg44.zw).toDouble), math.max(wx,(fg44.wx).toDouble), math.max(wy,(fg44.wy).toDouble), math.max(wz,(fg44.wz).toDouble), math.max(ww,(fg44.ww).toDouble))
    def max(dg44: GMat4D) = new IMat4D(math.max(xx,dg44.xx), math.max(xy,dg44.xy), math.max(xz,dg44.xz), math.max(xw,dg44.xw), math.max(yx,dg44.yx), math.max(yy,dg44.yy), math.max(yz,dg44.yz), math.max(yw,dg44.yw), math.max(zx,dg44.zx), math.max(zy,dg44.zy), math.max(zz,dg44.zz), math.max(zw,dg44.zw), math.max(wx,dg44.wx), math.max(wy,dg44.wy), math.max(wz,dg44.wz), math.max(ww,dg44.ww))
    def max(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double) = new IMat4D(math.max(xx,xx0), math.max(xy,xy0), math.max(xz,xz0), math.max(xw,xw0), math.max(yx,yx0), math.max(yy,yy0), math.max(yz,yz0), math.max(yw,yw0), math.max(zx,zx0), math.max(zy,zy0), math.max(zz,zz0), math.max(zw,zw0), math.max(wx,wx0), math.max(wy,wy0), math.max(wz,wz0), math.max(ww,ww0))
    def min(x0: Double) = new IMat4D(math.min(xx,x0), math.min(xy,x0), math.min(xz,x0), math.min(xw,x0), math.min(yx,x0), math.min(yy,x0), math.min(yz,x0), math.min(yw,x0), math.min(zx,x0), math.min(zy,x0), math.min(zz,x0), math.min(zw,x0), math.min(wx,x0), math.min(wy,x0), math.min(wz,x0), math.min(ww,x0))
    def min(sg44: GMat4S) = new IMat4D(math.min(xx,(sg44.xx).toDouble), math.min(xy,(sg44.xy).toDouble), math.min(xz,(sg44.xz).toDouble), math.min(xw,(sg44.xw).toDouble), math.min(yx,(sg44.yx).toDouble), math.min(yy,(sg44.yy).toDouble), math.min(yz,(sg44.yz).toDouble), math.min(yw,(sg44.yw).toDouble), math.min(zx,(sg44.zx).toDouble), math.min(zy,(sg44.zy).toDouble), math.min(zz,(sg44.zz).toDouble), math.min(zw,(sg44.zw).toDouble), math.min(wx,(sg44.wx).toDouble), math.min(wy,(sg44.wy).toDouble), math.min(wz,(sg44.wz).toDouble), math.min(ww,(sg44.ww).toDouble))
    def min(ig44: GMat4I) = new IMat4D(math.min(xx,(ig44.xx).toDouble), math.min(xy,(ig44.xy).toDouble), math.min(xz,(ig44.xz).toDouble), math.min(xw,(ig44.xw).toDouble), math.min(yx,(ig44.yx).toDouble), math.min(yy,(ig44.yy).toDouble), math.min(yz,(ig44.yz).toDouble), math.min(yw,(ig44.yw).toDouble), math.min(zx,(ig44.zx).toDouble), math.min(zy,(ig44.zy).toDouble), math.min(zz,(ig44.zz).toDouble), math.min(zw,(ig44.zw).toDouble), math.min(wx,(ig44.wx).toDouble), math.min(wy,(ig44.wy).toDouble), math.min(wz,(ig44.wz).toDouble), math.min(ww,(ig44.ww).toDouble))
    def min(lg44: GMat4L) = new IMat4D(math.min(xx,(lg44.xx).toDouble), math.min(xy,(lg44.xy).toDouble), math.min(xz,(lg44.xz).toDouble), math.min(xw,(lg44.xw).toDouble), math.min(yx,(lg44.yx).toDouble), math.min(yy,(lg44.yy).toDouble), math.min(yz,(lg44.yz).toDouble), math.min(yw,(lg44.yw).toDouble), math.min(zx,(lg44.zx).toDouble), math.min(zy,(lg44.zy).toDouble), math.min(zz,(lg44.zz).toDouble), math.min(zw,(lg44.zw).toDouble), math.min(wx,(lg44.wx).toDouble), math.min(wy,(lg44.wy).toDouble), math.min(wz,(lg44.wz).toDouble), math.min(ww,(lg44.ww).toDouble))
    def min(fg44: GMat4F) = new IMat4D(math.min(xx,(fg44.xx).toDouble), math.min(xy,(fg44.xy).toDouble), math.min(xz,(fg44.xz).toDouble), math.min(xw,(fg44.xw).toDouble), math.min(yx,(fg44.yx).toDouble), math.min(yy,(fg44.yy).toDouble), math.min(yz,(fg44.yz).toDouble), math.min(yw,(fg44.yw).toDouble), math.min(zx,(fg44.zx).toDouble), math.min(zy,(fg44.zy).toDouble), math.min(zz,(fg44.zz).toDouble), math.min(zw,(fg44.zw).toDouble), math.min(wx,(fg44.wx).toDouble), math.min(wy,(fg44.wy).toDouble), math.min(wz,(fg44.wz).toDouble), math.min(ww,(fg44.ww).toDouble))
    def min(dg44: GMat4D) = new IMat4D(math.min(xx,dg44.xx), math.min(xy,dg44.xy), math.min(xz,dg44.xz), math.min(xw,dg44.xw), math.min(yx,dg44.yx), math.min(yy,dg44.yy), math.min(yz,dg44.yz), math.min(yw,dg44.yw), math.min(zx,dg44.zx), math.min(zy,dg44.zy), math.min(zz,dg44.zz), math.min(zw,dg44.zw), math.min(wx,dg44.wx), math.min(wy,dg44.wy), math.min(wz,dg44.wz), math.min(ww,dg44.ww))
    def min(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double) = new IMat4D(math.min(xx,xx0), math.min(xy,xy0), math.min(xz,xz0), math.min(xw,xw0), math.min(yx,yx0), math.min(yy,yy0), math.min(yz,yz0), math.min(yw,yw0), math.min(zx,zx0), math.min(zy,zy0), math.min(zz,zz0), math.min(zw,zw0), math.min(wx,wx0), math.min(wy,wy0), math.min(wz,wz0), math.min(ww,ww0))
    def operate(sg44: GMat4S)(fun: (Double,Double)=>Double) = new IMat4D(fun(xx,(sg44.xx).toDouble), fun(xy,(sg44.xy).toDouble), fun(xz,(sg44.xz).toDouble), fun(xw,(sg44.xw).toDouble), fun(yx,(sg44.yx).toDouble), fun(yy,(sg44.yy).toDouble), fun(yz,(sg44.yz).toDouble), fun(yw,(sg44.yw).toDouble), fun(zx,(sg44.zx).toDouble), fun(zy,(sg44.zy).toDouble), fun(zz,(sg44.zz).toDouble), fun(zw,(sg44.zw).toDouble), fun(wx,(sg44.wx).toDouble), fun(wy,(sg44.wy).toDouble), fun(wz,(sg44.wz).toDouble), fun(ww,(sg44.ww).toDouble))
    def operate(ig44: GMat4I)(fun: (Double,Double)=>Double) = new IMat4D(fun(xx,(ig44.xx).toDouble), fun(xy,(ig44.xy).toDouble), fun(xz,(ig44.xz).toDouble), fun(xw,(ig44.xw).toDouble), fun(yx,(ig44.yx).toDouble), fun(yy,(ig44.yy).toDouble), fun(yz,(ig44.yz).toDouble), fun(yw,(ig44.yw).toDouble), fun(zx,(ig44.zx).toDouble), fun(zy,(ig44.zy).toDouble), fun(zz,(ig44.zz).toDouble), fun(zw,(ig44.zw).toDouble), fun(wx,(ig44.wx).toDouble), fun(wy,(ig44.wy).toDouble), fun(wz,(ig44.wz).toDouble), fun(ww,(ig44.ww).toDouble))
    def operate(lg44: GMat4L)(fun: (Double,Double)=>Double) = new IMat4D(fun(xx,(lg44.xx).toDouble), fun(xy,(lg44.xy).toDouble), fun(xz,(lg44.xz).toDouble), fun(xw,(lg44.xw).toDouble), fun(yx,(lg44.yx).toDouble), fun(yy,(lg44.yy).toDouble), fun(yz,(lg44.yz).toDouble), fun(yw,(lg44.yw).toDouble), fun(zx,(lg44.zx).toDouble), fun(zy,(lg44.zy).toDouble), fun(zz,(lg44.zz).toDouble), fun(zw,(lg44.zw).toDouble), fun(wx,(lg44.wx).toDouble), fun(wy,(lg44.wy).toDouble), fun(wz,(lg44.wz).toDouble), fun(ww,(lg44.ww).toDouble))
    def operate(fg44: GMat4F)(fun: (Double,Double)=>Double) = new IMat4D(fun(xx,(fg44.xx).toDouble), fun(xy,(fg44.xy).toDouble), fun(xz,(fg44.xz).toDouble), fun(xw,(fg44.xw).toDouble), fun(yx,(fg44.yx).toDouble), fun(yy,(fg44.yy).toDouble), fun(yz,(fg44.yz).toDouble), fun(yw,(fg44.yw).toDouble), fun(zx,(fg44.zx).toDouble), fun(zy,(fg44.zy).toDouble), fun(zz,(fg44.zz).toDouble), fun(zw,(fg44.zw).toDouble), fun(wx,(fg44.wx).toDouble), fun(wy,(fg44.wy).toDouble), fun(wz,(fg44.wz).toDouble), fun(ww,(fg44.ww).toDouble))
    def operate(dg44: GMat4D)(fun: (Double,Double)=>Double) = new IMat4D(fun(xx,dg44.xx), fun(xy,dg44.xy), fun(xz,dg44.xz), fun(xw,dg44.xw), fun(yx,dg44.yx), fun(yy,dg44.yy), fun(yz,dg44.yz), fun(yw,dg44.yw), fun(zx,dg44.zx), fun(zy,dg44.zy), fun(zz,dg44.zz), fun(zw,dg44.zw), fun(wx,dg44.wx), fun(wy,dg44.wy), fun(wz,dg44.wz), fun(ww,dg44.ww))
    def fold(zero: Int)(fun: (Int,Double)=>Int) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Long)(fun: (Long,Double)=>Long) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Float)(fun: (Float,Double)=>Float) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def fold(zero: Double)(fun: (Double,Double)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(zero,xx),xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def reduce(fun: (Double,Double)=>Double) = fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(fun(xx,xy),xz),xw),yx),yy),yz),yw),zx),zy),zz),zw),wx),wy),wz),ww)
    def ===(dg44: GMat4D) = xx==dg44.xx && xy==dg44.xy && xz==dg44.xz && xw==dg44.xw && yx==dg44.yx && yy==dg44.yy && yz==dg44.yz && yw==dg44.yw && zx==dg44.zx && zy==dg44.zy && zz==dg44.zz && zw==dg44.zw && wx==dg44.wx && wy==dg44.wy && wz==dg44.wz && ww==dg44.ww
    def ===(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double) = xx==xx0 && xy==xy0 && xz==xz0 && xw==xw0 && yx==yx0 && yy==yy0 && yz==yz0 && yw==yw0 && zx==zx0 && zy==zy0 && zz==zz0 && zw==zw0 && wx==wx0 && wy==wy0 && wz==wz0 && ww==ww0
    def approx(fg44: GMat4F, eps: Double) = ScalarD.close(xx,(fg44.xx).toDouble,eps) && ScalarD.close(xy,(fg44.xy).toDouble,eps) && ScalarD.close(xz,(fg44.xz).toDouble,eps) && ScalarD.close(xw,(fg44.xw).toDouble,eps) && ScalarD.close(yx,(fg44.yx).toDouble,eps) && ScalarD.close(yy,(fg44.yy).toDouble,eps) && ScalarD.close(yz,(fg44.yz).toDouble,eps) && ScalarD.close(yw,(fg44.yw).toDouble,eps) && ScalarD.close(zx,(fg44.zx).toDouble,eps) && ScalarD.close(zy,(fg44.zy).toDouble,eps) && ScalarD.close(zz,(fg44.zz).toDouble,eps) && ScalarD.close(zw,(fg44.zw).toDouble,eps) && ScalarD.close(wx,(fg44.wx).toDouble,eps) && ScalarD.close(wy,(fg44.wy).toDouble,eps) && ScalarD.close(wz,(fg44.wz).toDouble,eps) && ScalarD.close(ww,(fg44.ww).toDouble,eps)
    def approx(dg44: GMat4D, eps: Double) = ScalarD.close(xx,dg44.xx,eps) && ScalarD.close(xy,dg44.xy,eps) && ScalarD.close(xz,dg44.xz,eps) && ScalarD.close(xw,dg44.xw,eps) && ScalarD.close(yx,dg44.yx,eps) && ScalarD.close(yy,dg44.yy,eps) && ScalarD.close(yz,dg44.yz,eps) && ScalarD.close(yw,dg44.yw,eps) && ScalarD.close(zx,dg44.zx,eps) && ScalarD.close(zy,dg44.zy,eps) && ScalarD.close(zz,dg44.zz,eps) && ScalarD.close(zw,dg44.zw,eps) && ScalarD.close(wx,dg44.wx,eps) && ScalarD.close(wy,dg44.wy,eps) && ScalarD.close(wz,dg44.wz,eps) && ScalarD.close(ww,dg44.ww,eps)
    final def =~=(fg44: GMat4F) = approx(fg44, 1e-10)
    final def =~=(dg44: GMat4D) = approx(dg44, 1e-20)
    def approx(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double, eps: Double) = ScalarD.close(xx,xx0,eps) && ScalarD.close(xy,xy0,eps) && ScalarD.close(xz,xz0,eps) && ScalarD.close(xw,xw0,eps) && ScalarD.close(yx,yx0,eps) && ScalarD.close(yy,yy0,eps) && ScalarD.close(yz,yz0,eps) && ScalarD.close(yw,yw0,eps) && ScalarD.close(zx,zx0,eps) && ScalarD.close(zy,zy0,eps) && ScalarD.close(zz,zz0,eps) && ScalarD.close(zw,zw0,eps) && ScalarD.close(wx,wx0,eps) && ScalarD.close(wy,wy0,eps) && ScalarD.close(wz,wz0,eps) && ScalarD.close(ww,ww0,eps)
    def det = xx*(yy*(zz*ww - zw*wz) + yz*(zw*wy - zy*ww) + yw*(zy*wz - zz*wy)) + xy*(yz*(zw*wx - zx*ww) + yw*(zx*wz - zz*wx) + yx*(zz*ww - zw*wz)) + xz*(yw*(zx*wy - zy*wx) + yx*(zy*ww - zw*wy) + yy*(zw*wx - zx*ww)) + xw*(yx*(zy*wz - zz*wy) + yy*(zz*wx - zx*wz) + yz*(zx*wy - zy*wx))
    def trace = new IVec4D(xx, yy, zz, ww)
    def xRow = new IVec4D(xx, xy, xz, xw)
    def xCol = new IVec4D(xx, yx, zx, wx)
    def yRow = new IVec4D(yx, yy, yz, yw)
    def yCol = new IVec4D(xy, yy, zy, wy)
    def zRow = new IVec4D(zx, zy, zz, zw)
    def zCol = new IVec4D(xz, yz, zz, wz)
    def wRow = new IVec4D(wx, wy, wz, ww)
    def wCol = new IVec4D(xw, yw, zw, ww)
    def t = new IMat4D(xx, yx, zx, wx, xy, yy, zy, wy, xz, yz, zz, wz, xw, yw, zw, ww)
    def inv = mut.invEq.imm
    def **(sg4: GVec4S) = new IVec4D(xx*(sg4.x).toDouble+xy*(sg4.y).toDouble+xz*(sg4.z).toDouble+xw*(sg4.w).toDouble, yx*(sg4.x).toDouble+yy*(sg4.y).toDouble+yz*(sg4.z).toDouble+yw*(sg4.w).toDouble, zx*(sg4.x).toDouble+zy*(sg4.y).toDouble+zz*(sg4.z).toDouble+zw*(sg4.w).toDouble, wx*(sg4.x).toDouble+wy*(sg4.y).toDouble+wz*(sg4.z).toDouble+ww*(sg4.w).toDouble)
    def **(ig4: GVec4I) = new IVec4D(xx*(ig4.x).toDouble+xy*(ig4.y).toDouble+xz*(ig4.z).toDouble+xw*(ig4.w).toDouble, yx*(ig4.x).toDouble+yy*(ig4.y).toDouble+yz*(ig4.z).toDouble+yw*(ig4.w).toDouble, zx*(ig4.x).toDouble+zy*(ig4.y).toDouble+zz*(ig4.z).toDouble+zw*(ig4.w).toDouble, wx*(ig4.x).toDouble+wy*(ig4.y).toDouble+wz*(ig4.z).toDouble+ww*(ig4.w).toDouble)
    def **(lg4: GVec4L) = new IVec4D(xx*(lg4.x).toDouble+xy*(lg4.y).toDouble+xz*(lg4.z).toDouble+xw*(lg4.w).toDouble, yx*(lg4.x).toDouble+yy*(lg4.y).toDouble+yz*(lg4.z).toDouble+yw*(lg4.w).toDouble, zx*(lg4.x).toDouble+zy*(lg4.y).toDouble+zz*(lg4.z).toDouble+zw*(lg4.w).toDouble, wx*(lg4.x).toDouble+wy*(lg4.y).toDouble+wz*(lg4.z).toDouble+ww*(lg4.w).toDouble)
    def **(fg4: GVec4F) = new IVec4D(xx*(fg4.x).toDouble+xy*(fg4.y).toDouble+xz*(fg4.z).toDouble+xw*(fg4.w).toDouble, yx*(fg4.x).toDouble+yy*(fg4.y).toDouble+yz*(fg4.z).toDouble+yw*(fg4.w).toDouble, zx*(fg4.x).toDouble+zy*(fg4.y).toDouble+zz*(fg4.z).toDouble+zw*(fg4.w).toDouble, wx*(fg4.x).toDouble+wy*(fg4.y).toDouble+wz*(fg4.z).toDouble+ww*(fg4.w).toDouble)
    def **(dg4: GVec4D) = new IVec4D(xx*dg4.x+xy*dg4.y+xz*dg4.z+xw*dg4.w, yx*dg4.x+yy*dg4.y+yz*dg4.z+yw*dg4.w, zx*dg4.x+zy*dg4.y+zz*dg4.z+zw*dg4.w, wx*dg4.x+wy*dg4.y+wz*dg4.z+ww*dg4.w)
    def **(sg44: GMat4S) = new IMat4D(xx*(sg44.xx).toDouble+xy*(sg44.yx).toDouble+xz*(sg44.zx).toDouble+xw*(sg44.wx).toDouble, xx*(sg44.xy).toDouble+xy*(sg44.yy).toDouble+xz*(sg44.zy).toDouble+xw*(sg44.wy).toDouble, xx*(sg44.xz).toDouble+xy*(sg44.yz).toDouble+xz*(sg44.zz).toDouble+xw*(sg44.wz).toDouble, xx*(sg44.xw).toDouble+xy*(sg44.yw).toDouble+xz*(sg44.zw).toDouble+xw*(sg44.ww).toDouble, yx*(sg44.xx).toDouble+yy*(sg44.yx).toDouble+yz*(sg44.zx).toDouble+yw*(sg44.wx).toDouble, yx*(sg44.xy).toDouble+yy*(sg44.yy).toDouble+yz*(sg44.zy).toDouble+yw*(sg44.wy).toDouble, yx*(sg44.xz).toDouble+yy*(sg44.yz).toDouble+yz*(sg44.zz).toDouble+yw*(sg44.wz).toDouble, yx*(sg44.xw).toDouble+yy*(sg44.yw).toDouble+yz*(sg44.zw).toDouble+yw*(sg44.ww).toDouble, zx*(sg44.xx).toDouble+zy*(sg44.yx).toDouble+zz*(sg44.zx).toDouble+zw*(sg44.wx).toDouble, zx*(sg44.xy).toDouble+zy*(sg44.yy).toDouble+zz*(sg44.zy).toDouble+zw*(sg44.wy).toDouble, zx*(sg44.xz).toDouble+zy*(sg44.yz).toDouble+zz*(sg44.zz).toDouble+zw*(sg44.wz).toDouble, zx*(sg44.xw).toDouble+zy*(sg44.yw).toDouble+zz*(sg44.zw).toDouble+zw*(sg44.ww).toDouble, wx*(sg44.xx).toDouble+wy*(sg44.yx).toDouble+wz*(sg44.zx).toDouble+ww*(sg44.wx).toDouble, wx*(sg44.xy).toDouble+wy*(sg44.yy).toDouble+wz*(sg44.zy).toDouble+ww*(sg44.wy).toDouble, wx*(sg44.xz).toDouble+wy*(sg44.yz).toDouble+wz*(sg44.zz).toDouble+ww*(sg44.wz).toDouble, wx*(sg44.xw).toDouble+wy*(sg44.yw).toDouble+wz*(sg44.zw).toDouble+ww*(sg44.ww).toDouble)
    def **(ig44: GMat4I) = new IMat4D(xx*(ig44.xx).toDouble+xy*(ig44.yx).toDouble+xz*(ig44.zx).toDouble+xw*(ig44.wx).toDouble, xx*(ig44.xy).toDouble+xy*(ig44.yy).toDouble+xz*(ig44.zy).toDouble+xw*(ig44.wy).toDouble, xx*(ig44.xz).toDouble+xy*(ig44.yz).toDouble+xz*(ig44.zz).toDouble+xw*(ig44.wz).toDouble, xx*(ig44.xw).toDouble+xy*(ig44.yw).toDouble+xz*(ig44.zw).toDouble+xw*(ig44.ww).toDouble, yx*(ig44.xx).toDouble+yy*(ig44.yx).toDouble+yz*(ig44.zx).toDouble+yw*(ig44.wx).toDouble, yx*(ig44.xy).toDouble+yy*(ig44.yy).toDouble+yz*(ig44.zy).toDouble+yw*(ig44.wy).toDouble, yx*(ig44.xz).toDouble+yy*(ig44.yz).toDouble+yz*(ig44.zz).toDouble+yw*(ig44.wz).toDouble, yx*(ig44.xw).toDouble+yy*(ig44.yw).toDouble+yz*(ig44.zw).toDouble+yw*(ig44.ww).toDouble, zx*(ig44.xx).toDouble+zy*(ig44.yx).toDouble+zz*(ig44.zx).toDouble+zw*(ig44.wx).toDouble, zx*(ig44.xy).toDouble+zy*(ig44.yy).toDouble+zz*(ig44.zy).toDouble+zw*(ig44.wy).toDouble, zx*(ig44.xz).toDouble+zy*(ig44.yz).toDouble+zz*(ig44.zz).toDouble+zw*(ig44.wz).toDouble, zx*(ig44.xw).toDouble+zy*(ig44.yw).toDouble+zz*(ig44.zw).toDouble+zw*(ig44.ww).toDouble, wx*(ig44.xx).toDouble+wy*(ig44.yx).toDouble+wz*(ig44.zx).toDouble+ww*(ig44.wx).toDouble, wx*(ig44.xy).toDouble+wy*(ig44.yy).toDouble+wz*(ig44.zy).toDouble+ww*(ig44.wy).toDouble, wx*(ig44.xz).toDouble+wy*(ig44.yz).toDouble+wz*(ig44.zz).toDouble+ww*(ig44.wz).toDouble, wx*(ig44.xw).toDouble+wy*(ig44.yw).toDouble+wz*(ig44.zw).toDouble+ww*(ig44.ww).toDouble)
    def **(lg44: GMat4L) = new IMat4D(xx*(lg44.xx).toDouble+xy*(lg44.yx).toDouble+xz*(lg44.zx).toDouble+xw*(lg44.wx).toDouble, xx*(lg44.xy).toDouble+xy*(lg44.yy).toDouble+xz*(lg44.zy).toDouble+xw*(lg44.wy).toDouble, xx*(lg44.xz).toDouble+xy*(lg44.yz).toDouble+xz*(lg44.zz).toDouble+xw*(lg44.wz).toDouble, xx*(lg44.xw).toDouble+xy*(lg44.yw).toDouble+xz*(lg44.zw).toDouble+xw*(lg44.ww).toDouble, yx*(lg44.xx).toDouble+yy*(lg44.yx).toDouble+yz*(lg44.zx).toDouble+yw*(lg44.wx).toDouble, yx*(lg44.xy).toDouble+yy*(lg44.yy).toDouble+yz*(lg44.zy).toDouble+yw*(lg44.wy).toDouble, yx*(lg44.xz).toDouble+yy*(lg44.yz).toDouble+yz*(lg44.zz).toDouble+yw*(lg44.wz).toDouble, yx*(lg44.xw).toDouble+yy*(lg44.yw).toDouble+yz*(lg44.zw).toDouble+yw*(lg44.ww).toDouble, zx*(lg44.xx).toDouble+zy*(lg44.yx).toDouble+zz*(lg44.zx).toDouble+zw*(lg44.wx).toDouble, zx*(lg44.xy).toDouble+zy*(lg44.yy).toDouble+zz*(lg44.zy).toDouble+zw*(lg44.wy).toDouble, zx*(lg44.xz).toDouble+zy*(lg44.yz).toDouble+zz*(lg44.zz).toDouble+zw*(lg44.wz).toDouble, zx*(lg44.xw).toDouble+zy*(lg44.yw).toDouble+zz*(lg44.zw).toDouble+zw*(lg44.ww).toDouble, wx*(lg44.xx).toDouble+wy*(lg44.yx).toDouble+wz*(lg44.zx).toDouble+ww*(lg44.wx).toDouble, wx*(lg44.xy).toDouble+wy*(lg44.yy).toDouble+wz*(lg44.zy).toDouble+ww*(lg44.wy).toDouble, wx*(lg44.xz).toDouble+wy*(lg44.yz).toDouble+wz*(lg44.zz).toDouble+ww*(lg44.wz).toDouble, wx*(lg44.xw).toDouble+wy*(lg44.yw).toDouble+wz*(lg44.zw).toDouble+ww*(lg44.ww).toDouble)
    def **(fg44: GMat4F) = new IMat4D(xx*(fg44.xx).toDouble+xy*(fg44.yx).toDouble+xz*(fg44.zx).toDouble+xw*(fg44.wx).toDouble, xx*(fg44.xy).toDouble+xy*(fg44.yy).toDouble+xz*(fg44.zy).toDouble+xw*(fg44.wy).toDouble, xx*(fg44.xz).toDouble+xy*(fg44.yz).toDouble+xz*(fg44.zz).toDouble+xw*(fg44.wz).toDouble, xx*(fg44.xw).toDouble+xy*(fg44.yw).toDouble+xz*(fg44.zw).toDouble+xw*(fg44.ww).toDouble, yx*(fg44.xx).toDouble+yy*(fg44.yx).toDouble+yz*(fg44.zx).toDouble+yw*(fg44.wx).toDouble, yx*(fg44.xy).toDouble+yy*(fg44.yy).toDouble+yz*(fg44.zy).toDouble+yw*(fg44.wy).toDouble, yx*(fg44.xz).toDouble+yy*(fg44.yz).toDouble+yz*(fg44.zz).toDouble+yw*(fg44.wz).toDouble, yx*(fg44.xw).toDouble+yy*(fg44.yw).toDouble+yz*(fg44.zw).toDouble+yw*(fg44.ww).toDouble, zx*(fg44.xx).toDouble+zy*(fg44.yx).toDouble+zz*(fg44.zx).toDouble+zw*(fg44.wx).toDouble, zx*(fg44.xy).toDouble+zy*(fg44.yy).toDouble+zz*(fg44.zy).toDouble+zw*(fg44.wy).toDouble, zx*(fg44.xz).toDouble+zy*(fg44.yz).toDouble+zz*(fg44.zz).toDouble+zw*(fg44.wz).toDouble, zx*(fg44.xw).toDouble+zy*(fg44.yw).toDouble+zz*(fg44.zw).toDouble+zw*(fg44.ww).toDouble, wx*(fg44.xx).toDouble+wy*(fg44.yx).toDouble+wz*(fg44.zx).toDouble+ww*(fg44.wx).toDouble, wx*(fg44.xy).toDouble+wy*(fg44.yy).toDouble+wz*(fg44.zy).toDouble+ww*(fg44.wy).toDouble, wx*(fg44.xz).toDouble+wy*(fg44.yz).toDouble+wz*(fg44.zz).toDouble+ww*(fg44.wz).toDouble, wx*(fg44.xw).toDouble+wy*(fg44.yw).toDouble+wz*(fg44.zw).toDouble+ww*(fg44.ww).toDouble)
    def **(dg44: GMat4D) = new IMat4D(xx*dg44.xx+xy*dg44.yx+xz*dg44.zx+xw*dg44.wx, xx*dg44.xy+xy*dg44.yy+xz*dg44.zy+xw*dg44.wy, xx*dg44.xz+xy*dg44.yz+xz*dg44.zz+xw*dg44.wz, xx*dg44.xw+xy*dg44.yw+xz*dg44.zw+xw*dg44.ww, yx*dg44.xx+yy*dg44.yx+yz*dg44.zx+yw*dg44.wx, yx*dg44.xy+yy*dg44.yy+yz*dg44.zy+yw*dg44.wy, yx*dg44.xz+yy*dg44.yz+yz*dg44.zz+yw*dg44.wz, yx*dg44.xw+yy*dg44.yw+yz*dg44.zw+yw*dg44.ww, zx*dg44.xx+zy*dg44.yx+zz*dg44.zx+zw*dg44.wx, zx*dg44.xy+zy*dg44.yy+zz*dg44.zy+zw*dg44.wy, zx*dg44.xz+zy*dg44.yz+zz*dg44.zz+zw*dg44.wz, zx*dg44.xw+zy*dg44.yw+zz*dg44.zw+zw*dg44.ww, wx*dg44.xx+wy*dg44.yx+wz*dg44.zx+ww*dg44.wx, wx*dg44.xy+wy*dg44.yy+wz*dg44.zy+ww*dg44.wy, wx*dg44.xz+wy*dg44.yz+wz*dg44.zz+ww*dg44.wz, wx*dg44.xw+wy*dg44.yw+wz*dg44.zw+ww*dg44.ww)
  } // class GMat4D

  object GMat4D {
    def apply(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): GMat4D = new IMat4D(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): GMat4D = IMat4D.parse(str)
    val identity: GMat4D = IMat4D.identity
    val zero: GMat4D = IMat4D.zero
    def traced(dg4: GVec4D) = new IMat4D(dg4.x, 0, 0, 0, 0, dg4.y, 0, 0, 0, 0, dg4.z, 0, 0, 0, 0, dg4.w)
  } // object GMat4D


  final case class IMat4S(val xx: Short, val xy: Short, val xz: Short, val xw: Short, val yx: Short, val yy: Short, val yz: Short, val yw: Short, val zx: Short, val zy: Short, val zz: Short, val zw: Short, val wx: Short, val wy: Short, val wz: Short, val ww: Short) extends GMat4S {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat4S = new IMat4S(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, xw0: Short = xw, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, yw0: Short = yw, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz, zw0: Short = zw, wx0: Short = wx, wy0: Short = wy, wz0: Short = wz, ww0: Short = ww): IMat4S = new IMat4S(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: IMat3S = new IMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mat = this
    override def imm = this
    override def toI: IMat4I = new IMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def toL: IMat4L = new IMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: IMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: IMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class IMat4S

  object IMat4S {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat4S = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toShort); new IMat4S(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15)) }
    val identity = new IMat4S(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    val zero = new IMat4S(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(sg4: GVec4S) = new IMat4S(sg4.x, 0, 0, 0, 0, sg4.y, 0, 0, 0, 0, sg4.z, 0, 0, 0, 0, sg4.w)
  } // object IMat4S


  final case class IMat4I(val xx: Int, val xy: Int, val xz: Int, val xw: Int, val yx: Int, val yy: Int, val yz: Int, val yw: Int, val zx: Int, val zy: Int, val zz: Int, val zw: Int, val wx: Int, val wy: Int, val wz: Int, val ww: Int) extends GMat4I {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat4I = new IMat4I(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: IMat4S = new IMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, xw0: Int = xw, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, yw0: Int = yw, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz, zw0: Int = zw, wx0: Int = wx, wy0: Int = wy, wz0: Int = wz, ww0: Int = ww): IMat4I = new IMat4I(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: IMat3I = new IMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mat = this
    override def imm = this
    override def toL: IMat4L = new IMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: IMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: IMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class IMat4I

  object IMat4I {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat4I = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toInt); new IMat4I(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15)) }
    val identity = new IMat4I(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    val zero = new IMat4I(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(ig4: GVec4I) = new IMat4I(ig4.x, 0, 0, 0, 0, ig4.y, 0, 0, 0, 0, ig4.z, 0, 0, 0, 0, ig4.w)
  } // object IMat4I


  final case class IMat4L(val xx: Long, val xy: Long, val xz: Long, val xw: Long, val yx: Long, val yy: Long, val yz: Long, val yw: Long, val zx: Long, val zy: Long, val zz: Long, val zw: Long, val wx: Long, val wy: Long, val wz: Long, val ww: Long) extends GMat4L {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat4L = new IMat4L(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: IMat4S = new IMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def toI: IMat4I = new IMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, xw0: Long = xw, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, yw0: Long = yw, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz, zw0: Long = zw, wx0: Long = wx, wy0: Long = wy, wz0: Long = wz, ww0: Long = ww): IMat4L = new IMat4L(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: IMat3L = new IMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mat = this
    override def imm = this
    override def toF: IMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: IMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class IMat4L

  object IMat4L {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat4L = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toLong); new IMat4L(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15)) }
    val identity = new IMat4L(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    val zero = new IMat4L(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(lg4: GVec4L) = new IMat4L(lg4.x, 0, 0, 0, 0, lg4.y, 0, 0, 0, 0, lg4.z, 0, 0, 0, 0, lg4.w)
  } // object IMat4L


  final case class IMat4F(val xx: Float, val xy: Float, val xz: Float, val xw: Float, val yx: Float, val yy: Float, val yz: Float, val yw: Float, val zx: Float, val zy: Float, val zz: Float, val zw: Float, val wx: Float, val wy: Float, val wz: Float, val ww: Float) extends GMat4F {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat4F = new IMat4F(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: IMat4S = new IMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: IMat4I = new IMat4I(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toL: IMat4L = new IMat4L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((xw).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((yw).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble), math.round((zw).toDouble), math.round((wx).toDouble), math.round((wy).toDouble), math.round((wz).toDouble), math.round((ww).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, xw0: Float = xw, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, yw0: Float = yw, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz, zw0: Float = zw, wx0: Float = wx, wy0: Float = wy, wz0: Float = wz, ww0: Float = ww): IMat4F = new IMat4F(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: IMat3F = new IMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mat = this
    override def imm = this
    override def toD: IMat4D = new IMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class IMat4F

  object IMat4F {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat4F = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toFloat); new IMat4F(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15)) }
    val identity = new IMat4F(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    val zero = new IMat4F(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(fg4: GVec4F) = new IMat4F(fg4.x, 0, 0, 0, 0, fg4.y, 0, 0, 0, 0, fg4.z, 0, 0, 0, 0, fg4.w)
  } // object IMat4F


  final case class IMat4D(val xx: Double, val xy: Double, val xz: Double, val xw: Double, val yx: Double, val yy: Double, val yz: Double, val yw: Double, val zx: Double, val zy: Double, val zz: Double, val zw: Double, val wx: Double, val wy: Double, val wz: Double, val ww: Double) extends GMat4D {
    override def hashCode = super.hashCode
    override def equals(any: Any) = super.equals(any)
    override def clone(): IMat4D = new IMat4D(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: IMat4S = new IMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: IMat4I = new IMat4I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(xw)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(yw)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt, (math.round(zw)).toInt, (math.round(wx)).toInt, (math.round(wy)).toInt, (math.round(wz)).toInt, (math.round(ww)).toInt)
    override def toL: IMat4L = new IMat4L(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toF: IMat4F = new IMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, xw0: Double = xw, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, yw0: Double = yw, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz, zw0: Double = zw, wx0: Double = wx, wy0: Double = wy, wz0: Double = wz, ww0: Double = ww): IMat4D = new IMat4D(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: IMat3D = new IMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mat = this
    override def imm = this
  } // class IMat4D

  object IMat4D {
    val pattern = """\[([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*;\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\s*,\s*([0-9eE+.-]+)\]""".r
    def parse(str: String): IMat4D = { val p = pattern.unapplySeq(str).getOrElse(throw new NumberFormatException).toArray.map(_.toDouble); new IMat4D(p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15)) }
    val identity = new IMat4D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    val zero = new IMat4D(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(dg4: GVec4D) = new IMat4D(dg4.x, 0, 0, 0, 0, dg4.y, 0, 0, 0, 0, dg4.z, 0, 0, 0, 0, dg4.w)
  } // object IMat4D


  abstract class AMat4S extends GMat4S {
    def xx_=(xx0: Short): Unit
    def xy_=(xy0: Short): Unit
    def xz_=(xz0: Short): Unit
    def xw_=(xw0: Short): Unit
    def yx_=(yx0: Short): Unit
    def yy_=(yy0: Short): Unit
    def yz_=(yz0: Short): Unit
    def yw_=(yw0: Short): Unit
    def zx_=(zx0: Short): Unit
    def zy_=(zy0: Short): Unit
    def zz_=(zz0: Short): Unit
    def zw_=(zw0: Short): Unit
    def wx_=(wx0: Short): Unit
    def wy_=(wy0: Short): Unit
    def wz_=(wz0: Short): Unit
    def ww_=(ww0: Short): Unit
    override def clone(): AMat4S = new MMat4S(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, xw0: Short = xw, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, yw0: Short = yw, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz, zw0: Short = zw, wx0: Short = wx, wy0: Short = wy, wz0: Short = wz, ww0: Short = ww): AMat4S = new MMat4S(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: AMat3S = new MMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toI: AMat4I = new MMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def toL: AMat4L = new MMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: AMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: AMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def negEq: this.type = { xx = (-xx).toShort; xy = (-xy).toShort; xz = (-xz).toShort; xw = (-xw).toShort; yx = (-yx).toShort; yy = (-yy).toShort; yz = (-yz).toShort; yw = (-yw).toShort; zx = (-zx).toShort; zy = (-zy).toShort; zz = (-zz).toShort; zw = (-zw).toShort; wx = (-wx).toShort; wy = (-wy).toShort; wz = (-wz).toShort; ww = (-ww).toShort; this }
    def :~(x0: Short): this.type = { xx = x0; xy = x0; xz = x0; xw = x0; yx = x0; yy = x0; yz = x0; yw = x0; zx = x0; zy = x0; zz = x0; zw = x0; wx = x0; wy = x0; wz = x0; ww = x0; this }
    def :~~(x0: Int): this.type = { xx = (x0).toShort; xy = (x0).toShort; xz = (x0).toShort; xw = (x0).toShort; yx = (x0).toShort; yy = (x0).toShort; yz = (x0).toShort; yw = (x0).toShort; zx = (x0).toShort; zy = (x0).toShort; zz = (x0).toShort; zw = (x0).toShort; wx = (x0).toShort; wy = (x0).toShort; wz = (x0).toShort; ww = (x0).toShort; this }
    def :~~(x0: Long): this.type = { xx = (x0).toShort; xy = (x0).toShort; xz = (x0).toShort; xw = (x0).toShort; yx = (x0).toShort; yy = (x0).toShort; yz = (x0).toShort; yw = (x0).toShort; zx = (x0).toShort; zy = (x0).toShort; zz = (x0).toShort; zw = (x0).toShort; wx = (x0).toShort; wy = (x0).toShort; wz = (x0).toShort; ww = (x0).toShort; this }
    def :~~(x0: Float): this.type = { xx = (math.round(x0)).toShort; xy = (math.round(x0)).toShort; xz = (math.round(x0)).toShort; xw = (math.round(x0)).toShort; yx = (math.round(x0)).toShort; yy = (math.round(x0)).toShort; yz = (math.round(x0)).toShort; yw = (math.round(x0)).toShort; zx = (math.round(x0)).toShort; zy = (math.round(x0)).toShort; zz = (math.round(x0)).toShort; zw = (math.round(x0)).toShort; wx = (math.round(x0)).toShort; wy = (math.round(x0)).toShort; wz = (math.round(x0)).toShort; ww = (math.round(x0)).toShort; this }
    def :~~(x0: Double): this.type = { xx = (math.round(x0)).toShort; xy = (math.round(x0)).toShort; xz = (math.round(x0)).toShort; xw = (math.round(x0)).toShort; yx = (math.round(x0)).toShort; yy = (math.round(x0)).toShort; yz = (math.round(x0)).toShort; yw = (math.round(x0)).toShort; zx = (math.round(x0)).toShort; zy = (math.round(x0)).toShort; zz = (math.round(x0)).toShort; zw = (math.round(x0)).toShort; wx = (math.round(x0)).toShort; wy = (math.round(x0)).toShort; wz = (math.round(x0)).toShort; ww = (math.round(x0)).toShort; this }
    def :~(sg44: GMat4S): this.type = { xx = sg44.xx; xy = sg44.xy; xz = sg44.xz; xw = sg44.xw; yx = sg44.yx; yy = sg44.yy; yz = sg44.yz; yw = sg44.yw; zx = sg44.zx; zy = sg44.zy; zz = sg44.zz; zw = sg44.zw; wx = sg44.wx; wy = sg44.wy; wz = sg44.wz; ww = sg44.ww; this }
    def :~(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): this.type = { xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def :~~(ig44: GMat4I): this.type = { xx = (ig44.xx).toShort; xy = (ig44.xy).toShort; xz = (ig44.xz).toShort; xw = (ig44.xw).toShort; yx = (ig44.yx).toShort; yy = (ig44.yy).toShort; yz = (ig44.yz).toShort; yw = (ig44.yw).toShort; zx = (ig44.zx).toShort; zy = (ig44.zy).toShort; zz = (ig44.zz).toShort; zw = (ig44.zw).toShort; wx = (ig44.wx).toShort; wy = (ig44.wy).toShort; wz = (ig44.wz).toShort; ww = (ig44.ww).toShort; this }
    def :~~(lg44: GMat4L): this.type = { xx = (lg44.xx).toShort; xy = (lg44.xy).toShort; xz = (lg44.xz).toShort; xw = (lg44.xw).toShort; yx = (lg44.yx).toShort; yy = (lg44.yy).toShort; yz = (lg44.yz).toShort; yw = (lg44.yw).toShort; zx = (lg44.zx).toShort; zy = (lg44.zy).toShort; zz = (lg44.zz).toShort; zw = (lg44.zw).toShort; wx = (lg44.wx).toShort; wy = (lg44.wy).toShort; wz = (lg44.wz).toShort; ww = (lg44.ww).toShort; this }
    def :~~(fg44: GMat4F): this.type = { xx = (math.round(fg44.xx)).toShort; xy = (math.round(fg44.xy)).toShort; xz = (math.round(fg44.xz)).toShort; xw = (math.round(fg44.xw)).toShort; yx = (math.round(fg44.yx)).toShort; yy = (math.round(fg44.yy)).toShort; yz = (math.round(fg44.yz)).toShort; yw = (math.round(fg44.yw)).toShort; zx = (math.round(fg44.zx)).toShort; zy = (math.round(fg44.zy)).toShort; zz = (math.round(fg44.zz)).toShort; zw = (math.round(fg44.zw)).toShort; wx = (math.round(fg44.wx)).toShort; wy = (math.round(fg44.wy)).toShort; wz = (math.round(fg44.wz)).toShort; ww = (math.round(fg44.ww)).toShort; this }
    def :~~(dg44: GMat4D): this.type = { xx = (math.round(dg44.xx)).toShort; xy = (math.round(dg44.xy)).toShort; xz = (math.round(dg44.xz)).toShort; xw = (math.round(dg44.xw)).toShort; yx = (math.round(dg44.yx)).toShort; yy = (math.round(dg44.yy)).toShort; yz = (math.round(dg44.yz)).toShort; yw = (math.round(dg44.yw)).toShort; zx = (math.round(dg44.zx)).toShort; zy = (math.round(dg44.zy)).toShort; zz = (math.round(dg44.zz)).toShort; zw = (math.round(dg44.zw)).toShort; wx = (math.round(dg44.wx)).toShort; wy = (math.round(dg44.wy)).toShort; wz = (math.round(dg44.wz)).toShort; ww = (math.round(dg44.ww)).toShort; this }
    def +~(x0: Short): this.type = { xx = (xx + x0).toShort; xy = (xy + x0).toShort; xz = (xz + x0).toShort; xw = (xw + x0).toShort; yx = (yx + x0).toShort; yy = (yy + x0).toShort; yz = (yz + x0).toShort; yw = (yw + x0).toShort; zx = (zx + x0).toShort; zy = (zy + x0).toShort; zz = (zz + x0).toShort; zw = (zw + x0).toShort; wx = (wx + x0).toShort; wy = (wy + x0).toShort; wz = (wz + x0).toShort; ww = (ww + x0).toShort; this }
    def +~~(x0: Int): this.type = { xx = ((xx).toInt + x0).toShort; xy = ((xy).toInt + x0).toShort; xz = ((xz).toInt + x0).toShort; xw = ((xw).toInt + x0).toShort; yx = ((yx).toInt + x0).toShort; yy = ((yy).toInt + x0).toShort; yz = ((yz).toInt + x0).toShort; yw = ((yw).toInt + x0).toShort; zx = ((zx).toInt + x0).toShort; zy = ((zy).toInt + x0).toShort; zz = ((zz).toInt + x0).toShort; zw = ((zw).toInt + x0).toShort; wx = ((wx).toInt + x0).toShort; wy = ((wy).toInt + x0).toShort; wz = ((wz).toInt + x0).toShort; ww = ((ww).toInt + x0).toShort; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toLong + x0).toShort; xy = ((xy).toLong + x0).toShort; xz = ((xz).toLong + x0).toShort; xw = ((xw).toLong + x0).toShort; yx = ((yx).toLong + x0).toShort; yy = ((yy).toLong + x0).toShort; yz = ((yz).toLong + x0).toShort; yw = ((yw).toLong + x0).toShort; zx = ((zx).toLong + x0).toShort; zy = ((zy).toLong + x0).toShort; zz = ((zz).toLong + x0).toShort; zw = ((zw).toLong + x0).toShort; wx = ((wx).toLong + x0).toShort; wy = ((wy).toLong + x0).toShort; wz = ((wz).toLong + x0).toShort; ww = ((ww).toLong + x0).toShort; this }
    def +~~(x0: Float): this.type = { xx = (math.round((xx).toFloat + x0)).toShort; xy = (math.round((xy).toFloat + x0)).toShort; xz = (math.round((xz).toFloat + x0)).toShort; xw = (math.round((xw).toFloat + x0)).toShort; yx = (math.round((yx).toFloat + x0)).toShort; yy = (math.round((yy).toFloat + x0)).toShort; yz = (math.round((yz).toFloat + x0)).toShort; yw = (math.round((yw).toFloat + x0)).toShort; zx = (math.round((zx).toFloat + x0)).toShort; zy = (math.round((zy).toFloat + x0)).toShort; zz = (math.round((zz).toFloat + x0)).toShort; zw = (math.round((zw).toFloat + x0)).toShort; wx = (math.round((wx).toFloat + x0)).toShort; wy = (math.round((wy).toFloat + x0)).toShort; wz = (math.round((wz).toFloat + x0)).toShort; ww = (math.round((ww).toFloat + x0)).toShort; this }
    def +~~(x0: Double): this.type = { xx = (math.round((xx).toDouble + x0)).toShort; xy = (math.round((xy).toDouble + x0)).toShort; xz = (math.round((xz).toDouble + x0)).toShort; xw = (math.round((xw).toDouble + x0)).toShort; yx = (math.round((yx).toDouble + x0)).toShort; yy = (math.round((yy).toDouble + x0)).toShort; yz = (math.round((yz).toDouble + x0)).toShort; yw = (math.round((yw).toDouble + x0)).toShort; zx = (math.round((zx).toDouble + x0)).toShort; zy = (math.round((zy).toDouble + x0)).toShort; zz = (math.round((zz).toDouble + x0)).toShort; zw = (math.round((zw).toDouble + x0)).toShort; wx = (math.round((wx).toDouble + x0)).toShort; wy = (math.round((wy).toDouble + x0)).toShort; wz = (math.round((wz).toDouble + x0)).toShort; ww = (math.round((ww).toDouble + x0)).toShort; this }
    def +~(sg44: GMat4S): this.type = { xx = (xx + sg44.xx).toShort; xy = (xy + sg44.xy).toShort; xz = (xz + sg44.xz).toShort; xw = (xw + sg44.xw).toShort; yx = (yx + sg44.yx).toShort; yy = (yy + sg44.yy).toShort; yz = (yz + sg44.yz).toShort; yw = (yw + sg44.yw).toShort; zx = (zx + sg44.zx).toShort; zy = (zy + sg44.zy).toShort; zz = (zz + sg44.zz).toShort; zw = (zw + sg44.zw).toShort; wx = (wx + sg44.wx).toShort; wy = (wy + sg44.wy).toShort; wz = (wz + sg44.wz).toShort; ww = (ww + sg44.ww).toShort; this }
    def +~(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): this.type = { xx = (xx + xx0).toShort; xy = (xy + xy0).toShort; xz = (xz + xz0).toShort; xw = (xw + xw0).toShort; yx = (yx + yx0).toShort; yy = (yy + yy0).toShort; yz = (yz + yz0).toShort; yw = (yw + yw0).toShort; zx = (zx + zx0).toShort; zy = (zy + zy0).toShort; zz = (zz + zz0).toShort; zw = (zw + zw0).toShort; wx = (wx + wx0).toShort; wy = (wy + wy0).toShort; wz = (wz + wz0).toShort; ww = (ww + ww0).toShort; this }
    def +~~(ig44: GMat4I): this.type = { xx = ((xx).toInt + ig44.xx).toShort; xy = ((xy).toInt + ig44.xy).toShort; xz = ((xz).toInt + ig44.xz).toShort; xw = ((xw).toInt + ig44.xw).toShort; yx = ((yx).toInt + ig44.yx).toShort; yy = ((yy).toInt + ig44.yy).toShort; yz = ((yz).toInt + ig44.yz).toShort; yw = ((yw).toInt + ig44.yw).toShort; zx = ((zx).toInt + ig44.zx).toShort; zy = ((zy).toInt + ig44.zy).toShort; zz = ((zz).toInt + ig44.zz).toShort; zw = ((zw).toInt + ig44.zw).toShort; wx = ((wx).toInt + ig44.wx).toShort; wy = ((wy).toInt + ig44.wy).toShort; wz = ((wz).toInt + ig44.wz).toShort; ww = ((ww).toInt + ig44.ww).toShort; this }
    def +~~(lg44: GMat4L): this.type = { xx = ((xx).toLong + lg44.xx).toShort; xy = ((xy).toLong + lg44.xy).toShort; xz = ((xz).toLong + lg44.xz).toShort; xw = ((xw).toLong + lg44.xw).toShort; yx = ((yx).toLong + lg44.yx).toShort; yy = ((yy).toLong + lg44.yy).toShort; yz = ((yz).toLong + lg44.yz).toShort; yw = ((yw).toLong + lg44.yw).toShort; zx = ((zx).toLong + lg44.zx).toShort; zy = ((zy).toLong + lg44.zy).toShort; zz = ((zz).toLong + lg44.zz).toShort; zw = ((zw).toLong + lg44.zw).toShort; wx = ((wx).toLong + lg44.wx).toShort; wy = ((wy).toLong + lg44.wy).toShort; wz = ((wz).toLong + lg44.wz).toShort; ww = ((ww).toLong + lg44.ww).toShort; this }
    def +~~(fg44: GMat4F): this.type = { xx = (math.round((xx).toFloat + fg44.xx)).toShort; xy = (math.round((xy).toFloat + fg44.xy)).toShort; xz = (math.round((xz).toFloat + fg44.xz)).toShort; xw = (math.round((xw).toFloat + fg44.xw)).toShort; yx = (math.round((yx).toFloat + fg44.yx)).toShort; yy = (math.round((yy).toFloat + fg44.yy)).toShort; yz = (math.round((yz).toFloat + fg44.yz)).toShort; yw = (math.round((yw).toFloat + fg44.yw)).toShort; zx = (math.round((zx).toFloat + fg44.zx)).toShort; zy = (math.round((zy).toFloat + fg44.zy)).toShort; zz = (math.round((zz).toFloat + fg44.zz)).toShort; zw = (math.round((zw).toFloat + fg44.zw)).toShort; wx = (math.round((wx).toFloat + fg44.wx)).toShort; wy = (math.round((wy).toFloat + fg44.wy)).toShort; wz = (math.round((wz).toFloat + fg44.wz)).toShort; ww = (math.round((ww).toFloat + fg44.ww)).toShort; this }
    def +~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble + dg44.xx)).toShort; xy = (math.round((xy).toDouble + dg44.xy)).toShort; xz = (math.round((xz).toDouble + dg44.xz)).toShort; xw = (math.round((xw).toDouble + dg44.xw)).toShort; yx = (math.round((yx).toDouble + dg44.yx)).toShort; yy = (math.round((yy).toDouble + dg44.yy)).toShort; yz = (math.round((yz).toDouble + dg44.yz)).toShort; yw = (math.round((yw).toDouble + dg44.yw)).toShort; zx = (math.round((zx).toDouble + dg44.zx)).toShort; zy = (math.round((zy).toDouble + dg44.zy)).toShort; zz = (math.round((zz).toDouble + dg44.zz)).toShort; zw = (math.round((zw).toDouble + dg44.zw)).toShort; wx = (math.round((wx).toDouble + dg44.wx)).toShort; wy = (math.round((wy).toDouble + dg44.wy)).toShort; wz = (math.round((wz).toDouble + dg44.wz)).toShort; ww = (math.round((ww).toDouble + dg44.ww)).toShort; this }
    def -~(x0: Short): this.type = { xx = (xx - x0).toShort; xy = (xy - x0).toShort; xz = (xz - x0).toShort; xw = (xw - x0).toShort; yx = (yx - x0).toShort; yy = (yy - x0).toShort; yz = (yz - x0).toShort; yw = (yw - x0).toShort; zx = (zx - x0).toShort; zy = (zy - x0).toShort; zz = (zz - x0).toShort; zw = (zw - x0).toShort; wx = (wx - x0).toShort; wy = (wy - x0).toShort; wz = (wz - x0).toShort; ww = (ww - x0).toShort; this }
    def -~~(x0: Int): this.type = { xx = ((xx).toInt - x0).toShort; xy = ((xy).toInt - x0).toShort; xz = ((xz).toInt - x0).toShort; xw = ((xw).toInt - x0).toShort; yx = ((yx).toInt - x0).toShort; yy = ((yy).toInt - x0).toShort; yz = ((yz).toInt - x0).toShort; yw = ((yw).toInt - x0).toShort; zx = ((zx).toInt - x0).toShort; zy = ((zy).toInt - x0).toShort; zz = ((zz).toInt - x0).toShort; zw = ((zw).toInt - x0).toShort; wx = ((wx).toInt - x0).toShort; wy = ((wy).toInt - x0).toShort; wz = ((wz).toInt - x0).toShort; ww = ((ww).toInt - x0).toShort; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toLong - x0).toShort; xy = ((xy).toLong - x0).toShort; xz = ((xz).toLong - x0).toShort; xw = ((xw).toLong - x0).toShort; yx = ((yx).toLong - x0).toShort; yy = ((yy).toLong - x0).toShort; yz = ((yz).toLong - x0).toShort; yw = ((yw).toLong - x0).toShort; zx = ((zx).toLong - x0).toShort; zy = ((zy).toLong - x0).toShort; zz = ((zz).toLong - x0).toShort; zw = ((zw).toLong - x0).toShort; wx = ((wx).toLong - x0).toShort; wy = ((wy).toLong - x0).toShort; wz = ((wz).toLong - x0).toShort; ww = ((ww).toLong - x0).toShort; this }
    def -~~(x0: Float): this.type = { xx = (math.round((xx).toFloat - x0)).toShort; xy = (math.round((xy).toFloat - x0)).toShort; xz = (math.round((xz).toFloat - x0)).toShort; xw = (math.round((xw).toFloat - x0)).toShort; yx = (math.round((yx).toFloat - x0)).toShort; yy = (math.round((yy).toFloat - x0)).toShort; yz = (math.round((yz).toFloat - x0)).toShort; yw = (math.round((yw).toFloat - x0)).toShort; zx = (math.round((zx).toFloat - x0)).toShort; zy = (math.round((zy).toFloat - x0)).toShort; zz = (math.round((zz).toFloat - x0)).toShort; zw = (math.round((zw).toFloat - x0)).toShort; wx = (math.round((wx).toFloat - x0)).toShort; wy = (math.round((wy).toFloat - x0)).toShort; wz = (math.round((wz).toFloat - x0)).toShort; ww = (math.round((ww).toFloat - x0)).toShort; this }
    def -~~(x0: Double): this.type = { xx = (math.round((xx).toDouble - x0)).toShort; xy = (math.round((xy).toDouble - x0)).toShort; xz = (math.round((xz).toDouble - x0)).toShort; xw = (math.round((xw).toDouble - x0)).toShort; yx = (math.round((yx).toDouble - x0)).toShort; yy = (math.round((yy).toDouble - x0)).toShort; yz = (math.round((yz).toDouble - x0)).toShort; yw = (math.round((yw).toDouble - x0)).toShort; zx = (math.round((zx).toDouble - x0)).toShort; zy = (math.round((zy).toDouble - x0)).toShort; zz = (math.round((zz).toDouble - x0)).toShort; zw = (math.round((zw).toDouble - x0)).toShort; wx = (math.round((wx).toDouble - x0)).toShort; wy = (math.round((wy).toDouble - x0)).toShort; wz = (math.round((wz).toDouble - x0)).toShort; ww = (math.round((ww).toDouble - x0)).toShort; this }
    def -~(sg44: GMat4S): this.type = { xx = (xx - sg44.xx).toShort; xy = (xy - sg44.xy).toShort; xz = (xz - sg44.xz).toShort; xw = (xw - sg44.xw).toShort; yx = (yx - sg44.yx).toShort; yy = (yy - sg44.yy).toShort; yz = (yz - sg44.yz).toShort; yw = (yw - sg44.yw).toShort; zx = (zx - sg44.zx).toShort; zy = (zy - sg44.zy).toShort; zz = (zz - sg44.zz).toShort; zw = (zw - sg44.zw).toShort; wx = (wx - sg44.wx).toShort; wy = (wy - sg44.wy).toShort; wz = (wz - sg44.wz).toShort; ww = (ww - sg44.ww).toShort; this }
    def -~(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): this.type = { xx = (xx - xx0).toShort; xy = (xy - xy0).toShort; xz = (xz - xz0).toShort; xw = (xw - xw0).toShort; yx = (yx - yx0).toShort; yy = (yy - yy0).toShort; yz = (yz - yz0).toShort; yw = (yw - yw0).toShort; zx = (zx - zx0).toShort; zy = (zy - zy0).toShort; zz = (zz - zz0).toShort; zw = (zw - zw0).toShort; wx = (wx - wx0).toShort; wy = (wy - wy0).toShort; wz = (wz - wz0).toShort; ww = (ww - ww0).toShort; this }
    def -~~(ig44: GMat4I): this.type = { xx = ((xx).toInt - ig44.xx).toShort; xy = ((xy).toInt - ig44.xy).toShort; xz = ((xz).toInt - ig44.xz).toShort; xw = ((xw).toInt - ig44.xw).toShort; yx = ((yx).toInt - ig44.yx).toShort; yy = ((yy).toInt - ig44.yy).toShort; yz = ((yz).toInt - ig44.yz).toShort; yw = ((yw).toInt - ig44.yw).toShort; zx = ((zx).toInt - ig44.zx).toShort; zy = ((zy).toInt - ig44.zy).toShort; zz = ((zz).toInt - ig44.zz).toShort; zw = ((zw).toInt - ig44.zw).toShort; wx = ((wx).toInt - ig44.wx).toShort; wy = ((wy).toInt - ig44.wy).toShort; wz = ((wz).toInt - ig44.wz).toShort; ww = ((ww).toInt - ig44.ww).toShort; this }
    def -~~(lg44: GMat4L): this.type = { xx = ((xx).toLong - lg44.xx).toShort; xy = ((xy).toLong - lg44.xy).toShort; xz = ((xz).toLong - lg44.xz).toShort; xw = ((xw).toLong - lg44.xw).toShort; yx = ((yx).toLong - lg44.yx).toShort; yy = ((yy).toLong - lg44.yy).toShort; yz = ((yz).toLong - lg44.yz).toShort; yw = ((yw).toLong - lg44.yw).toShort; zx = ((zx).toLong - lg44.zx).toShort; zy = ((zy).toLong - lg44.zy).toShort; zz = ((zz).toLong - lg44.zz).toShort; zw = ((zw).toLong - lg44.zw).toShort; wx = ((wx).toLong - lg44.wx).toShort; wy = ((wy).toLong - lg44.wy).toShort; wz = ((wz).toLong - lg44.wz).toShort; ww = ((ww).toLong - lg44.ww).toShort; this }
    def -~~(fg44: GMat4F): this.type = { xx = (math.round((xx).toFloat - fg44.xx)).toShort; xy = (math.round((xy).toFloat - fg44.xy)).toShort; xz = (math.round((xz).toFloat - fg44.xz)).toShort; xw = (math.round((xw).toFloat - fg44.xw)).toShort; yx = (math.round((yx).toFloat - fg44.yx)).toShort; yy = (math.round((yy).toFloat - fg44.yy)).toShort; yz = (math.round((yz).toFloat - fg44.yz)).toShort; yw = (math.round((yw).toFloat - fg44.yw)).toShort; zx = (math.round((zx).toFloat - fg44.zx)).toShort; zy = (math.round((zy).toFloat - fg44.zy)).toShort; zz = (math.round((zz).toFloat - fg44.zz)).toShort; zw = (math.round((zw).toFloat - fg44.zw)).toShort; wx = (math.round((wx).toFloat - fg44.wx)).toShort; wy = (math.round((wy).toFloat - fg44.wy)).toShort; wz = (math.round((wz).toFloat - fg44.wz)).toShort; ww = (math.round((ww).toFloat - fg44.ww)).toShort; this }
    def -~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble - dg44.xx)).toShort; xy = (math.round((xy).toDouble - dg44.xy)).toShort; xz = (math.round((xz).toDouble - dg44.xz)).toShort; xw = (math.round((xw).toDouble - dg44.xw)).toShort; yx = (math.round((yx).toDouble - dg44.yx)).toShort; yy = (math.round((yy).toDouble - dg44.yy)).toShort; yz = (math.round((yz).toDouble - dg44.yz)).toShort; yw = (math.round((yw).toDouble - dg44.yw)).toShort; zx = (math.round((zx).toDouble - dg44.zx)).toShort; zy = (math.round((zy).toDouble - dg44.zy)).toShort; zz = (math.round((zz).toDouble - dg44.zz)).toShort; zw = (math.round((zw).toDouble - dg44.zw)).toShort; wx = (math.round((wx).toDouble - dg44.wx)).toShort; wy = (math.round((wy).toDouble - dg44.wy)).toShort; wz = (math.round((wz).toDouble - dg44.wz)).toShort; ww = (math.round((ww).toDouble - dg44.ww)).toShort; this }
    def *~(x0: Short): this.type = { xx = (xx * x0).toShort; xy = (xy * x0).toShort; xz = (xz * x0).toShort; xw = (xw * x0).toShort; yx = (yx * x0).toShort; yy = (yy * x0).toShort; yz = (yz * x0).toShort; yw = (yw * x0).toShort; zx = (zx * x0).toShort; zy = (zy * x0).toShort; zz = (zz * x0).toShort; zw = (zw * x0).toShort; wx = (wx * x0).toShort; wy = (wy * x0).toShort; wz = (wz * x0).toShort; ww = (ww * x0).toShort; this }
    def *~~(x0: Int): this.type = { xx = ((xx).toInt * x0).toShort; xy = ((xy).toInt * x0).toShort; xz = ((xz).toInt * x0).toShort; xw = ((xw).toInt * x0).toShort; yx = ((yx).toInt * x0).toShort; yy = ((yy).toInt * x0).toShort; yz = ((yz).toInt * x0).toShort; yw = ((yw).toInt * x0).toShort; zx = ((zx).toInt * x0).toShort; zy = ((zy).toInt * x0).toShort; zz = ((zz).toInt * x0).toShort; zw = ((zw).toInt * x0).toShort; wx = ((wx).toInt * x0).toShort; wy = ((wy).toInt * x0).toShort; wz = ((wz).toInt * x0).toShort; ww = ((ww).toInt * x0).toShort; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toLong * x0).toShort; xy = ((xy).toLong * x0).toShort; xz = ((xz).toLong * x0).toShort; xw = ((xw).toLong * x0).toShort; yx = ((yx).toLong * x0).toShort; yy = ((yy).toLong * x0).toShort; yz = ((yz).toLong * x0).toShort; yw = ((yw).toLong * x0).toShort; zx = ((zx).toLong * x0).toShort; zy = ((zy).toLong * x0).toShort; zz = ((zz).toLong * x0).toShort; zw = ((zw).toLong * x0).toShort; wx = ((wx).toLong * x0).toShort; wy = ((wy).toLong * x0).toShort; wz = ((wz).toLong * x0).toShort; ww = ((ww).toLong * x0).toShort; this }
    def *~~(x0: Float): this.type = { xx = (math.round((xx).toFloat * x0)).toShort; xy = (math.round((xy).toFloat * x0)).toShort; xz = (math.round((xz).toFloat * x0)).toShort; xw = (math.round((xw).toFloat * x0)).toShort; yx = (math.round((yx).toFloat * x0)).toShort; yy = (math.round((yy).toFloat * x0)).toShort; yz = (math.round((yz).toFloat * x0)).toShort; yw = (math.round((yw).toFloat * x0)).toShort; zx = (math.round((zx).toFloat * x0)).toShort; zy = (math.round((zy).toFloat * x0)).toShort; zz = (math.round((zz).toFloat * x0)).toShort; zw = (math.round((zw).toFloat * x0)).toShort; wx = (math.round((wx).toFloat * x0)).toShort; wy = (math.round((wy).toFloat * x0)).toShort; wz = (math.round((wz).toFloat * x0)).toShort; ww = (math.round((ww).toFloat * x0)).toShort; this }
    def *~~(x0: Double): this.type = { xx = (math.round((xx).toDouble * x0)).toShort; xy = (math.round((xy).toDouble * x0)).toShort; xz = (math.round((xz).toDouble * x0)).toShort; xw = (math.round((xw).toDouble * x0)).toShort; yx = (math.round((yx).toDouble * x0)).toShort; yy = (math.round((yy).toDouble * x0)).toShort; yz = (math.round((yz).toDouble * x0)).toShort; yw = (math.round((yw).toDouble * x0)).toShort; zx = (math.round((zx).toDouble * x0)).toShort; zy = (math.round((zy).toDouble * x0)).toShort; zz = (math.round((zz).toDouble * x0)).toShort; zw = (math.round((zw).toDouble * x0)).toShort; wx = (math.round((wx).toDouble * x0)).toShort; wy = (math.round((wy).toDouble * x0)).toShort; wz = (math.round((wz).toDouble * x0)).toShort; ww = (math.round((ww).toDouble * x0)).toShort; this }
    def *~(sg44: GMat4S): this.type = { xx = (xx * sg44.xx).toShort; xy = (xy * sg44.xy).toShort; xz = (xz * sg44.xz).toShort; xw = (xw * sg44.xw).toShort; yx = (yx * sg44.yx).toShort; yy = (yy * sg44.yy).toShort; yz = (yz * sg44.yz).toShort; yw = (yw * sg44.yw).toShort; zx = (zx * sg44.zx).toShort; zy = (zy * sg44.zy).toShort; zz = (zz * sg44.zz).toShort; zw = (zw * sg44.zw).toShort; wx = (wx * sg44.wx).toShort; wy = (wy * sg44.wy).toShort; wz = (wz * sg44.wz).toShort; ww = (ww * sg44.ww).toShort; this }
    def *~(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): this.type = { xx = (xx * xx0).toShort; xy = (xy * xy0).toShort; xz = (xz * xz0).toShort; xw = (xw * xw0).toShort; yx = (yx * yx0).toShort; yy = (yy * yy0).toShort; yz = (yz * yz0).toShort; yw = (yw * yw0).toShort; zx = (zx * zx0).toShort; zy = (zy * zy0).toShort; zz = (zz * zz0).toShort; zw = (zw * zw0).toShort; wx = (wx * wx0).toShort; wy = (wy * wy0).toShort; wz = (wz * wz0).toShort; ww = (ww * ww0).toShort; this }
    def *~~(ig44: GMat4I): this.type = { xx = ((xx).toInt * ig44.xx).toShort; xy = ((xy).toInt * ig44.xy).toShort; xz = ((xz).toInt * ig44.xz).toShort; xw = ((xw).toInt * ig44.xw).toShort; yx = ((yx).toInt * ig44.yx).toShort; yy = ((yy).toInt * ig44.yy).toShort; yz = ((yz).toInt * ig44.yz).toShort; yw = ((yw).toInt * ig44.yw).toShort; zx = ((zx).toInt * ig44.zx).toShort; zy = ((zy).toInt * ig44.zy).toShort; zz = ((zz).toInt * ig44.zz).toShort; zw = ((zw).toInt * ig44.zw).toShort; wx = ((wx).toInt * ig44.wx).toShort; wy = ((wy).toInt * ig44.wy).toShort; wz = ((wz).toInt * ig44.wz).toShort; ww = ((ww).toInt * ig44.ww).toShort; this }
    def *~~(lg44: GMat4L): this.type = { xx = ((xx).toLong * lg44.xx).toShort; xy = ((xy).toLong * lg44.xy).toShort; xz = ((xz).toLong * lg44.xz).toShort; xw = ((xw).toLong * lg44.xw).toShort; yx = ((yx).toLong * lg44.yx).toShort; yy = ((yy).toLong * lg44.yy).toShort; yz = ((yz).toLong * lg44.yz).toShort; yw = ((yw).toLong * lg44.yw).toShort; zx = ((zx).toLong * lg44.zx).toShort; zy = ((zy).toLong * lg44.zy).toShort; zz = ((zz).toLong * lg44.zz).toShort; zw = ((zw).toLong * lg44.zw).toShort; wx = ((wx).toLong * lg44.wx).toShort; wy = ((wy).toLong * lg44.wy).toShort; wz = ((wz).toLong * lg44.wz).toShort; ww = ((ww).toLong * lg44.ww).toShort; this }
    def *~~(fg44: GMat4F): this.type = { xx = (math.round((xx).toFloat * fg44.xx)).toShort; xy = (math.round((xy).toFloat * fg44.xy)).toShort; xz = (math.round((xz).toFloat * fg44.xz)).toShort; xw = (math.round((xw).toFloat * fg44.xw)).toShort; yx = (math.round((yx).toFloat * fg44.yx)).toShort; yy = (math.round((yy).toFloat * fg44.yy)).toShort; yz = (math.round((yz).toFloat * fg44.yz)).toShort; yw = (math.round((yw).toFloat * fg44.yw)).toShort; zx = (math.round((zx).toFloat * fg44.zx)).toShort; zy = (math.round((zy).toFloat * fg44.zy)).toShort; zz = (math.round((zz).toFloat * fg44.zz)).toShort; zw = (math.round((zw).toFloat * fg44.zw)).toShort; wx = (math.round((wx).toFloat * fg44.wx)).toShort; wy = (math.round((wy).toFloat * fg44.wy)).toShort; wz = (math.round((wz).toFloat * fg44.wz)).toShort; ww = (math.round((ww).toFloat * fg44.ww)).toShort; this }
    def *~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble * dg44.xx)).toShort; xy = (math.round((xy).toDouble * dg44.xy)).toShort; xz = (math.round((xz).toDouble * dg44.xz)).toShort; xw = (math.round((xw).toDouble * dg44.xw)).toShort; yx = (math.round((yx).toDouble * dg44.yx)).toShort; yy = (math.round((yy).toDouble * dg44.yy)).toShort; yz = (math.round((yz).toDouble * dg44.yz)).toShort; yw = (math.round((yw).toDouble * dg44.yw)).toShort; zx = (math.round((zx).toDouble * dg44.zx)).toShort; zy = (math.round((zy).toDouble * dg44.zy)).toShort; zz = (math.round((zz).toDouble * dg44.zz)).toShort; zw = (math.round((zw).toDouble * dg44.zw)).toShort; wx = (math.round((wx).toDouble * dg44.wx)).toShort; wy = (math.round((wy).toDouble * dg44.wy)).toShort; wz = (math.round((wz).toDouble * dg44.wz)).toShort; ww = (math.round((ww).toDouble * dg44.ww)).toShort; this }
    def /~(x0: Short): this.type = { xx = (xx / x0).toShort; xy = (xy / x0).toShort; xz = (xz / x0).toShort; xw = (xw / x0).toShort; yx = (yx / x0).toShort; yy = (yy / x0).toShort; yz = (yz / x0).toShort; yw = (yw / x0).toShort; zx = (zx / x0).toShort; zy = (zy / x0).toShort; zz = (zz / x0).toShort; zw = (zw / x0).toShort; wx = (wx / x0).toShort; wy = (wy / x0).toShort; wz = (wz / x0).toShort; ww = (ww / x0).toShort; this }
    def /~~(x0: Int): this.type = { xx = ((xx).toInt / x0).toShort; xy = ((xy).toInt / x0).toShort; xz = ((xz).toInt / x0).toShort; xw = ((xw).toInt / x0).toShort; yx = ((yx).toInt / x0).toShort; yy = ((yy).toInt / x0).toShort; yz = ((yz).toInt / x0).toShort; yw = ((yw).toInt / x0).toShort; zx = ((zx).toInt / x0).toShort; zy = ((zy).toInt / x0).toShort; zz = ((zz).toInt / x0).toShort; zw = ((zw).toInt / x0).toShort; wx = ((wx).toInt / x0).toShort; wy = ((wy).toInt / x0).toShort; wz = ((wz).toInt / x0).toShort; ww = ((ww).toInt / x0).toShort; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toLong / x0).toShort; xy = ((xy).toLong / x0).toShort; xz = ((xz).toLong / x0).toShort; xw = ((xw).toLong / x0).toShort; yx = ((yx).toLong / x0).toShort; yy = ((yy).toLong / x0).toShort; yz = ((yz).toLong / x0).toShort; yw = ((yw).toLong / x0).toShort; zx = ((zx).toLong / x0).toShort; zy = ((zy).toLong / x0).toShort; zz = ((zz).toLong / x0).toShort; zw = ((zw).toLong / x0).toShort; wx = ((wx).toLong / x0).toShort; wy = ((wy).toLong / x0).toShort; wz = ((wz).toLong / x0).toShort; ww = ((ww).toLong / x0).toShort; this }
    def /~~(x0: Float): this.type = { xx = (math.round((xx).toFloat / x0)).toShort; xy = (math.round((xy).toFloat / x0)).toShort; xz = (math.round((xz).toFloat / x0)).toShort; xw = (math.round((xw).toFloat / x0)).toShort; yx = (math.round((yx).toFloat / x0)).toShort; yy = (math.round((yy).toFloat / x0)).toShort; yz = (math.round((yz).toFloat / x0)).toShort; yw = (math.round((yw).toFloat / x0)).toShort; zx = (math.round((zx).toFloat / x0)).toShort; zy = (math.round((zy).toFloat / x0)).toShort; zz = (math.round((zz).toFloat / x0)).toShort; zw = (math.round((zw).toFloat / x0)).toShort; wx = (math.round((wx).toFloat / x0)).toShort; wy = (math.round((wy).toFloat / x0)).toShort; wz = (math.round((wz).toFloat / x0)).toShort; ww = (math.round((ww).toFloat / x0)).toShort; this }
    def /~~(x0: Double): this.type = { xx = (math.round((xx).toDouble / x0)).toShort; xy = (math.round((xy).toDouble / x0)).toShort; xz = (math.round((xz).toDouble / x0)).toShort; xw = (math.round((xw).toDouble / x0)).toShort; yx = (math.round((yx).toDouble / x0)).toShort; yy = (math.round((yy).toDouble / x0)).toShort; yz = (math.round((yz).toDouble / x0)).toShort; yw = (math.round((yw).toDouble / x0)).toShort; zx = (math.round((zx).toDouble / x0)).toShort; zy = (math.round((zy).toDouble / x0)).toShort; zz = (math.round((zz).toDouble / x0)).toShort; zw = (math.round((zw).toDouble / x0)).toShort; wx = (math.round((wx).toDouble / x0)).toShort; wy = (math.round((wy).toDouble / x0)).toShort; wz = (math.round((wz).toDouble / x0)).toShort; ww = (math.round((ww).toDouble / x0)).toShort; this }
    def /~(sg44: GMat4S): this.type = { xx = (xx / sg44.xx).toShort; xy = (xy / sg44.xy).toShort; xz = (xz / sg44.xz).toShort; xw = (xw / sg44.xw).toShort; yx = (yx / sg44.yx).toShort; yy = (yy / sg44.yy).toShort; yz = (yz / sg44.yz).toShort; yw = (yw / sg44.yw).toShort; zx = (zx / sg44.zx).toShort; zy = (zy / sg44.zy).toShort; zz = (zz / sg44.zz).toShort; zw = (zw / sg44.zw).toShort; wx = (wx / sg44.wx).toShort; wy = (wy / sg44.wy).toShort; wz = (wz / sg44.wz).toShort; ww = (ww / sg44.ww).toShort; this }
    def /~(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): this.type = { xx = (xx / xx0).toShort; xy = (xy / xy0).toShort; xz = (xz / xz0).toShort; xw = (xw / xw0).toShort; yx = (yx / yx0).toShort; yy = (yy / yy0).toShort; yz = (yz / yz0).toShort; yw = (yw / yw0).toShort; zx = (zx / zx0).toShort; zy = (zy / zy0).toShort; zz = (zz / zz0).toShort; zw = (zw / zw0).toShort; wx = (wx / wx0).toShort; wy = (wy / wy0).toShort; wz = (wz / wz0).toShort; ww = (ww / ww0).toShort; this }
    def /~~(ig44: GMat4I): this.type = { xx = ((xx).toInt / ig44.xx).toShort; xy = ((xy).toInt / ig44.xy).toShort; xz = ((xz).toInt / ig44.xz).toShort; xw = ((xw).toInt / ig44.xw).toShort; yx = ((yx).toInt / ig44.yx).toShort; yy = ((yy).toInt / ig44.yy).toShort; yz = ((yz).toInt / ig44.yz).toShort; yw = ((yw).toInt / ig44.yw).toShort; zx = ((zx).toInt / ig44.zx).toShort; zy = ((zy).toInt / ig44.zy).toShort; zz = ((zz).toInt / ig44.zz).toShort; zw = ((zw).toInt / ig44.zw).toShort; wx = ((wx).toInt / ig44.wx).toShort; wy = ((wy).toInt / ig44.wy).toShort; wz = ((wz).toInt / ig44.wz).toShort; ww = ((ww).toInt / ig44.ww).toShort; this }
    def /~~(lg44: GMat4L): this.type = { xx = ((xx).toLong / lg44.xx).toShort; xy = ((xy).toLong / lg44.xy).toShort; xz = ((xz).toLong / lg44.xz).toShort; xw = ((xw).toLong / lg44.xw).toShort; yx = ((yx).toLong / lg44.yx).toShort; yy = ((yy).toLong / lg44.yy).toShort; yz = ((yz).toLong / lg44.yz).toShort; yw = ((yw).toLong / lg44.yw).toShort; zx = ((zx).toLong / lg44.zx).toShort; zy = ((zy).toLong / lg44.zy).toShort; zz = ((zz).toLong / lg44.zz).toShort; zw = ((zw).toLong / lg44.zw).toShort; wx = ((wx).toLong / lg44.wx).toShort; wy = ((wy).toLong / lg44.wy).toShort; wz = ((wz).toLong / lg44.wz).toShort; ww = ((ww).toLong / lg44.ww).toShort; this }
    def /~~(fg44: GMat4F): this.type = { xx = (math.round((xx).toFloat / fg44.xx)).toShort; xy = (math.round((xy).toFloat / fg44.xy)).toShort; xz = (math.round((xz).toFloat / fg44.xz)).toShort; xw = (math.round((xw).toFloat / fg44.xw)).toShort; yx = (math.round((yx).toFloat / fg44.yx)).toShort; yy = (math.round((yy).toFloat / fg44.yy)).toShort; yz = (math.round((yz).toFloat / fg44.yz)).toShort; yw = (math.round((yw).toFloat / fg44.yw)).toShort; zx = (math.round((zx).toFloat / fg44.zx)).toShort; zy = (math.round((zy).toFloat / fg44.zy)).toShort; zz = (math.round((zz).toFloat / fg44.zz)).toShort; zw = (math.round((zw).toFloat / fg44.zw)).toShort; wx = (math.round((wx).toFloat / fg44.wx)).toShort; wy = (math.round((wy).toFloat / fg44.wy)).toShort; wz = (math.round((wz).toFloat / fg44.wz)).toShort; ww = (math.round((ww).toFloat / fg44.ww)).toShort; this }
    def /~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble / dg44.xx)).toShort; xy = (math.round((xy).toDouble / dg44.xy)).toShort; xz = (math.round((xz).toDouble / dg44.xz)).toShort; xw = (math.round((xw).toDouble / dg44.xw)).toShort; yx = (math.round((yx).toDouble / dg44.yx)).toShort; yy = (math.round((yy).toDouble / dg44.yy)).toShort; yz = (math.round((yz).toDouble / dg44.yz)).toShort; yw = (math.round((yw).toDouble / dg44.yw)).toShort; zx = (math.round((zx).toDouble / dg44.zx)).toShort; zy = (math.round((zy).toDouble / dg44.zy)).toShort; zz = (math.round((zz).toDouble / dg44.zz)).toShort; zw = (math.round((zw).toDouble / dg44.zw)).toShort; wx = (math.round((wx).toDouble / dg44.wx)).toShort; wy = (math.round((wy).toDouble / dg44.wy)).toShort; wz = (math.round((wz).toDouble / dg44.wz)).toShort; ww = (math.round((ww).toDouble / dg44.ww)).toShort; this }
    def maxEq(x0: Short): this.type = { xx = (math.max(xx,x0)).toShort; xy = (math.max(xy,x0)).toShort; xz = (math.max(xz,x0)).toShort; xw = (math.max(xw,x0)).toShort; yx = (math.max(yx,x0)).toShort; yy = (math.max(yy,x0)).toShort; yz = (math.max(yz,x0)).toShort; yw = (math.max(yw,x0)).toShort; zx = (math.max(zx,x0)).toShort; zy = (math.max(zy,x0)).toShort; zz = (math.max(zz,x0)).toShort; zw = (math.max(zw,x0)).toShort; wx = (math.max(wx,x0)).toShort; wy = (math.max(wy,x0)).toShort; wz = (math.max(wz,x0)).toShort; ww = (math.max(ww,x0)).toShort; this }
    def maxEqCast(x0: Int): this.type = { xx = (math.max((xx).toInt,x0)).toShort; xy = (math.max((xy).toInt,x0)).toShort; xz = (math.max((xz).toInt,x0)).toShort; xw = (math.max((xw).toInt,x0)).toShort; yx = (math.max((yx).toInt,x0)).toShort; yy = (math.max((yy).toInt,x0)).toShort; yz = (math.max((yz).toInt,x0)).toShort; yw = (math.max((yw).toInt,x0)).toShort; zx = (math.max((zx).toInt,x0)).toShort; zy = (math.max((zy).toInt,x0)).toShort; zz = (math.max((zz).toInt,x0)).toShort; zw = (math.max((zw).toInt,x0)).toShort; wx = (math.max((wx).toInt,x0)).toShort; wy = (math.max((wy).toInt,x0)).toShort; wz = (math.max((wz).toInt,x0)).toShort; ww = (math.max((ww).toInt,x0)).toShort; this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toLong,x0)).toShort; xy = (math.max((xy).toLong,x0)).toShort; xz = (math.max((xz).toLong,x0)).toShort; xw = (math.max((xw).toLong,x0)).toShort; yx = (math.max((yx).toLong,x0)).toShort; yy = (math.max((yy).toLong,x0)).toShort; yz = (math.max((yz).toLong,x0)).toShort; yw = (math.max((yw).toLong,x0)).toShort; zx = (math.max((zx).toLong,x0)).toShort; zy = (math.max((zy).toLong,x0)).toShort; zz = (math.max((zz).toLong,x0)).toShort; zw = (math.max((zw).toLong,x0)).toShort; wx = (math.max((wx).toLong,x0)).toShort; wy = (math.max((wy).toLong,x0)).toShort; wz = (math.max((wz).toLong,x0)).toShort; ww = (math.max((ww).toLong,x0)).toShort; this }
    def maxEqCast(x0: Float): this.type = { xx = (math.round(math.max((xx).toFloat,x0))).toShort; xy = (math.round(math.max((xy).toFloat,x0))).toShort; xz = (math.round(math.max((xz).toFloat,x0))).toShort; xw = (math.round(math.max((xw).toFloat,x0))).toShort; yx = (math.round(math.max((yx).toFloat,x0))).toShort; yy = (math.round(math.max((yy).toFloat,x0))).toShort; yz = (math.round(math.max((yz).toFloat,x0))).toShort; yw = (math.round(math.max((yw).toFloat,x0))).toShort; zx = (math.round(math.max((zx).toFloat,x0))).toShort; zy = (math.round(math.max((zy).toFloat,x0))).toShort; zz = (math.round(math.max((zz).toFloat,x0))).toShort; zw = (math.round(math.max((zw).toFloat,x0))).toShort; wx = (math.round(math.max((wx).toFloat,x0))).toShort; wy = (math.round(math.max((wy).toFloat,x0))).toShort; wz = (math.round(math.max((wz).toFloat,x0))).toShort; ww = (math.round(math.max((ww).toFloat,x0))).toShort; this }
    def maxEqCast(x0: Double): this.type = { xx = (math.round(math.max((xx).toDouble,x0))).toShort; xy = (math.round(math.max((xy).toDouble,x0))).toShort; xz = (math.round(math.max((xz).toDouble,x0))).toShort; xw = (math.round(math.max((xw).toDouble,x0))).toShort; yx = (math.round(math.max((yx).toDouble,x0))).toShort; yy = (math.round(math.max((yy).toDouble,x0))).toShort; yz = (math.round(math.max((yz).toDouble,x0))).toShort; yw = (math.round(math.max((yw).toDouble,x0))).toShort; zx = (math.round(math.max((zx).toDouble,x0))).toShort; zy = (math.round(math.max((zy).toDouble,x0))).toShort; zz = (math.round(math.max((zz).toDouble,x0))).toShort; zw = (math.round(math.max((zw).toDouble,x0))).toShort; wx = (math.round(math.max((wx).toDouble,x0))).toShort; wy = (math.round(math.max((wy).toDouble,x0))).toShort; wz = (math.round(math.max((wz).toDouble,x0))).toShort; ww = (math.round(math.max((ww).toDouble,x0))).toShort; this }
    def maxEq(sg44: GMat4S): this.type = { xx = (math.max(xx,sg44.xx)).toShort; xy = (math.max(xy,sg44.xy)).toShort; xz = (math.max(xz,sg44.xz)).toShort; xw = (math.max(xw,sg44.xw)).toShort; yx = (math.max(yx,sg44.yx)).toShort; yy = (math.max(yy,sg44.yy)).toShort; yz = (math.max(yz,sg44.yz)).toShort; yw = (math.max(yw,sg44.yw)).toShort; zx = (math.max(zx,sg44.zx)).toShort; zy = (math.max(zy,sg44.zy)).toShort; zz = (math.max(zz,sg44.zz)).toShort; zw = (math.max(zw,sg44.zw)).toShort; wx = (math.max(wx,sg44.wx)).toShort; wy = (math.max(wy,sg44.wy)).toShort; wz = (math.max(wz,sg44.wz)).toShort; ww = (math.max(ww,sg44.ww)).toShort; this }
    def maxEq(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): this.type = { xx = (math.max(xx,xx0)).toShort; xy = (math.max(xy,xy0)).toShort; xz = (math.max(xz,xz0)).toShort; xw = (math.max(xw,xw0)).toShort; yx = (math.max(yx,yx0)).toShort; yy = (math.max(yy,yy0)).toShort; yz = (math.max(yz,yz0)).toShort; yw = (math.max(yw,yw0)).toShort; zx = (math.max(zx,zx0)).toShort; zy = (math.max(zy,zy0)).toShort; zz = (math.max(zz,zz0)).toShort; zw = (math.max(zw,zw0)).toShort; wx = (math.max(wx,wx0)).toShort; wy = (math.max(wy,wy0)).toShort; wz = (math.max(wz,wz0)).toShort; ww = (math.max(ww,ww0)).toShort; this }
    def maxEqCast(ig44: GMat4I): this.type = { xx = (math.max((xx).toInt,ig44.xx)).toShort; xy = (math.max((xy).toInt,ig44.xy)).toShort; xz = (math.max((xz).toInt,ig44.xz)).toShort; xw = (math.max((xw).toInt,ig44.xw)).toShort; yx = (math.max((yx).toInt,ig44.yx)).toShort; yy = (math.max((yy).toInt,ig44.yy)).toShort; yz = (math.max((yz).toInt,ig44.yz)).toShort; yw = (math.max((yw).toInt,ig44.yw)).toShort; zx = (math.max((zx).toInt,ig44.zx)).toShort; zy = (math.max((zy).toInt,ig44.zy)).toShort; zz = (math.max((zz).toInt,ig44.zz)).toShort; zw = (math.max((zw).toInt,ig44.zw)).toShort; wx = (math.max((wx).toInt,ig44.wx)).toShort; wy = (math.max((wy).toInt,ig44.wy)).toShort; wz = (math.max((wz).toInt,ig44.wz)).toShort; ww = (math.max((ww).toInt,ig44.ww)).toShort; this }
    def maxEqCast(lg44: GMat4L): this.type = { xx = (math.max((xx).toLong,lg44.xx)).toShort; xy = (math.max((xy).toLong,lg44.xy)).toShort; xz = (math.max((xz).toLong,lg44.xz)).toShort; xw = (math.max((xw).toLong,lg44.xw)).toShort; yx = (math.max((yx).toLong,lg44.yx)).toShort; yy = (math.max((yy).toLong,lg44.yy)).toShort; yz = (math.max((yz).toLong,lg44.yz)).toShort; yw = (math.max((yw).toLong,lg44.yw)).toShort; zx = (math.max((zx).toLong,lg44.zx)).toShort; zy = (math.max((zy).toLong,lg44.zy)).toShort; zz = (math.max((zz).toLong,lg44.zz)).toShort; zw = (math.max((zw).toLong,lg44.zw)).toShort; wx = (math.max((wx).toLong,lg44.wx)).toShort; wy = (math.max((wy).toLong,lg44.wy)).toShort; wz = (math.max((wz).toLong,lg44.wz)).toShort; ww = (math.max((ww).toLong,lg44.ww)).toShort; this }
    def maxEqCast(fg44: GMat4F): this.type = { xx = (math.round(math.max((xx).toFloat,fg44.xx))).toShort; xy = (math.round(math.max((xy).toFloat,fg44.xy))).toShort; xz = (math.round(math.max((xz).toFloat,fg44.xz))).toShort; xw = (math.round(math.max((xw).toFloat,fg44.xw))).toShort; yx = (math.round(math.max((yx).toFloat,fg44.yx))).toShort; yy = (math.round(math.max((yy).toFloat,fg44.yy))).toShort; yz = (math.round(math.max((yz).toFloat,fg44.yz))).toShort; yw = (math.round(math.max((yw).toFloat,fg44.yw))).toShort; zx = (math.round(math.max((zx).toFloat,fg44.zx))).toShort; zy = (math.round(math.max((zy).toFloat,fg44.zy))).toShort; zz = (math.round(math.max((zz).toFloat,fg44.zz))).toShort; zw = (math.round(math.max((zw).toFloat,fg44.zw))).toShort; wx = (math.round(math.max((wx).toFloat,fg44.wx))).toShort; wy = (math.round(math.max((wy).toFloat,fg44.wy))).toShort; wz = (math.round(math.max((wz).toFloat,fg44.wz))).toShort; ww = (math.round(math.max((ww).toFloat,fg44.ww))).toShort; this }
    def maxEqCast(dg44: GMat4D): this.type = { xx = (math.round(math.max((xx).toDouble,dg44.xx))).toShort; xy = (math.round(math.max((xy).toDouble,dg44.xy))).toShort; xz = (math.round(math.max((xz).toDouble,dg44.xz))).toShort; xw = (math.round(math.max((xw).toDouble,dg44.xw))).toShort; yx = (math.round(math.max((yx).toDouble,dg44.yx))).toShort; yy = (math.round(math.max((yy).toDouble,dg44.yy))).toShort; yz = (math.round(math.max((yz).toDouble,dg44.yz))).toShort; yw = (math.round(math.max((yw).toDouble,dg44.yw))).toShort; zx = (math.round(math.max((zx).toDouble,dg44.zx))).toShort; zy = (math.round(math.max((zy).toDouble,dg44.zy))).toShort; zz = (math.round(math.max((zz).toDouble,dg44.zz))).toShort; zw = (math.round(math.max((zw).toDouble,dg44.zw))).toShort; wx = (math.round(math.max((wx).toDouble,dg44.wx))).toShort; wy = (math.round(math.max((wy).toDouble,dg44.wy))).toShort; wz = (math.round(math.max((wz).toDouble,dg44.wz))).toShort; ww = (math.round(math.max((ww).toDouble,dg44.ww))).toShort; this }
    def minEq(x0: Short): this.type = { xx = (math.min(xx,x0)).toShort; xy = (math.min(xy,x0)).toShort; xz = (math.min(xz,x0)).toShort; xw = (math.min(xw,x0)).toShort; yx = (math.min(yx,x0)).toShort; yy = (math.min(yy,x0)).toShort; yz = (math.min(yz,x0)).toShort; yw = (math.min(yw,x0)).toShort; zx = (math.min(zx,x0)).toShort; zy = (math.min(zy,x0)).toShort; zz = (math.min(zz,x0)).toShort; zw = (math.min(zw,x0)).toShort; wx = (math.min(wx,x0)).toShort; wy = (math.min(wy,x0)).toShort; wz = (math.min(wz,x0)).toShort; ww = (math.min(ww,x0)).toShort; this }
    def minEqCast(x0: Int): this.type = { xx = (math.min((xx).toInt,x0)).toShort; xy = (math.min((xy).toInt,x0)).toShort; xz = (math.min((xz).toInt,x0)).toShort; xw = (math.min((xw).toInt,x0)).toShort; yx = (math.min((yx).toInt,x0)).toShort; yy = (math.min((yy).toInt,x0)).toShort; yz = (math.min((yz).toInt,x0)).toShort; yw = (math.min((yw).toInt,x0)).toShort; zx = (math.min((zx).toInt,x0)).toShort; zy = (math.min((zy).toInt,x0)).toShort; zz = (math.min((zz).toInt,x0)).toShort; zw = (math.min((zw).toInt,x0)).toShort; wx = (math.min((wx).toInt,x0)).toShort; wy = (math.min((wy).toInt,x0)).toShort; wz = (math.min((wz).toInt,x0)).toShort; ww = (math.min((ww).toInt,x0)).toShort; this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toLong,x0)).toShort; xy = (math.min((xy).toLong,x0)).toShort; xz = (math.min((xz).toLong,x0)).toShort; xw = (math.min((xw).toLong,x0)).toShort; yx = (math.min((yx).toLong,x0)).toShort; yy = (math.min((yy).toLong,x0)).toShort; yz = (math.min((yz).toLong,x0)).toShort; yw = (math.min((yw).toLong,x0)).toShort; zx = (math.min((zx).toLong,x0)).toShort; zy = (math.min((zy).toLong,x0)).toShort; zz = (math.min((zz).toLong,x0)).toShort; zw = (math.min((zw).toLong,x0)).toShort; wx = (math.min((wx).toLong,x0)).toShort; wy = (math.min((wy).toLong,x0)).toShort; wz = (math.min((wz).toLong,x0)).toShort; ww = (math.min((ww).toLong,x0)).toShort; this }
    def minEqCast(x0: Float): this.type = { xx = (math.round(math.min((xx).toFloat,x0))).toShort; xy = (math.round(math.min((xy).toFloat,x0))).toShort; xz = (math.round(math.min((xz).toFloat,x0))).toShort; xw = (math.round(math.min((xw).toFloat,x0))).toShort; yx = (math.round(math.min((yx).toFloat,x0))).toShort; yy = (math.round(math.min((yy).toFloat,x0))).toShort; yz = (math.round(math.min((yz).toFloat,x0))).toShort; yw = (math.round(math.min((yw).toFloat,x0))).toShort; zx = (math.round(math.min((zx).toFloat,x0))).toShort; zy = (math.round(math.min((zy).toFloat,x0))).toShort; zz = (math.round(math.min((zz).toFloat,x0))).toShort; zw = (math.round(math.min((zw).toFloat,x0))).toShort; wx = (math.round(math.min((wx).toFloat,x0))).toShort; wy = (math.round(math.min((wy).toFloat,x0))).toShort; wz = (math.round(math.min((wz).toFloat,x0))).toShort; ww = (math.round(math.min((ww).toFloat,x0))).toShort; this }
    def minEqCast(x0: Double): this.type = { xx = (math.round(math.min((xx).toDouble,x0))).toShort; xy = (math.round(math.min((xy).toDouble,x0))).toShort; xz = (math.round(math.min((xz).toDouble,x0))).toShort; xw = (math.round(math.min((xw).toDouble,x0))).toShort; yx = (math.round(math.min((yx).toDouble,x0))).toShort; yy = (math.round(math.min((yy).toDouble,x0))).toShort; yz = (math.round(math.min((yz).toDouble,x0))).toShort; yw = (math.round(math.min((yw).toDouble,x0))).toShort; zx = (math.round(math.min((zx).toDouble,x0))).toShort; zy = (math.round(math.min((zy).toDouble,x0))).toShort; zz = (math.round(math.min((zz).toDouble,x0))).toShort; zw = (math.round(math.min((zw).toDouble,x0))).toShort; wx = (math.round(math.min((wx).toDouble,x0))).toShort; wy = (math.round(math.min((wy).toDouble,x0))).toShort; wz = (math.round(math.min((wz).toDouble,x0))).toShort; ww = (math.round(math.min((ww).toDouble,x0))).toShort; this }
    def minEq(sg44: GMat4S): this.type = { xx = (math.min(xx,sg44.xx)).toShort; xy = (math.min(xy,sg44.xy)).toShort; xz = (math.min(xz,sg44.xz)).toShort; xw = (math.min(xw,sg44.xw)).toShort; yx = (math.min(yx,sg44.yx)).toShort; yy = (math.min(yy,sg44.yy)).toShort; yz = (math.min(yz,sg44.yz)).toShort; yw = (math.min(yw,sg44.yw)).toShort; zx = (math.min(zx,sg44.zx)).toShort; zy = (math.min(zy,sg44.zy)).toShort; zz = (math.min(zz,sg44.zz)).toShort; zw = (math.min(zw,sg44.zw)).toShort; wx = (math.min(wx,sg44.wx)).toShort; wy = (math.min(wy,sg44.wy)).toShort; wz = (math.min(wz,sg44.wz)).toShort; ww = (math.min(ww,sg44.ww)).toShort; this }
    def minEq(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): this.type = { xx = (math.min(xx,xx0)).toShort; xy = (math.min(xy,xy0)).toShort; xz = (math.min(xz,xz0)).toShort; xw = (math.min(xw,xw0)).toShort; yx = (math.min(yx,yx0)).toShort; yy = (math.min(yy,yy0)).toShort; yz = (math.min(yz,yz0)).toShort; yw = (math.min(yw,yw0)).toShort; zx = (math.min(zx,zx0)).toShort; zy = (math.min(zy,zy0)).toShort; zz = (math.min(zz,zz0)).toShort; zw = (math.min(zw,zw0)).toShort; wx = (math.min(wx,wx0)).toShort; wy = (math.min(wy,wy0)).toShort; wz = (math.min(wz,wz0)).toShort; ww = (math.min(ww,ww0)).toShort; this }
    def minEqCast(ig44: GMat4I): this.type = { xx = (math.min((xx).toInt,ig44.xx)).toShort; xy = (math.min((xy).toInt,ig44.xy)).toShort; xz = (math.min((xz).toInt,ig44.xz)).toShort; xw = (math.min((xw).toInt,ig44.xw)).toShort; yx = (math.min((yx).toInt,ig44.yx)).toShort; yy = (math.min((yy).toInt,ig44.yy)).toShort; yz = (math.min((yz).toInt,ig44.yz)).toShort; yw = (math.min((yw).toInt,ig44.yw)).toShort; zx = (math.min((zx).toInt,ig44.zx)).toShort; zy = (math.min((zy).toInt,ig44.zy)).toShort; zz = (math.min((zz).toInt,ig44.zz)).toShort; zw = (math.min((zw).toInt,ig44.zw)).toShort; wx = (math.min((wx).toInt,ig44.wx)).toShort; wy = (math.min((wy).toInt,ig44.wy)).toShort; wz = (math.min((wz).toInt,ig44.wz)).toShort; ww = (math.min((ww).toInt,ig44.ww)).toShort; this }
    def minEqCast(lg44: GMat4L): this.type = { xx = (math.min((xx).toLong,lg44.xx)).toShort; xy = (math.min((xy).toLong,lg44.xy)).toShort; xz = (math.min((xz).toLong,lg44.xz)).toShort; xw = (math.min((xw).toLong,lg44.xw)).toShort; yx = (math.min((yx).toLong,lg44.yx)).toShort; yy = (math.min((yy).toLong,lg44.yy)).toShort; yz = (math.min((yz).toLong,lg44.yz)).toShort; yw = (math.min((yw).toLong,lg44.yw)).toShort; zx = (math.min((zx).toLong,lg44.zx)).toShort; zy = (math.min((zy).toLong,lg44.zy)).toShort; zz = (math.min((zz).toLong,lg44.zz)).toShort; zw = (math.min((zw).toLong,lg44.zw)).toShort; wx = (math.min((wx).toLong,lg44.wx)).toShort; wy = (math.min((wy).toLong,lg44.wy)).toShort; wz = (math.min((wz).toLong,lg44.wz)).toShort; ww = (math.min((ww).toLong,lg44.ww)).toShort; this }
    def minEqCast(fg44: GMat4F): this.type = { xx = (math.round(math.min((xx).toFloat,fg44.xx))).toShort; xy = (math.round(math.min((xy).toFloat,fg44.xy))).toShort; xz = (math.round(math.min((xz).toFloat,fg44.xz))).toShort; xw = (math.round(math.min((xw).toFloat,fg44.xw))).toShort; yx = (math.round(math.min((yx).toFloat,fg44.yx))).toShort; yy = (math.round(math.min((yy).toFloat,fg44.yy))).toShort; yz = (math.round(math.min((yz).toFloat,fg44.yz))).toShort; yw = (math.round(math.min((yw).toFloat,fg44.yw))).toShort; zx = (math.round(math.min((zx).toFloat,fg44.zx))).toShort; zy = (math.round(math.min((zy).toFloat,fg44.zy))).toShort; zz = (math.round(math.min((zz).toFloat,fg44.zz))).toShort; zw = (math.round(math.min((zw).toFloat,fg44.zw))).toShort; wx = (math.round(math.min((wx).toFloat,fg44.wx))).toShort; wy = (math.round(math.min((wy).toFloat,fg44.wy))).toShort; wz = (math.round(math.min((wz).toFloat,fg44.wz))).toShort; ww = (math.round(math.min((ww).toFloat,fg44.ww))).toShort; this }
    def minEqCast(dg44: GMat4D): this.type = { xx = (math.round(math.min((xx).toDouble,dg44.xx))).toShort; xy = (math.round(math.min((xy).toDouble,dg44.xy))).toShort; xz = (math.round(math.min((xz).toDouble,dg44.xz))).toShort; xw = (math.round(math.min((xw).toDouble,dg44.xw))).toShort; yx = (math.round(math.min((yx).toDouble,dg44.yx))).toShort; yy = (math.round(math.min((yy).toDouble,dg44.yy))).toShort; yz = (math.round(math.min((yz).toDouble,dg44.yz))).toShort; yw = (math.round(math.min((yw).toDouble,dg44.yw))).toShort; zx = (math.round(math.min((zx).toDouble,dg44.zx))).toShort; zy = (math.round(math.min((zy).toDouble,dg44.zy))).toShort; zz = (math.round(math.min((zz).toDouble,dg44.zz))).toShort; zw = (math.round(math.min((zw).toDouble,dg44.zw))).toShort; wx = (math.round(math.min((wx).toDouble,dg44.wx))).toShort; wy = (math.round(math.min((wy).toDouble,dg44.wy))).toShort; wz = (math.round(math.min((wz).toDouble,dg44.wz))).toShort; ww = (math.round(math.min((ww).toDouble,dg44.ww))).toShort; this }
    def operateEq(sg44: GMat4S)(fun: (Short,Short)=>Short) = { xx = (fun(xx,sg44.xx)).toShort; xy = (fun(xy,sg44.xy)).toShort; xz = (fun(xz,sg44.xz)).toShort; xw = (fun(xw,sg44.xw)).toShort; yx = (fun(yx,sg44.yx)).toShort; yy = (fun(yy,sg44.yy)).toShort; yz = (fun(yz,sg44.yz)).toShort; yw = (fun(yw,sg44.yw)).toShort; zx = (fun(zx,sg44.zx)).toShort; zy = (fun(zy,sg44.zy)).toShort; zz = (fun(zz,sg44.zz)).toShort; zw = (fun(zw,sg44.zw)).toShort; wx = (fun(wx,sg44.wx)).toShort; wy = (fun(wy,sg44.wy)).toShort; wz = (fun(wz,sg44.wz)).toShort; ww = (fun(ww,sg44.ww)).toShort; this }
    def operateEqCast(ig44: GMat4I)(fun: (Int,Int)=>Int) = { xx = (fun((xx).toInt,ig44.xx)).toShort; xy = (fun((xy).toInt,ig44.xy)).toShort; xz = (fun((xz).toInt,ig44.xz)).toShort; xw = (fun((xw).toInt,ig44.xw)).toShort; yx = (fun((yx).toInt,ig44.yx)).toShort; yy = (fun((yy).toInt,ig44.yy)).toShort; yz = (fun((yz).toInt,ig44.yz)).toShort; yw = (fun((yw).toInt,ig44.yw)).toShort; zx = (fun((zx).toInt,ig44.zx)).toShort; zy = (fun((zy).toInt,ig44.zy)).toShort; zz = (fun((zz).toInt,ig44.zz)).toShort; zw = (fun((zw).toInt,ig44.zw)).toShort; wx = (fun((wx).toInt,ig44.wx)).toShort; wy = (fun((wy).toInt,ig44.wy)).toShort; wz = (fun((wz).toInt,ig44.wz)).toShort; ww = (fun((ww).toInt,ig44.ww)).toShort; this }
    def operateEqCast(lg44: GMat4L)(fun: (Long,Long)=>Long) = { xx = (fun((xx).toLong,lg44.xx)).toShort; xy = (fun((xy).toLong,lg44.xy)).toShort; xz = (fun((xz).toLong,lg44.xz)).toShort; xw = (fun((xw).toLong,lg44.xw)).toShort; yx = (fun((yx).toLong,lg44.yx)).toShort; yy = (fun((yy).toLong,lg44.yy)).toShort; yz = (fun((yz).toLong,lg44.yz)).toShort; yw = (fun((yw).toLong,lg44.yw)).toShort; zx = (fun((zx).toLong,lg44.zx)).toShort; zy = (fun((zy).toLong,lg44.zy)).toShort; zz = (fun((zz).toLong,lg44.zz)).toShort; zw = (fun((zw).toLong,lg44.zw)).toShort; wx = (fun((wx).toLong,lg44.wx)).toShort; wy = (fun((wy).toLong,lg44.wy)).toShort; wz = (fun((wz).toLong,lg44.wz)).toShort; ww = (fun((ww).toLong,lg44.ww)).toShort; this }
    def operateEqCast(fg44: GMat4F)(fun: (Float,Float)=>Float) = { xx = (math.round(fun((xx).toFloat,fg44.xx))).toShort; xy = (math.round(fun((xy).toFloat,fg44.xy))).toShort; xz = (math.round(fun((xz).toFloat,fg44.xz))).toShort; xw = (math.round(fun((xw).toFloat,fg44.xw))).toShort; yx = (math.round(fun((yx).toFloat,fg44.yx))).toShort; yy = (math.round(fun((yy).toFloat,fg44.yy))).toShort; yz = (math.round(fun((yz).toFloat,fg44.yz))).toShort; yw = (math.round(fun((yw).toFloat,fg44.yw))).toShort; zx = (math.round(fun((zx).toFloat,fg44.zx))).toShort; zy = (math.round(fun((zy).toFloat,fg44.zy))).toShort; zz = (math.round(fun((zz).toFloat,fg44.zz))).toShort; zw = (math.round(fun((zw).toFloat,fg44.zw))).toShort; wx = (math.round(fun((wx).toFloat,fg44.wx))).toShort; wy = (math.round(fun((wy).toFloat,fg44.wy))).toShort; wz = (math.round(fun((wz).toFloat,fg44.wz))).toShort; ww = (math.round(fun((ww).toFloat,fg44.ww))).toShort; this }
    def operateEqCast(dg44: GMat4D)(fun: (Double,Double)=>Double) = { xx = (math.round(fun((xx).toDouble,dg44.xx))).toShort; xy = (math.round(fun((xy).toDouble,dg44.xy))).toShort; xz = (math.round(fun((xz).toDouble,dg44.xz))).toShort; xw = (math.round(fun((xw).toDouble,dg44.xw))).toShort; yx = (math.round(fun((yx).toDouble,dg44.yx))).toShort; yy = (math.round(fun((yy).toDouble,dg44.yy))).toShort; yz = (math.round(fun((yz).toDouble,dg44.yz))).toShort; yw = (math.round(fun((yw).toDouble,dg44.yw))).toShort; zx = (math.round(fun((zx).toDouble,dg44.zx))).toShort; zy = (math.round(fun((zy).toDouble,dg44.zy))).toShort; zz = (math.round(fun((zz).toDouble,dg44.zz))).toShort; zw = (math.round(fun((zw).toDouble,dg44.zw))).toShort; wx = (math.round(fun((wx).toDouble,dg44.wx))).toShort; wy = (math.round(fun((wy).toDouble,dg44.wy))).toShort; wz = (math.round(fun((wz).toDouble,dg44.wz))).toShort; ww = (math.round(fun((ww).toDouble,dg44.ww))).toShort; this }
    def :|~(sg4: GVec4S) = { xx = sg4.x; xy = sg4.x; xz = sg4.x; xw = sg4.x; yx = sg4.y; yy = sg4.y; yz = sg4.y; yw = sg4.y; zx = sg4.z; zy = sg4.z; zz = sg4.z; zw = sg4.z; wx = sg4.w; wy = sg4.w; wz = sg4.w; ww = sg4.w; this }
    def :-~(sg4: GVec4S) = { xx = sg4.x; xy = sg4.y; xz = sg4.z; xw = sg4.w; yx = sg4.x; yy = sg4.y; yz = sg4.z; yw = sg4.w; zx = sg4.x; zy = sg4.y; zz = sg4.z; zw = sg4.w; wx = sg4.x; wy = sg4.y; wz = sg4.z; ww = sg4.w; this }
    def :|~~(ig4: GVec4I) = { xx = (ig4.x).toShort; xy = (ig4.x).toShort; xz = (ig4.x).toShort; xw = (ig4.x).toShort; yx = (ig4.y).toShort; yy = (ig4.y).toShort; yz = (ig4.y).toShort; yw = (ig4.y).toShort; zx = (ig4.z).toShort; zy = (ig4.z).toShort; zz = (ig4.z).toShort; zw = (ig4.z).toShort; wx = (ig4.w).toShort; wy = (ig4.w).toShort; wz = (ig4.w).toShort; ww = (ig4.w).toShort; this }
    def :-~~(ig4: GVec4I) = { xx = (ig4.x).toShort; xy = (ig4.y).toShort; xz = (ig4.z).toShort; xw = (ig4.w).toShort; yx = (ig4.x).toShort; yy = (ig4.y).toShort; yz = (ig4.z).toShort; yw = (ig4.w).toShort; zx = (ig4.x).toShort; zy = (ig4.y).toShort; zz = (ig4.z).toShort; zw = (ig4.w).toShort; wx = (ig4.x).toShort; wy = (ig4.y).toShort; wz = (ig4.z).toShort; ww = (ig4.w).toShort; this }
    def :|~~(lg4: GVec4L) = { xx = (lg4.x).toShort; xy = (lg4.x).toShort; xz = (lg4.x).toShort; xw = (lg4.x).toShort; yx = (lg4.y).toShort; yy = (lg4.y).toShort; yz = (lg4.y).toShort; yw = (lg4.y).toShort; zx = (lg4.z).toShort; zy = (lg4.z).toShort; zz = (lg4.z).toShort; zw = (lg4.z).toShort; wx = (lg4.w).toShort; wy = (lg4.w).toShort; wz = (lg4.w).toShort; ww = (lg4.w).toShort; this }
    def :-~~(lg4: GVec4L) = { xx = (lg4.x).toShort; xy = (lg4.y).toShort; xz = (lg4.z).toShort; xw = (lg4.w).toShort; yx = (lg4.x).toShort; yy = (lg4.y).toShort; yz = (lg4.z).toShort; yw = (lg4.w).toShort; zx = (lg4.x).toShort; zy = (lg4.y).toShort; zz = (lg4.z).toShort; zw = (lg4.w).toShort; wx = (lg4.x).toShort; wy = (lg4.y).toShort; wz = (lg4.z).toShort; ww = (lg4.w).toShort; this }
    def :|~~(fg4: GVec4F) = { xx = (math.round(fg4.x)).toShort; xy = (math.round(fg4.x)).toShort; xz = (math.round(fg4.x)).toShort; xw = (math.round(fg4.x)).toShort; yx = (math.round(fg4.y)).toShort; yy = (math.round(fg4.y)).toShort; yz = (math.round(fg4.y)).toShort; yw = (math.round(fg4.y)).toShort; zx = (math.round(fg4.z)).toShort; zy = (math.round(fg4.z)).toShort; zz = (math.round(fg4.z)).toShort; zw = (math.round(fg4.z)).toShort; wx = (math.round(fg4.w)).toShort; wy = (math.round(fg4.w)).toShort; wz = (math.round(fg4.w)).toShort; ww = (math.round(fg4.w)).toShort; this }
    def :-~~(fg4: GVec4F) = { xx = (math.round(fg4.x)).toShort; xy = (math.round(fg4.y)).toShort; xz = (math.round(fg4.z)).toShort; xw = (math.round(fg4.w)).toShort; yx = (math.round(fg4.x)).toShort; yy = (math.round(fg4.y)).toShort; yz = (math.round(fg4.z)).toShort; yw = (math.round(fg4.w)).toShort; zx = (math.round(fg4.x)).toShort; zy = (math.round(fg4.y)).toShort; zz = (math.round(fg4.z)).toShort; zw = (math.round(fg4.w)).toShort; wx = (math.round(fg4.x)).toShort; wy = (math.round(fg4.y)).toShort; wz = (math.round(fg4.z)).toShort; ww = (math.round(fg4.w)).toShort; this }
    def :|~~(dg4: GVec4D) = { xx = (math.round(dg4.x)).toShort; xy = (math.round(dg4.x)).toShort; xz = (math.round(dg4.x)).toShort; xw = (math.round(dg4.x)).toShort; yx = (math.round(dg4.y)).toShort; yy = (math.round(dg4.y)).toShort; yz = (math.round(dg4.y)).toShort; yw = (math.round(dg4.y)).toShort; zx = (math.round(dg4.z)).toShort; zy = (math.round(dg4.z)).toShort; zz = (math.round(dg4.z)).toShort; zw = (math.round(dg4.z)).toShort; wx = (math.round(dg4.w)).toShort; wy = (math.round(dg4.w)).toShort; wz = (math.round(dg4.w)).toShort; ww = (math.round(dg4.w)).toShort; this }
    def :-~~(dg4: GVec4D) = { xx = (math.round(dg4.x)).toShort; xy = (math.round(dg4.y)).toShort; xz = (math.round(dg4.z)).toShort; xw = (math.round(dg4.w)).toShort; yx = (math.round(dg4.x)).toShort; yy = (math.round(dg4.y)).toShort; yz = (math.round(dg4.z)).toShort; yw = (math.round(dg4.w)).toShort; zx = (math.round(dg4.x)).toShort; zy = (math.round(dg4.y)).toShort; zz = (math.round(dg4.z)).toShort; zw = (math.round(dg4.w)).toShort; wx = (math.round(dg4.x)).toShort; wy = (math.round(dg4.y)).toShort; wz = (math.round(dg4.z)).toShort; ww = (math.round(dg4.w)).toShort; this }
    def **~(sg44: GMat4S) = {val xx0 = xx*sg44.xx+xy*sg44.yx+xz*sg44.zx+xw*sg44.wx; val xy0 = xx*sg44.xy+xy*sg44.yy+xz*sg44.zy+xw*sg44.wy; val xz0 = xx*sg44.xz+xy*sg44.yz+xz*sg44.zz+xw*sg44.wz; val xw0 = xx*sg44.xw+xy*sg44.yw+xz*sg44.zw+xw*sg44.ww; val yx0 = yx*sg44.xx+yy*sg44.yx+yz*sg44.zx+yw*sg44.wx; val yy0 = yx*sg44.xy+yy*sg44.yy+yz*sg44.zy+yw*sg44.wy; val yz0 = yx*sg44.xz+yy*sg44.yz+yz*sg44.zz+yw*sg44.wz; val yw0 = yx*sg44.xw+yy*sg44.yw+yz*sg44.zw+yw*sg44.ww; val zx0 = zx*sg44.xx+zy*sg44.yx+zz*sg44.zx+zw*sg44.wx; val zy0 = zx*sg44.xy+zy*sg44.yy+zz*sg44.zy+zw*sg44.wy; val zz0 = zx*sg44.xz+zy*sg44.yz+zz*sg44.zz+zw*sg44.wz; val zw0 = zx*sg44.xw+zy*sg44.yw+zz*sg44.zw+zw*sg44.ww; val wx0 = wx*sg44.xx+wy*sg44.yx+wz*sg44.zx+ww*sg44.wx; val wy0 = wx*sg44.xy+wy*sg44.yy+wz*sg44.zy+ww*sg44.wy; val wz0 = wx*sg44.xz+wy*sg44.yz+wz*sg44.zz+ww*sg44.wz; val ww0 = wx*sg44.xw+wy*sg44.yw+wz*sg44.zw+ww*sg44.ww; xx = (xx0).toShort; xy = (xy0).toShort; xz = (xz0).toShort; xw = (xw0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; yz = (yz0).toShort; yw = (yw0).toShort; zx = (zx0).toShort; zy = (zy0).toShort; zz = (zz0).toShort; zw = (zw0).toShort; wx = (wx0).toShort; wy = (wy0).toShort; wz = (wz0).toShort; ww = (ww0).toShort; this }
    def **~~(ig44: GMat4I) = {val xx0 = (xx).toInt*ig44.xx+(xy).toInt*ig44.yx+(xz).toInt*ig44.zx+(xw).toInt*ig44.wx; val xy0 = (xx).toInt*ig44.xy+(xy).toInt*ig44.yy+(xz).toInt*ig44.zy+(xw).toInt*ig44.wy; val xz0 = (xx).toInt*ig44.xz+(xy).toInt*ig44.yz+(xz).toInt*ig44.zz+(xw).toInt*ig44.wz; val xw0 = (xx).toInt*ig44.xw+(xy).toInt*ig44.yw+(xz).toInt*ig44.zw+(xw).toInt*ig44.ww; val yx0 = (yx).toInt*ig44.xx+(yy).toInt*ig44.yx+(yz).toInt*ig44.zx+(yw).toInt*ig44.wx; val yy0 = (yx).toInt*ig44.xy+(yy).toInt*ig44.yy+(yz).toInt*ig44.zy+(yw).toInt*ig44.wy; val yz0 = (yx).toInt*ig44.xz+(yy).toInt*ig44.yz+(yz).toInt*ig44.zz+(yw).toInt*ig44.wz; val yw0 = (yx).toInt*ig44.xw+(yy).toInt*ig44.yw+(yz).toInt*ig44.zw+(yw).toInt*ig44.ww; val zx0 = (zx).toInt*ig44.xx+(zy).toInt*ig44.yx+(zz).toInt*ig44.zx+(zw).toInt*ig44.wx; val zy0 = (zx).toInt*ig44.xy+(zy).toInt*ig44.yy+(zz).toInt*ig44.zy+(zw).toInt*ig44.wy; val zz0 = (zx).toInt*ig44.xz+(zy).toInt*ig44.yz+(zz).toInt*ig44.zz+(zw).toInt*ig44.wz; val zw0 = (zx).toInt*ig44.xw+(zy).toInt*ig44.yw+(zz).toInt*ig44.zw+(zw).toInt*ig44.ww; val wx0 = (wx).toInt*ig44.xx+(wy).toInt*ig44.yx+(wz).toInt*ig44.zx+(ww).toInt*ig44.wx; val wy0 = (wx).toInt*ig44.xy+(wy).toInt*ig44.yy+(wz).toInt*ig44.zy+(ww).toInt*ig44.wy; val wz0 = (wx).toInt*ig44.xz+(wy).toInt*ig44.yz+(wz).toInt*ig44.zz+(ww).toInt*ig44.wz; val ww0 = (wx).toInt*ig44.xw+(wy).toInt*ig44.yw+(wz).toInt*ig44.zw+(ww).toInt*ig44.ww; xx = (xx0).toShort; xy = (xy0).toShort; xz = (xz0).toShort; xw = (xw0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; yz = (yz0).toShort; yw = (yw0).toShort; zx = (zx0).toShort; zy = (zy0).toShort; zz = (zz0).toShort; zw = (zw0).toShort; wx = (wx0).toShort; wy = (wy0).toShort; wz = (wz0).toShort; ww = (ww0).toShort; this }
    def **~~(lg44: GMat4L) = {val xx0 = (xx).toLong*lg44.xx+(xy).toLong*lg44.yx+(xz).toLong*lg44.zx+(xw).toLong*lg44.wx; val xy0 = (xx).toLong*lg44.xy+(xy).toLong*lg44.yy+(xz).toLong*lg44.zy+(xw).toLong*lg44.wy; val xz0 = (xx).toLong*lg44.xz+(xy).toLong*lg44.yz+(xz).toLong*lg44.zz+(xw).toLong*lg44.wz; val xw0 = (xx).toLong*lg44.xw+(xy).toLong*lg44.yw+(xz).toLong*lg44.zw+(xw).toLong*lg44.ww; val yx0 = (yx).toLong*lg44.xx+(yy).toLong*lg44.yx+(yz).toLong*lg44.zx+(yw).toLong*lg44.wx; val yy0 = (yx).toLong*lg44.xy+(yy).toLong*lg44.yy+(yz).toLong*lg44.zy+(yw).toLong*lg44.wy; val yz0 = (yx).toLong*lg44.xz+(yy).toLong*lg44.yz+(yz).toLong*lg44.zz+(yw).toLong*lg44.wz; val yw0 = (yx).toLong*lg44.xw+(yy).toLong*lg44.yw+(yz).toLong*lg44.zw+(yw).toLong*lg44.ww; val zx0 = (zx).toLong*lg44.xx+(zy).toLong*lg44.yx+(zz).toLong*lg44.zx+(zw).toLong*lg44.wx; val zy0 = (zx).toLong*lg44.xy+(zy).toLong*lg44.yy+(zz).toLong*lg44.zy+(zw).toLong*lg44.wy; val zz0 = (zx).toLong*lg44.xz+(zy).toLong*lg44.yz+(zz).toLong*lg44.zz+(zw).toLong*lg44.wz; val zw0 = (zx).toLong*lg44.xw+(zy).toLong*lg44.yw+(zz).toLong*lg44.zw+(zw).toLong*lg44.ww; val wx0 = (wx).toLong*lg44.xx+(wy).toLong*lg44.yx+(wz).toLong*lg44.zx+(ww).toLong*lg44.wx; val wy0 = (wx).toLong*lg44.xy+(wy).toLong*lg44.yy+(wz).toLong*lg44.zy+(ww).toLong*lg44.wy; val wz0 = (wx).toLong*lg44.xz+(wy).toLong*lg44.yz+(wz).toLong*lg44.zz+(ww).toLong*lg44.wz; val ww0 = (wx).toLong*lg44.xw+(wy).toLong*lg44.yw+(wz).toLong*lg44.zw+(ww).toLong*lg44.ww; xx = (xx0).toShort; xy = (xy0).toShort; xz = (xz0).toShort; xw = (xw0).toShort; yx = (yx0).toShort; yy = (yy0).toShort; yz = (yz0).toShort; yw = (yw0).toShort; zx = (zx0).toShort; zy = (zy0).toShort; zz = (zz0).toShort; zw = (zw0).toShort; wx = (wx0).toShort; wy = (wy0).toShort; wz = (wz0).toShort; ww = (ww0).toShort; this }
    def **~~(fg44: GMat4F) = {val xx0 = (xx).toFloat*fg44.xx+(xy).toFloat*fg44.yx+(xz).toFloat*fg44.zx+(xw).toFloat*fg44.wx; val xy0 = (xx).toFloat*fg44.xy+(xy).toFloat*fg44.yy+(xz).toFloat*fg44.zy+(xw).toFloat*fg44.wy; val xz0 = (xx).toFloat*fg44.xz+(xy).toFloat*fg44.yz+(xz).toFloat*fg44.zz+(xw).toFloat*fg44.wz; val xw0 = (xx).toFloat*fg44.xw+(xy).toFloat*fg44.yw+(xz).toFloat*fg44.zw+(xw).toFloat*fg44.ww; val yx0 = (yx).toFloat*fg44.xx+(yy).toFloat*fg44.yx+(yz).toFloat*fg44.zx+(yw).toFloat*fg44.wx; val yy0 = (yx).toFloat*fg44.xy+(yy).toFloat*fg44.yy+(yz).toFloat*fg44.zy+(yw).toFloat*fg44.wy; val yz0 = (yx).toFloat*fg44.xz+(yy).toFloat*fg44.yz+(yz).toFloat*fg44.zz+(yw).toFloat*fg44.wz; val yw0 = (yx).toFloat*fg44.xw+(yy).toFloat*fg44.yw+(yz).toFloat*fg44.zw+(yw).toFloat*fg44.ww; val zx0 = (zx).toFloat*fg44.xx+(zy).toFloat*fg44.yx+(zz).toFloat*fg44.zx+(zw).toFloat*fg44.wx; val zy0 = (zx).toFloat*fg44.xy+(zy).toFloat*fg44.yy+(zz).toFloat*fg44.zy+(zw).toFloat*fg44.wy; val zz0 = (zx).toFloat*fg44.xz+(zy).toFloat*fg44.yz+(zz).toFloat*fg44.zz+(zw).toFloat*fg44.wz; val zw0 = (zx).toFloat*fg44.xw+(zy).toFloat*fg44.yw+(zz).toFloat*fg44.zw+(zw).toFloat*fg44.ww; val wx0 = (wx).toFloat*fg44.xx+(wy).toFloat*fg44.yx+(wz).toFloat*fg44.zx+(ww).toFloat*fg44.wx; val wy0 = (wx).toFloat*fg44.xy+(wy).toFloat*fg44.yy+(wz).toFloat*fg44.zy+(ww).toFloat*fg44.wy; val wz0 = (wx).toFloat*fg44.xz+(wy).toFloat*fg44.yz+(wz).toFloat*fg44.zz+(ww).toFloat*fg44.wz; val ww0 = (wx).toFloat*fg44.xw+(wy).toFloat*fg44.yw+(wz).toFloat*fg44.zw+(ww).toFloat*fg44.ww; xx = (math.round(xx0)).toShort; xy = (math.round(xy0)).toShort; xz = (math.round(xz0)).toShort; xw = (math.round(xw0)).toShort; yx = (math.round(yx0)).toShort; yy = (math.round(yy0)).toShort; yz = (math.round(yz0)).toShort; yw = (math.round(yw0)).toShort; zx = (math.round(zx0)).toShort; zy = (math.round(zy0)).toShort; zz = (math.round(zz0)).toShort; zw = (math.round(zw0)).toShort; wx = (math.round(wx0)).toShort; wy = (math.round(wy0)).toShort; wz = (math.round(wz0)).toShort; ww = (math.round(ww0)).toShort; this }
    def **~~(dg44: GMat4D) = {val xx0 = (xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx; val xy0 = (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy; val xz0 = (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz; val xw0 = (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww; val yx0 = (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx; val yy0 = (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy; val yz0 = (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz; val yw0 = (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww; val zx0 = (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx; val zy0 = (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy; val zz0 = (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz; val zw0 = (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww; val wx0 = (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx; val wy0 = (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy; val wz0 = (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz; val ww0 = (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww; xx = (math.round(xx0)).toShort; xy = (math.round(xy0)).toShort; xz = (math.round(xz0)).toShort; xw = (math.round(xw0)).toShort; yx = (math.round(yx0)).toShort; yy = (math.round(yy0)).toShort; yz = (math.round(yz0)).toShort; yw = (math.round(yw0)).toShort; zx = (math.round(zx0)).toShort; zy = (math.round(zy0)).toShort; zz = (math.round(zz0)).toShort; zw = (math.round(zw0)).toShort; wx = (math.round(wx0)).toShort; wy = (math.round(wy0)).toShort; wz = (math.round(wz0)).toShort; ww = (math.round(ww0)).toShort; this }
    class RowViewX extends AVec4S { def x = xx; def x_=(x0: Short) { xx = x0 }; def y = xy; def y_=(x0: Short) { xy = x0 }; def z = xz; def z_=(x0: Short) { xz = x0 }; def w = xw; def w_=(x0: Short) { xw = x0 } }
    class ColViewX extends AVec4S { def x = xx; def x_=(x0: Short) { xx = x0 }; def y = yx; def y_=(x0: Short) { yx = x0 }; def z = zx; def z_=(x0: Short) { zx = x0 }; def w = wx; def w_=(x0: Short) { wx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec4S { def x = yx; def x_=(x0: Short) { yx = x0 }; def y = yy; def y_=(x0: Short) { yy = x0 }; def z = yz; def z_=(x0: Short) { yz = x0 }; def w = yw; def w_=(x0: Short) { yw = x0 } }
    class ColViewY extends AVec4S { def x = xy; def x_=(x0: Short) { xy = x0 }; def y = yy; def y_=(x0: Short) { yy = x0 }; def z = zy; def z_=(x0: Short) { zy = x0 }; def w = wy; def w_=(x0: Short) { wy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec4S { def x = zx; def x_=(x0: Short) { zx = x0 }; def y = zy; def y_=(x0: Short) { zy = x0 }; def z = zz; def z_=(x0: Short) { zz = x0 }; def w = zw; def w_=(x0: Short) { zw = x0 } }
    class ColViewZ extends AVec4S { def x = xz; def x_=(x0: Short) { xz = x0 }; def y = yz; def y_=(x0: Short) { yz = x0 }; def z = zz; def z_=(x0: Short) { zz = x0 }; def w = wz; def w_=(x0: Short) { wz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    class RowViewW extends AVec4S { def x = wx; def x_=(x0: Short) { wx = x0 }; def y = wy; def y_=(x0: Short) { wy = x0 }; def z = wz; def z_=(x0: Short) { wz = x0 }; def w = ww; def w_=(x0: Short) { ww = x0 } }
    class ColViewW extends AVec4S { def x = xw; def x_=(x0: Short) { xw = x0 }; def y = yw; def y_=(x0: Short) { yw = x0 }; def z = zw; def z_=(x0: Short) { zw = x0 }; def w = ww; def w_=(x0: Short) { ww = x0 } }
    def wRowView = new RowViewW
    def wColView = new ColViewW
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = xw; xw = wx; wx = temp; temp = yz; yz = zy; zy = temp; temp = yw; yw = wy; wy = temp; temp = zw; zw = wz; wz = temp; this }
  } // class AMat4S

  object AMat4S {
    def apply(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): AMat4S = new MMat4S(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): AMat4S = IMat4S.parse(str).mut
    def identity: AMat4S = MMat4S.identity
    def zero: AMat4S = MMat4S.zero
    def traced(sg4: GVec4S) = new MMat4S(sg4.x, 0, 0, 0, 0, sg4.y, 0, 0, 0, 0, sg4.z, 0, 0, 0, 0, sg4.w)
  } // object AMat4S


  abstract class AMat4I extends GMat4I {
    def xx_=(xx0: Int): Unit
    def xy_=(xy0: Int): Unit
    def xz_=(xz0: Int): Unit
    def xw_=(xw0: Int): Unit
    def yx_=(yx0: Int): Unit
    def yy_=(yy0: Int): Unit
    def yz_=(yz0: Int): Unit
    def yw_=(yw0: Int): Unit
    def zx_=(zx0: Int): Unit
    def zy_=(zy0: Int): Unit
    def zz_=(zz0: Int): Unit
    def zw_=(zw0: Int): Unit
    def wx_=(wx0: Int): Unit
    def wy_=(wy0: Int): Unit
    def wz_=(wz0: Int): Unit
    def ww_=(ww0: Int): Unit
    override def clone(): AMat4I = new MMat4I(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: AMat4S = new MMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, xw0: Int = xw, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, yw0: Int = yw, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz, zw0: Int = zw, wx0: Int = wx, wy0: Int = wy, wz0: Int = wz, ww0: Int = ww): AMat4I = new MMat4I(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: AMat3I = new MMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapEq(fun: Int => Int): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); xw = fun(xw); yx = fun(yx); yy = fun(yy); yz = fun(yz); yw = fun(yw); zx = fun(zx); zy = fun(zy); zz = fun(zz); zw = fun(zw); wx = fun(wx); wy = fun(wy); wz = fun(wz); ww = fun(ww); this }
    override def toL: AMat4L = new MMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: AMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: AMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; xw = -xw; yx = -yx; yy = -yy; yz = -yz; yw = -yw; zx = -zx; zy = -zy; zz = -zz; zw = -zw; wx = -wx; wy = -wy; wz = -wz; ww = -ww; this }
    def :~(x0: Int): this.type = { xx = x0; xy = x0; xz = x0; xw = x0; yx = x0; yy = x0; yz = x0; yw = x0; zx = x0; zy = x0; zz = x0; zw = x0; wx = x0; wy = x0; wz = x0; ww = x0; this }
    def :~~(x0: Long): this.type = { xx = (x0).toInt; xy = (x0).toInt; xz = (x0).toInt; xw = (x0).toInt; yx = (x0).toInt; yy = (x0).toInt; yz = (x0).toInt; yw = (x0).toInt; zx = (x0).toInt; zy = (x0).toInt; zz = (x0).toInt; zw = (x0).toInt; wx = (x0).toInt; wy = (x0).toInt; wz = (x0).toInt; ww = (x0).toInt; this }
    def :~~(x0: Float): this.type = { xx = math.round(x0); xy = math.round(x0); xz = math.round(x0); xw = math.round(x0); yx = math.round(x0); yy = math.round(x0); yz = math.round(x0); yw = math.round(x0); zx = math.round(x0); zy = math.round(x0); zz = math.round(x0); zw = math.round(x0); wx = math.round(x0); wy = math.round(x0); wz = math.round(x0); ww = math.round(x0); this }
    def :~~(x0: Double): this.type = { xx = (math.round(x0)).toInt; xy = (math.round(x0)).toInt; xz = (math.round(x0)).toInt; xw = (math.round(x0)).toInt; yx = (math.round(x0)).toInt; yy = (math.round(x0)).toInt; yz = (math.round(x0)).toInt; yw = (math.round(x0)).toInt; zx = (math.round(x0)).toInt; zy = (math.round(x0)).toInt; zz = (math.round(x0)).toInt; zw = (math.round(x0)).toInt; wx = (math.round(x0)).toInt; wy = (math.round(x0)).toInt; wz = (math.round(x0)).toInt; ww = (math.round(x0)).toInt; this }
    def :~(sg44: GMat4S): this.type = { xx = (sg44.xx).toInt; xy = (sg44.xy).toInt; xz = (sg44.xz).toInt; xw = (sg44.xw).toInt; yx = (sg44.yx).toInt; yy = (sg44.yy).toInt; yz = (sg44.yz).toInt; yw = (sg44.yw).toInt; zx = (sg44.zx).toInt; zy = (sg44.zy).toInt; zz = (sg44.zz).toInt; zw = (sg44.zw).toInt; wx = (sg44.wx).toInt; wy = (sg44.wy).toInt; wz = (sg44.wz).toInt; ww = (sg44.ww).toInt; this }
    def :~(ig44: GMat4I): this.type = { xx = ig44.xx; xy = ig44.xy; xz = ig44.xz; xw = ig44.xw; yx = ig44.yx; yy = ig44.yy; yz = ig44.yz; yw = ig44.yw; zx = ig44.zx; zy = ig44.zy; zz = ig44.zz; zw = ig44.zw; wx = ig44.wx; wy = ig44.wy; wz = ig44.wz; ww = ig44.ww; this }
    def :~(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): this.type = { xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def :~~(lg44: GMat4L): this.type = { xx = (lg44.xx).toInt; xy = (lg44.xy).toInt; xz = (lg44.xz).toInt; xw = (lg44.xw).toInt; yx = (lg44.yx).toInt; yy = (lg44.yy).toInt; yz = (lg44.yz).toInt; yw = (lg44.yw).toInt; zx = (lg44.zx).toInt; zy = (lg44.zy).toInt; zz = (lg44.zz).toInt; zw = (lg44.zw).toInt; wx = (lg44.wx).toInt; wy = (lg44.wy).toInt; wz = (lg44.wz).toInt; ww = (lg44.ww).toInt; this }
    def :~~(fg44: GMat4F): this.type = { xx = math.round(fg44.xx); xy = math.round(fg44.xy); xz = math.round(fg44.xz); xw = math.round(fg44.xw); yx = math.round(fg44.yx); yy = math.round(fg44.yy); yz = math.round(fg44.yz); yw = math.round(fg44.yw); zx = math.round(fg44.zx); zy = math.round(fg44.zy); zz = math.round(fg44.zz); zw = math.round(fg44.zw); wx = math.round(fg44.wx); wy = math.round(fg44.wy); wz = math.round(fg44.wz); ww = math.round(fg44.ww); this }
    def :~~(dg44: GMat4D): this.type = { xx = (math.round(dg44.xx)).toInt; xy = (math.round(dg44.xy)).toInt; xz = (math.round(dg44.xz)).toInt; xw = (math.round(dg44.xw)).toInt; yx = (math.round(dg44.yx)).toInt; yy = (math.round(dg44.yy)).toInt; yz = (math.round(dg44.yz)).toInt; yw = (math.round(dg44.yw)).toInt; zx = (math.round(dg44.zx)).toInt; zy = (math.round(dg44.zy)).toInt; zz = (math.round(dg44.zz)).toInt; zw = (math.round(dg44.zw)).toInt; wx = (math.round(dg44.wx)).toInt; wy = (math.round(dg44.wy)).toInt; wz = (math.round(dg44.wz)).toInt; ww = (math.round(dg44.ww)).toInt; this }
    def +~(x0: Int): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; xw = xw + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; yw = yw + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; zw = zw + x0; wx = wx + x0; wy = wy + x0; wz = wz + x0; ww = ww + x0; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toLong + x0).toInt; xy = ((xy).toLong + x0).toInt; xz = ((xz).toLong + x0).toInt; xw = ((xw).toLong + x0).toInt; yx = ((yx).toLong + x0).toInt; yy = ((yy).toLong + x0).toInt; yz = ((yz).toLong + x0).toInt; yw = ((yw).toLong + x0).toInt; zx = ((zx).toLong + x0).toInt; zy = ((zy).toLong + x0).toInt; zz = ((zz).toLong + x0).toInt; zw = ((zw).toLong + x0).toInt; wx = ((wx).toLong + x0).toInt; wy = ((wy).toLong + x0).toInt; wz = ((wz).toLong + x0).toInt; ww = ((ww).toLong + x0).toInt; this }
    def +~~(x0: Float): this.type = { xx = math.round((xx).toFloat + x0); xy = math.round((xy).toFloat + x0); xz = math.round((xz).toFloat + x0); xw = math.round((xw).toFloat + x0); yx = math.round((yx).toFloat + x0); yy = math.round((yy).toFloat + x0); yz = math.round((yz).toFloat + x0); yw = math.round((yw).toFloat + x0); zx = math.round((zx).toFloat + x0); zy = math.round((zy).toFloat + x0); zz = math.round((zz).toFloat + x0); zw = math.round((zw).toFloat + x0); wx = math.round((wx).toFloat + x0); wy = math.round((wy).toFloat + x0); wz = math.round((wz).toFloat + x0); ww = math.round((ww).toFloat + x0); this }
    def +~~(x0: Double): this.type = { xx = (math.round((xx).toDouble + x0)).toInt; xy = (math.round((xy).toDouble + x0)).toInt; xz = (math.round((xz).toDouble + x0)).toInt; xw = (math.round((xw).toDouble + x0)).toInt; yx = (math.round((yx).toDouble + x0)).toInt; yy = (math.round((yy).toDouble + x0)).toInt; yz = (math.round((yz).toDouble + x0)).toInt; yw = (math.round((yw).toDouble + x0)).toInt; zx = (math.round((zx).toDouble + x0)).toInt; zy = (math.round((zy).toDouble + x0)).toInt; zz = (math.round((zz).toDouble + x0)).toInt; zw = (math.round((zw).toDouble + x0)).toInt; wx = (math.round((wx).toDouble + x0)).toInt; wy = (math.round((wy).toDouble + x0)).toInt; wz = (math.round((wz).toDouble + x0)).toInt; ww = (math.round((ww).toDouble + x0)).toInt; this }
    def +~(sg44: GMat4S): this.type = { xx = xx + (sg44.xx).toInt; xy = xy + (sg44.xy).toInt; xz = xz + (sg44.xz).toInt; xw = xw + (sg44.xw).toInt; yx = yx + (sg44.yx).toInt; yy = yy + (sg44.yy).toInt; yz = yz + (sg44.yz).toInt; yw = yw + (sg44.yw).toInt; zx = zx + (sg44.zx).toInt; zy = zy + (sg44.zy).toInt; zz = zz + (sg44.zz).toInt; zw = zw + (sg44.zw).toInt; wx = wx + (sg44.wx).toInt; wy = wy + (sg44.wy).toInt; wz = wz + (sg44.wz).toInt; ww = ww + (sg44.ww).toInt; this }
    def +~(ig44: GMat4I): this.type = { xx = xx + ig44.xx; xy = xy + ig44.xy; xz = xz + ig44.xz; xw = xw + ig44.xw; yx = yx + ig44.yx; yy = yy + ig44.yy; yz = yz + ig44.yz; yw = yw + ig44.yw; zx = zx + ig44.zx; zy = zy + ig44.zy; zz = zz + ig44.zz; zw = zw + ig44.zw; wx = wx + ig44.wx; wy = wy + ig44.wy; wz = wz + ig44.wz; ww = ww + ig44.ww; this }
    def +~(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; xw = xw + xw0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; yw = yw + yw0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; zw = zw + zw0; wx = wx + wx0; wy = wy + wy0; wz = wz + wz0; ww = ww + ww0; this }
    def +~~(lg44: GMat4L): this.type = { xx = ((xx).toLong + lg44.xx).toInt; xy = ((xy).toLong + lg44.xy).toInt; xz = ((xz).toLong + lg44.xz).toInt; xw = ((xw).toLong + lg44.xw).toInt; yx = ((yx).toLong + lg44.yx).toInt; yy = ((yy).toLong + lg44.yy).toInt; yz = ((yz).toLong + lg44.yz).toInt; yw = ((yw).toLong + lg44.yw).toInt; zx = ((zx).toLong + lg44.zx).toInt; zy = ((zy).toLong + lg44.zy).toInt; zz = ((zz).toLong + lg44.zz).toInt; zw = ((zw).toLong + lg44.zw).toInt; wx = ((wx).toLong + lg44.wx).toInt; wy = ((wy).toLong + lg44.wy).toInt; wz = ((wz).toLong + lg44.wz).toInt; ww = ((ww).toLong + lg44.ww).toInt; this }
    def +~~(fg44: GMat4F): this.type = { xx = math.round((xx).toFloat + fg44.xx); xy = math.round((xy).toFloat + fg44.xy); xz = math.round((xz).toFloat + fg44.xz); xw = math.round((xw).toFloat + fg44.xw); yx = math.round((yx).toFloat + fg44.yx); yy = math.round((yy).toFloat + fg44.yy); yz = math.round((yz).toFloat + fg44.yz); yw = math.round((yw).toFloat + fg44.yw); zx = math.round((zx).toFloat + fg44.zx); zy = math.round((zy).toFloat + fg44.zy); zz = math.round((zz).toFloat + fg44.zz); zw = math.round((zw).toFloat + fg44.zw); wx = math.round((wx).toFloat + fg44.wx); wy = math.round((wy).toFloat + fg44.wy); wz = math.round((wz).toFloat + fg44.wz); ww = math.round((ww).toFloat + fg44.ww); this }
    def +~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble + dg44.xx)).toInt; xy = (math.round((xy).toDouble + dg44.xy)).toInt; xz = (math.round((xz).toDouble + dg44.xz)).toInt; xw = (math.round((xw).toDouble + dg44.xw)).toInt; yx = (math.round((yx).toDouble + dg44.yx)).toInt; yy = (math.round((yy).toDouble + dg44.yy)).toInt; yz = (math.round((yz).toDouble + dg44.yz)).toInt; yw = (math.round((yw).toDouble + dg44.yw)).toInt; zx = (math.round((zx).toDouble + dg44.zx)).toInt; zy = (math.round((zy).toDouble + dg44.zy)).toInt; zz = (math.round((zz).toDouble + dg44.zz)).toInt; zw = (math.round((zw).toDouble + dg44.zw)).toInt; wx = (math.round((wx).toDouble + dg44.wx)).toInt; wy = (math.round((wy).toDouble + dg44.wy)).toInt; wz = (math.round((wz).toDouble + dg44.wz)).toInt; ww = (math.round((ww).toDouble + dg44.ww)).toInt; this }
    def -~(x0: Int): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; xw = xw - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; yw = yw - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; zw = zw - x0; wx = wx - x0; wy = wy - x0; wz = wz - x0; ww = ww - x0; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toLong - x0).toInt; xy = ((xy).toLong - x0).toInt; xz = ((xz).toLong - x0).toInt; xw = ((xw).toLong - x0).toInt; yx = ((yx).toLong - x0).toInt; yy = ((yy).toLong - x0).toInt; yz = ((yz).toLong - x0).toInt; yw = ((yw).toLong - x0).toInt; zx = ((zx).toLong - x0).toInt; zy = ((zy).toLong - x0).toInt; zz = ((zz).toLong - x0).toInt; zw = ((zw).toLong - x0).toInt; wx = ((wx).toLong - x0).toInt; wy = ((wy).toLong - x0).toInt; wz = ((wz).toLong - x0).toInt; ww = ((ww).toLong - x0).toInt; this }
    def -~~(x0: Float): this.type = { xx = math.round((xx).toFloat - x0); xy = math.round((xy).toFloat - x0); xz = math.round((xz).toFloat - x0); xw = math.round((xw).toFloat - x0); yx = math.round((yx).toFloat - x0); yy = math.round((yy).toFloat - x0); yz = math.round((yz).toFloat - x0); yw = math.round((yw).toFloat - x0); zx = math.round((zx).toFloat - x0); zy = math.round((zy).toFloat - x0); zz = math.round((zz).toFloat - x0); zw = math.round((zw).toFloat - x0); wx = math.round((wx).toFloat - x0); wy = math.round((wy).toFloat - x0); wz = math.round((wz).toFloat - x0); ww = math.round((ww).toFloat - x0); this }
    def -~~(x0: Double): this.type = { xx = (math.round((xx).toDouble - x0)).toInt; xy = (math.round((xy).toDouble - x0)).toInt; xz = (math.round((xz).toDouble - x0)).toInt; xw = (math.round((xw).toDouble - x0)).toInt; yx = (math.round((yx).toDouble - x0)).toInt; yy = (math.round((yy).toDouble - x0)).toInt; yz = (math.round((yz).toDouble - x0)).toInt; yw = (math.round((yw).toDouble - x0)).toInt; zx = (math.round((zx).toDouble - x0)).toInt; zy = (math.round((zy).toDouble - x0)).toInt; zz = (math.round((zz).toDouble - x0)).toInt; zw = (math.round((zw).toDouble - x0)).toInt; wx = (math.round((wx).toDouble - x0)).toInt; wy = (math.round((wy).toDouble - x0)).toInt; wz = (math.round((wz).toDouble - x0)).toInt; ww = (math.round((ww).toDouble - x0)).toInt; this }
    def -~(sg44: GMat4S): this.type = { xx = xx - (sg44.xx).toInt; xy = xy - (sg44.xy).toInt; xz = xz - (sg44.xz).toInt; xw = xw - (sg44.xw).toInt; yx = yx - (sg44.yx).toInt; yy = yy - (sg44.yy).toInt; yz = yz - (sg44.yz).toInt; yw = yw - (sg44.yw).toInt; zx = zx - (sg44.zx).toInt; zy = zy - (sg44.zy).toInt; zz = zz - (sg44.zz).toInt; zw = zw - (sg44.zw).toInt; wx = wx - (sg44.wx).toInt; wy = wy - (sg44.wy).toInt; wz = wz - (sg44.wz).toInt; ww = ww - (sg44.ww).toInt; this }
    def -~(ig44: GMat4I): this.type = { xx = xx - ig44.xx; xy = xy - ig44.xy; xz = xz - ig44.xz; xw = xw - ig44.xw; yx = yx - ig44.yx; yy = yy - ig44.yy; yz = yz - ig44.yz; yw = yw - ig44.yw; zx = zx - ig44.zx; zy = zy - ig44.zy; zz = zz - ig44.zz; zw = zw - ig44.zw; wx = wx - ig44.wx; wy = wy - ig44.wy; wz = wz - ig44.wz; ww = ww - ig44.ww; this }
    def -~(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; xw = xw - xw0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; yw = yw - yw0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; zw = zw - zw0; wx = wx - wx0; wy = wy - wy0; wz = wz - wz0; ww = ww - ww0; this }
    def -~~(lg44: GMat4L): this.type = { xx = ((xx).toLong - lg44.xx).toInt; xy = ((xy).toLong - lg44.xy).toInt; xz = ((xz).toLong - lg44.xz).toInt; xw = ((xw).toLong - lg44.xw).toInt; yx = ((yx).toLong - lg44.yx).toInt; yy = ((yy).toLong - lg44.yy).toInt; yz = ((yz).toLong - lg44.yz).toInt; yw = ((yw).toLong - lg44.yw).toInt; zx = ((zx).toLong - lg44.zx).toInt; zy = ((zy).toLong - lg44.zy).toInt; zz = ((zz).toLong - lg44.zz).toInt; zw = ((zw).toLong - lg44.zw).toInt; wx = ((wx).toLong - lg44.wx).toInt; wy = ((wy).toLong - lg44.wy).toInt; wz = ((wz).toLong - lg44.wz).toInt; ww = ((ww).toLong - lg44.ww).toInt; this }
    def -~~(fg44: GMat4F): this.type = { xx = math.round((xx).toFloat - fg44.xx); xy = math.round((xy).toFloat - fg44.xy); xz = math.round((xz).toFloat - fg44.xz); xw = math.round((xw).toFloat - fg44.xw); yx = math.round((yx).toFloat - fg44.yx); yy = math.round((yy).toFloat - fg44.yy); yz = math.round((yz).toFloat - fg44.yz); yw = math.round((yw).toFloat - fg44.yw); zx = math.round((zx).toFloat - fg44.zx); zy = math.round((zy).toFloat - fg44.zy); zz = math.round((zz).toFloat - fg44.zz); zw = math.round((zw).toFloat - fg44.zw); wx = math.round((wx).toFloat - fg44.wx); wy = math.round((wy).toFloat - fg44.wy); wz = math.round((wz).toFloat - fg44.wz); ww = math.round((ww).toFloat - fg44.ww); this }
    def -~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble - dg44.xx)).toInt; xy = (math.round((xy).toDouble - dg44.xy)).toInt; xz = (math.round((xz).toDouble - dg44.xz)).toInt; xw = (math.round((xw).toDouble - dg44.xw)).toInt; yx = (math.round((yx).toDouble - dg44.yx)).toInt; yy = (math.round((yy).toDouble - dg44.yy)).toInt; yz = (math.round((yz).toDouble - dg44.yz)).toInt; yw = (math.round((yw).toDouble - dg44.yw)).toInt; zx = (math.round((zx).toDouble - dg44.zx)).toInt; zy = (math.round((zy).toDouble - dg44.zy)).toInt; zz = (math.round((zz).toDouble - dg44.zz)).toInt; zw = (math.round((zw).toDouble - dg44.zw)).toInt; wx = (math.round((wx).toDouble - dg44.wx)).toInt; wy = (math.round((wy).toDouble - dg44.wy)).toInt; wz = (math.round((wz).toDouble - dg44.wz)).toInt; ww = (math.round((ww).toDouble - dg44.ww)).toInt; this }
    def *~(x0: Int): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; xw = xw * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; yw = yw * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; zw = zw * x0; wx = wx * x0; wy = wy * x0; wz = wz * x0; ww = ww * x0; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toLong * x0).toInt; xy = ((xy).toLong * x0).toInt; xz = ((xz).toLong * x0).toInt; xw = ((xw).toLong * x0).toInt; yx = ((yx).toLong * x0).toInt; yy = ((yy).toLong * x0).toInt; yz = ((yz).toLong * x0).toInt; yw = ((yw).toLong * x0).toInt; zx = ((zx).toLong * x0).toInt; zy = ((zy).toLong * x0).toInt; zz = ((zz).toLong * x0).toInt; zw = ((zw).toLong * x0).toInt; wx = ((wx).toLong * x0).toInt; wy = ((wy).toLong * x0).toInt; wz = ((wz).toLong * x0).toInt; ww = ((ww).toLong * x0).toInt; this }
    def *~~(x0: Float): this.type = { xx = math.round((xx).toFloat * x0); xy = math.round((xy).toFloat * x0); xz = math.round((xz).toFloat * x0); xw = math.round((xw).toFloat * x0); yx = math.round((yx).toFloat * x0); yy = math.round((yy).toFloat * x0); yz = math.round((yz).toFloat * x0); yw = math.round((yw).toFloat * x0); zx = math.round((zx).toFloat * x0); zy = math.round((zy).toFloat * x0); zz = math.round((zz).toFloat * x0); zw = math.round((zw).toFloat * x0); wx = math.round((wx).toFloat * x0); wy = math.round((wy).toFloat * x0); wz = math.round((wz).toFloat * x0); ww = math.round((ww).toFloat * x0); this }
    def *~~(x0: Double): this.type = { xx = (math.round((xx).toDouble * x0)).toInt; xy = (math.round((xy).toDouble * x0)).toInt; xz = (math.round((xz).toDouble * x0)).toInt; xw = (math.round((xw).toDouble * x0)).toInt; yx = (math.round((yx).toDouble * x0)).toInt; yy = (math.round((yy).toDouble * x0)).toInt; yz = (math.round((yz).toDouble * x0)).toInt; yw = (math.round((yw).toDouble * x0)).toInt; zx = (math.round((zx).toDouble * x0)).toInt; zy = (math.round((zy).toDouble * x0)).toInt; zz = (math.round((zz).toDouble * x0)).toInt; zw = (math.round((zw).toDouble * x0)).toInt; wx = (math.round((wx).toDouble * x0)).toInt; wy = (math.round((wy).toDouble * x0)).toInt; wz = (math.round((wz).toDouble * x0)).toInt; ww = (math.round((ww).toDouble * x0)).toInt; this }
    def *~(sg44: GMat4S): this.type = { xx = xx * (sg44.xx).toInt; xy = xy * (sg44.xy).toInt; xz = xz * (sg44.xz).toInt; xw = xw * (sg44.xw).toInt; yx = yx * (sg44.yx).toInt; yy = yy * (sg44.yy).toInt; yz = yz * (sg44.yz).toInt; yw = yw * (sg44.yw).toInt; zx = zx * (sg44.zx).toInt; zy = zy * (sg44.zy).toInt; zz = zz * (sg44.zz).toInt; zw = zw * (sg44.zw).toInt; wx = wx * (sg44.wx).toInt; wy = wy * (sg44.wy).toInt; wz = wz * (sg44.wz).toInt; ww = ww * (sg44.ww).toInt; this }
    def *~(ig44: GMat4I): this.type = { xx = xx * ig44.xx; xy = xy * ig44.xy; xz = xz * ig44.xz; xw = xw * ig44.xw; yx = yx * ig44.yx; yy = yy * ig44.yy; yz = yz * ig44.yz; yw = yw * ig44.yw; zx = zx * ig44.zx; zy = zy * ig44.zy; zz = zz * ig44.zz; zw = zw * ig44.zw; wx = wx * ig44.wx; wy = wy * ig44.wy; wz = wz * ig44.wz; ww = ww * ig44.ww; this }
    def *~(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; xw = xw * xw0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; yw = yw * yw0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; zw = zw * zw0; wx = wx * wx0; wy = wy * wy0; wz = wz * wz0; ww = ww * ww0; this }
    def *~~(lg44: GMat4L): this.type = { xx = ((xx).toLong * lg44.xx).toInt; xy = ((xy).toLong * lg44.xy).toInt; xz = ((xz).toLong * lg44.xz).toInt; xw = ((xw).toLong * lg44.xw).toInt; yx = ((yx).toLong * lg44.yx).toInt; yy = ((yy).toLong * lg44.yy).toInt; yz = ((yz).toLong * lg44.yz).toInt; yw = ((yw).toLong * lg44.yw).toInt; zx = ((zx).toLong * lg44.zx).toInt; zy = ((zy).toLong * lg44.zy).toInt; zz = ((zz).toLong * lg44.zz).toInt; zw = ((zw).toLong * lg44.zw).toInt; wx = ((wx).toLong * lg44.wx).toInt; wy = ((wy).toLong * lg44.wy).toInt; wz = ((wz).toLong * lg44.wz).toInt; ww = ((ww).toLong * lg44.ww).toInt; this }
    def *~~(fg44: GMat4F): this.type = { xx = math.round((xx).toFloat * fg44.xx); xy = math.round((xy).toFloat * fg44.xy); xz = math.round((xz).toFloat * fg44.xz); xw = math.round((xw).toFloat * fg44.xw); yx = math.round((yx).toFloat * fg44.yx); yy = math.round((yy).toFloat * fg44.yy); yz = math.round((yz).toFloat * fg44.yz); yw = math.round((yw).toFloat * fg44.yw); zx = math.round((zx).toFloat * fg44.zx); zy = math.round((zy).toFloat * fg44.zy); zz = math.round((zz).toFloat * fg44.zz); zw = math.round((zw).toFloat * fg44.zw); wx = math.round((wx).toFloat * fg44.wx); wy = math.round((wy).toFloat * fg44.wy); wz = math.round((wz).toFloat * fg44.wz); ww = math.round((ww).toFloat * fg44.ww); this }
    def *~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble * dg44.xx)).toInt; xy = (math.round((xy).toDouble * dg44.xy)).toInt; xz = (math.round((xz).toDouble * dg44.xz)).toInt; xw = (math.round((xw).toDouble * dg44.xw)).toInt; yx = (math.round((yx).toDouble * dg44.yx)).toInt; yy = (math.round((yy).toDouble * dg44.yy)).toInt; yz = (math.round((yz).toDouble * dg44.yz)).toInt; yw = (math.round((yw).toDouble * dg44.yw)).toInt; zx = (math.round((zx).toDouble * dg44.zx)).toInt; zy = (math.round((zy).toDouble * dg44.zy)).toInt; zz = (math.round((zz).toDouble * dg44.zz)).toInt; zw = (math.round((zw).toDouble * dg44.zw)).toInt; wx = (math.round((wx).toDouble * dg44.wx)).toInt; wy = (math.round((wy).toDouble * dg44.wy)).toInt; wz = (math.round((wz).toDouble * dg44.wz)).toInt; ww = (math.round((ww).toDouble * dg44.ww)).toInt; this }
    def /~(x0: Int): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; xw = xw / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; yw = yw / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; zw = zw / x0; wx = wx / x0; wy = wy / x0; wz = wz / x0; ww = ww / x0; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toLong / x0).toInt; xy = ((xy).toLong / x0).toInt; xz = ((xz).toLong / x0).toInt; xw = ((xw).toLong / x0).toInt; yx = ((yx).toLong / x0).toInt; yy = ((yy).toLong / x0).toInt; yz = ((yz).toLong / x0).toInt; yw = ((yw).toLong / x0).toInt; zx = ((zx).toLong / x0).toInt; zy = ((zy).toLong / x0).toInt; zz = ((zz).toLong / x0).toInt; zw = ((zw).toLong / x0).toInt; wx = ((wx).toLong / x0).toInt; wy = ((wy).toLong / x0).toInt; wz = ((wz).toLong / x0).toInt; ww = ((ww).toLong / x0).toInt; this }
    def /~~(x0: Float): this.type = { xx = math.round((xx).toFloat / x0); xy = math.round((xy).toFloat / x0); xz = math.round((xz).toFloat / x0); xw = math.round((xw).toFloat / x0); yx = math.round((yx).toFloat / x0); yy = math.round((yy).toFloat / x0); yz = math.round((yz).toFloat / x0); yw = math.round((yw).toFloat / x0); zx = math.round((zx).toFloat / x0); zy = math.round((zy).toFloat / x0); zz = math.round((zz).toFloat / x0); zw = math.round((zw).toFloat / x0); wx = math.round((wx).toFloat / x0); wy = math.round((wy).toFloat / x0); wz = math.round((wz).toFloat / x0); ww = math.round((ww).toFloat / x0); this }
    def /~~(x0: Double): this.type = { xx = (math.round((xx).toDouble / x0)).toInt; xy = (math.round((xy).toDouble / x0)).toInt; xz = (math.round((xz).toDouble / x0)).toInt; xw = (math.round((xw).toDouble / x0)).toInt; yx = (math.round((yx).toDouble / x0)).toInt; yy = (math.round((yy).toDouble / x0)).toInt; yz = (math.round((yz).toDouble / x0)).toInt; yw = (math.round((yw).toDouble / x0)).toInt; zx = (math.round((zx).toDouble / x0)).toInt; zy = (math.round((zy).toDouble / x0)).toInt; zz = (math.round((zz).toDouble / x0)).toInt; zw = (math.round((zw).toDouble / x0)).toInt; wx = (math.round((wx).toDouble / x0)).toInt; wy = (math.round((wy).toDouble / x0)).toInt; wz = (math.round((wz).toDouble / x0)).toInt; ww = (math.round((ww).toDouble / x0)).toInt; this }
    def /~(sg44: GMat4S): this.type = { xx = xx / (sg44.xx).toInt; xy = xy / (sg44.xy).toInt; xz = xz / (sg44.xz).toInt; xw = xw / (sg44.xw).toInt; yx = yx / (sg44.yx).toInt; yy = yy / (sg44.yy).toInt; yz = yz / (sg44.yz).toInt; yw = yw / (sg44.yw).toInt; zx = zx / (sg44.zx).toInt; zy = zy / (sg44.zy).toInt; zz = zz / (sg44.zz).toInt; zw = zw / (sg44.zw).toInt; wx = wx / (sg44.wx).toInt; wy = wy / (sg44.wy).toInt; wz = wz / (sg44.wz).toInt; ww = ww / (sg44.ww).toInt; this }
    def /~(ig44: GMat4I): this.type = { xx = xx / ig44.xx; xy = xy / ig44.xy; xz = xz / ig44.xz; xw = xw / ig44.xw; yx = yx / ig44.yx; yy = yy / ig44.yy; yz = yz / ig44.yz; yw = yw / ig44.yw; zx = zx / ig44.zx; zy = zy / ig44.zy; zz = zz / ig44.zz; zw = zw / ig44.zw; wx = wx / ig44.wx; wy = wy / ig44.wy; wz = wz / ig44.wz; ww = ww / ig44.ww; this }
    def /~(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; xw = xw / xw0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; yw = yw / yw0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; zw = zw / zw0; wx = wx / wx0; wy = wy / wy0; wz = wz / wz0; ww = ww / ww0; this }
    def /~~(lg44: GMat4L): this.type = { xx = ((xx).toLong / lg44.xx).toInt; xy = ((xy).toLong / lg44.xy).toInt; xz = ((xz).toLong / lg44.xz).toInt; xw = ((xw).toLong / lg44.xw).toInt; yx = ((yx).toLong / lg44.yx).toInt; yy = ((yy).toLong / lg44.yy).toInt; yz = ((yz).toLong / lg44.yz).toInt; yw = ((yw).toLong / lg44.yw).toInt; zx = ((zx).toLong / lg44.zx).toInt; zy = ((zy).toLong / lg44.zy).toInt; zz = ((zz).toLong / lg44.zz).toInt; zw = ((zw).toLong / lg44.zw).toInt; wx = ((wx).toLong / lg44.wx).toInt; wy = ((wy).toLong / lg44.wy).toInt; wz = ((wz).toLong / lg44.wz).toInt; ww = ((ww).toLong / lg44.ww).toInt; this }
    def /~~(fg44: GMat4F): this.type = { xx = math.round((xx).toFloat / fg44.xx); xy = math.round((xy).toFloat / fg44.xy); xz = math.round((xz).toFloat / fg44.xz); xw = math.round((xw).toFloat / fg44.xw); yx = math.round((yx).toFloat / fg44.yx); yy = math.round((yy).toFloat / fg44.yy); yz = math.round((yz).toFloat / fg44.yz); yw = math.round((yw).toFloat / fg44.yw); zx = math.round((zx).toFloat / fg44.zx); zy = math.round((zy).toFloat / fg44.zy); zz = math.round((zz).toFloat / fg44.zz); zw = math.round((zw).toFloat / fg44.zw); wx = math.round((wx).toFloat / fg44.wx); wy = math.round((wy).toFloat / fg44.wy); wz = math.round((wz).toFloat / fg44.wz); ww = math.round((ww).toFloat / fg44.ww); this }
    def /~~(dg44: GMat4D): this.type = { xx = (math.round((xx).toDouble / dg44.xx)).toInt; xy = (math.round((xy).toDouble / dg44.xy)).toInt; xz = (math.round((xz).toDouble / dg44.xz)).toInt; xw = (math.round((xw).toDouble / dg44.xw)).toInt; yx = (math.round((yx).toDouble / dg44.yx)).toInt; yy = (math.round((yy).toDouble / dg44.yy)).toInt; yz = (math.round((yz).toDouble / dg44.yz)).toInt; yw = (math.round((yw).toDouble / dg44.yw)).toInt; zx = (math.round((zx).toDouble / dg44.zx)).toInt; zy = (math.round((zy).toDouble / dg44.zy)).toInt; zz = (math.round((zz).toDouble / dg44.zz)).toInt; zw = (math.round((zw).toDouble / dg44.zw)).toInt; wx = (math.round((wx).toDouble / dg44.wx)).toInt; wy = (math.round((wy).toDouble / dg44.wy)).toInt; wz = (math.round((wz).toDouble / dg44.wz)).toInt; ww = (math.round((ww).toDouble / dg44.ww)).toInt; this }
    def maxEq(x0: Int): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); xw = math.max(xw,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); yw = math.max(yw,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); zw = math.max(zw,x0); wx = math.max(wx,x0); wy = math.max(wy,x0); wz = math.max(wz,x0); ww = math.max(ww,x0); this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toLong,x0)).toInt; xy = (math.max((xy).toLong,x0)).toInt; xz = (math.max((xz).toLong,x0)).toInt; xw = (math.max((xw).toLong,x0)).toInt; yx = (math.max((yx).toLong,x0)).toInt; yy = (math.max((yy).toLong,x0)).toInt; yz = (math.max((yz).toLong,x0)).toInt; yw = (math.max((yw).toLong,x0)).toInt; zx = (math.max((zx).toLong,x0)).toInt; zy = (math.max((zy).toLong,x0)).toInt; zz = (math.max((zz).toLong,x0)).toInt; zw = (math.max((zw).toLong,x0)).toInt; wx = (math.max((wx).toLong,x0)).toInt; wy = (math.max((wy).toLong,x0)).toInt; wz = (math.max((wz).toLong,x0)).toInt; ww = (math.max((ww).toLong,x0)).toInt; this }
    def maxEqCast(x0: Float): this.type = { xx = math.round(math.max((xx).toFloat,x0)); xy = math.round(math.max((xy).toFloat,x0)); xz = math.round(math.max((xz).toFloat,x0)); xw = math.round(math.max((xw).toFloat,x0)); yx = math.round(math.max((yx).toFloat,x0)); yy = math.round(math.max((yy).toFloat,x0)); yz = math.round(math.max((yz).toFloat,x0)); yw = math.round(math.max((yw).toFloat,x0)); zx = math.round(math.max((zx).toFloat,x0)); zy = math.round(math.max((zy).toFloat,x0)); zz = math.round(math.max((zz).toFloat,x0)); zw = math.round(math.max((zw).toFloat,x0)); wx = math.round(math.max((wx).toFloat,x0)); wy = math.round(math.max((wy).toFloat,x0)); wz = math.round(math.max((wz).toFloat,x0)); ww = math.round(math.max((ww).toFloat,x0)); this }
    def maxEqCast(x0: Double): this.type = { xx = (math.round(math.max((xx).toDouble,x0))).toInt; xy = (math.round(math.max((xy).toDouble,x0))).toInt; xz = (math.round(math.max((xz).toDouble,x0))).toInt; xw = (math.round(math.max((xw).toDouble,x0))).toInt; yx = (math.round(math.max((yx).toDouble,x0))).toInt; yy = (math.round(math.max((yy).toDouble,x0))).toInt; yz = (math.round(math.max((yz).toDouble,x0))).toInt; yw = (math.round(math.max((yw).toDouble,x0))).toInt; zx = (math.round(math.max((zx).toDouble,x0))).toInt; zy = (math.round(math.max((zy).toDouble,x0))).toInt; zz = (math.round(math.max((zz).toDouble,x0))).toInt; zw = (math.round(math.max((zw).toDouble,x0))).toInt; wx = (math.round(math.max((wx).toDouble,x0))).toInt; wy = (math.round(math.max((wy).toDouble,x0))).toInt; wz = (math.round(math.max((wz).toDouble,x0))).toInt; ww = (math.round(math.max((ww).toDouble,x0))).toInt; this }
    def maxEq(sg44: GMat4S): this.type = { xx = math.max(xx,(sg44.xx).toInt); xy = math.max(xy,(sg44.xy).toInt); xz = math.max(xz,(sg44.xz).toInt); xw = math.max(xw,(sg44.xw).toInt); yx = math.max(yx,(sg44.yx).toInt); yy = math.max(yy,(sg44.yy).toInt); yz = math.max(yz,(sg44.yz).toInt); yw = math.max(yw,(sg44.yw).toInt); zx = math.max(zx,(sg44.zx).toInt); zy = math.max(zy,(sg44.zy).toInt); zz = math.max(zz,(sg44.zz).toInt); zw = math.max(zw,(sg44.zw).toInt); wx = math.max(wx,(sg44.wx).toInt); wy = math.max(wy,(sg44.wy).toInt); wz = math.max(wz,(sg44.wz).toInt); ww = math.max(ww,(sg44.ww).toInt); this }
    def maxEq(ig44: GMat4I): this.type = { xx = math.max(xx,ig44.xx); xy = math.max(xy,ig44.xy); xz = math.max(xz,ig44.xz); xw = math.max(xw,ig44.xw); yx = math.max(yx,ig44.yx); yy = math.max(yy,ig44.yy); yz = math.max(yz,ig44.yz); yw = math.max(yw,ig44.yw); zx = math.max(zx,ig44.zx); zy = math.max(zy,ig44.zy); zz = math.max(zz,ig44.zz); zw = math.max(zw,ig44.zw); wx = math.max(wx,ig44.wx); wy = math.max(wy,ig44.wy); wz = math.max(wz,ig44.wz); ww = math.max(ww,ig44.ww); this }
    def maxEq(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); xw = math.max(xw,xw0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); yw = math.max(yw,yw0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); zw = math.max(zw,zw0); wx = math.max(wx,wx0); wy = math.max(wy,wy0); wz = math.max(wz,wz0); ww = math.max(ww,ww0); this }
    def maxEqCast(lg44: GMat4L): this.type = { xx = (math.max((xx).toLong,lg44.xx)).toInt; xy = (math.max((xy).toLong,lg44.xy)).toInt; xz = (math.max((xz).toLong,lg44.xz)).toInt; xw = (math.max((xw).toLong,lg44.xw)).toInt; yx = (math.max((yx).toLong,lg44.yx)).toInt; yy = (math.max((yy).toLong,lg44.yy)).toInt; yz = (math.max((yz).toLong,lg44.yz)).toInt; yw = (math.max((yw).toLong,lg44.yw)).toInt; zx = (math.max((zx).toLong,lg44.zx)).toInt; zy = (math.max((zy).toLong,lg44.zy)).toInt; zz = (math.max((zz).toLong,lg44.zz)).toInt; zw = (math.max((zw).toLong,lg44.zw)).toInt; wx = (math.max((wx).toLong,lg44.wx)).toInt; wy = (math.max((wy).toLong,lg44.wy)).toInt; wz = (math.max((wz).toLong,lg44.wz)).toInt; ww = (math.max((ww).toLong,lg44.ww)).toInt; this }
    def maxEqCast(fg44: GMat4F): this.type = { xx = math.round(math.max((xx).toFloat,fg44.xx)); xy = math.round(math.max((xy).toFloat,fg44.xy)); xz = math.round(math.max((xz).toFloat,fg44.xz)); xw = math.round(math.max((xw).toFloat,fg44.xw)); yx = math.round(math.max((yx).toFloat,fg44.yx)); yy = math.round(math.max((yy).toFloat,fg44.yy)); yz = math.round(math.max((yz).toFloat,fg44.yz)); yw = math.round(math.max((yw).toFloat,fg44.yw)); zx = math.round(math.max((zx).toFloat,fg44.zx)); zy = math.round(math.max((zy).toFloat,fg44.zy)); zz = math.round(math.max((zz).toFloat,fg44.zz)); zw = math.round(math.max((zw).toFloat,fg44.zw)); wx = math.round(math.max((wx).toFloat,fg44.wx)); wy = math.round(math.max((wy).toFloat,fg44.wy)); wz = math.round(math.max((wz).toFloat,fg44.wz)); ww = math.round(math.max((ww).toFloat,fg44.ww)); this }
    def maxEqCast(dg44: GMat4D): this.type = { xx = (math.round(math.max((xx).toDouble,dg44.xx))).toInt; xy = (math.round(math.max((xy).toDouble,dg44.xy))).toInt; xz = (math.round(math.max((xz).toDouble,dg44.xz))).toInt; xw = (math.round(math.max((xw).toDouble,dg44.xw))).toInt; yx = (math.round(math.max((yx).toDouble,dg44.yx))).toInt; yy = (math.round(math.max((yy).toDouble,dg44.yy))).toInt; yz = (math.round(math.max((yz).toDouble,dg44.yz))).toInt; yw = (math.round(math.max((yw).toDouble,dg44.yw))).toInt; zx = (math.round(math.max((zx).toDouble,dg44.zx))).toInt; zy = (math.round(math.max((zy).toDouble,dg44.zy))).toInt; zz = (math.round(math.max((zz).toDouble,dg44.zz))).toInt; zw = (math.round(math.max((zw).toDouble,dg44.zw))).toInt; wx = (math.round(math.max((wx).toDouble,dg44.wx))).toInt; wy = (math.round(math.max((wy).toDouble,dg44.wy))).toInt; wz = (math.round(math.max((wz).toDouble,dg44.wz))).toInt; ww = (math.round(math.max((ww).toDouble,dg44.ww))).toInt; this }
    def minEq(x0: Int): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); xw = math.min(xw,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); yw = math.min(yw,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); zw = math.min(zw,x0); wx = math.min(wx,x0); wy = math.min(wy,x0); wz = math.min(wz,x0); ww = math.min(ww,x0); this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toLong,x0)).toInt; xy = (math.min((xy).toLong,x0)).toInt; xz = (math.min((xz).toLong,x0)).toInt; xw = (math.min((xw).toLong,x0)).toInt; yx = (math.min((yx).toLong,x0)).toInt; yy = (math.min((yy).toLong,x0)).toInt; yz = (math.min((yz).toLong,x0)).toInt; yw = (math.min((yw).toLong,x0)).toInt; zx = (math.min((zx).toLong,x0)).toInt; zy = (math.min((zy).toLong,x0)).toInt; zz = (math.min((zz).toLong,x0)).toInt; zw = (math.min((zw).toLong,x0)).toInt; wx = (math.min((wx).toLong,x0)).toInt; wy = (math.min((wy).toLong,x0)).toInt; wz = (math.min((wz).toLong,x0)).toInt; ww = (math.min((ww).toLong,x0)).toInt; this }
    def minEqCast(x0: Float): this.type = { xx = math.round(math.min((xx).toFloat,x0)); xy = math.round(math.min((xy).toFloat,x0)); xz = math.round(math.min((xz).toFloat,x0)); xw = math.round(math.min((xw).toFloat,x0)); yx = math.round(math.min((yx).toFloat,x0)); yy = math.round(math.min((yy).toFloat,x0)); yz = math.round(math.min((yz).toFloat,x0)); yw = math.round(math.min((yw).toFloat,x0)); zx = math.round(math.min((zx).toFloat,x0)); zy = math.round(math.min((zy).toFloat,x0)); zz = math.round(math.min((zz).toFloat,x0)); zw = math.round(math.min((zw).toFloat,x0)); wx = math.round(math.min((wx).toFloat,x0)); wy = math.round(math.min((wy).toFloat,x0)); wz = math.round(math.min((wz).toFloat,x0)); ww = math.round(math.min((ww).toFloat,x0)); this }
    def minEqCast(x0: Double): this.type = { xx = (math.round(math.min((xx).toDouble,x0))).toInt; xy = (math.round(math.min((xy).toDouble,x0))).toInt; xz = (math.round(math.min((xz).toDouble,x0))).toInt; xw = (math.round(math.min((xw).toDouble,x0))).toInt; yx = (math.round(math.min((yx).toDouble,x0))).toInt; yy = (math.round(math.min((yy).toDouble,x0))).toInt; yz = (math.round(math.min((yz).toDouble,x0))).toInt; yw = (math.round(math.min((yw).toDouble,x0))).toInt; zx = (math.round(math.min((zx).toDouble,x0))).toInt; zy = (math.round(math.min((zy).toDouble,x0))).toInt; zz = (math.round(math.min((zz).toDouble,x0))).toInt; zw = (math.round(math.min((zw).toDouble,x0))).toInt; wx = (math.round(math.min((wx).toDouble,x0))).toInt; wy = (math.round(math.min((wy).toDouble,x0))).toInt; wz = (math.round(math.min((wz).toDouble,x0))).toInt; ww = (math.round(math.min((ww).toDouble,x0))).toInt; this }
    def minEq(sg44: GMat4S): this.type = { xx = math.min(xx,(sg44.xx).toInt); xy = math.min(xy,(sg44.xy).toInt); xz = math.min(xz,(sg44.xz).toInt); xw = math.min(xw,(sg44.xw).toInt); yx = math.min(yx,(sg44.yx).toInt); yy = math.min(yy,(sg44.yy).toInt); yz = math.min(yz,(sg44.yz).toInt); yw = math.min(yw,(sg44.yw).toInt); zx = math.min(zx,(sg44.zx).toInt); zy = math.min(zy,(sg44.zy).toInt); zz = math.min(zz,(sg44.zz).toInt); zw = math.min(zw,(sg44.zw).toInt); wx = math.min(wx,(sg44.wx).toInt); wy = math.min(wy,(sg44.wy).toInt); wz = math.min(wz,(sg44.wz).toInt); ww = math.min(ww,(sg44.ww).toInt); this }
    def minEq(ig44: GMat4I): this.type = { xx = math.min(xx,ig44.xx); xy = math.min(xy,ig44.xy); xz = math.min(xz,ig44.xz); xw = math.min(xw,ig44.xw); yx = math.min(yx,ig44.yx); yy = math.min(yy,ig44.yy); yz = math.min(yz,ig44.yz); yw = math.min(yw,ig44.yw); zx = math.min(zx,ig44.zx); zy = math.min(zy,ig44.zy); zz = math.min(zz,ig44.zz); zw = math.min(zw,ig44.zw); wx = math.min(wx,ig44.wx); wy = math.min(wy,ig44.wy); wz = math.min(wz,ig44.wz); ww = math.min(ww,ig44.ww); this }
    def minEq(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); xw = math.min(xw,xw0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); yw = math.min(yw,yw0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); zw = math.min(zw,zw0); wx = math.min(wx,wx0); wy = math.min(wy,wy0); wz = math.min(wz,wz0); ww = math.min(ww,ww0); this }
    def minEqCast(lg44: GMat4L): this.type = { xx = (math.min((xx).toLong,lg44.xx)).toInt; xy = (math.min((xy).toLong,lg44.xy)).toInt; xz = (math.min((xz).toLong,lg44.xz)).toInt; xw = (math.min((xw).toLong,lg44.xw)).toInt; yx = (math.min((yx).toLong,lg44.yx)).toInt; yy = (math.min((yy).toLong,lg44.yy)).toInt; yz = (math.min((yz).toLong,lg44.yz)).toInt; yw = (math.min((yw).toLong,lg44.yw)).toInt; zx = (math.min((zx).toLong,lg44.zx)).toInt; zy = (math.min((zy).toLong,lg44.zy)).toInt; zz = (math.min((zz).toLong,lg44.zz)).toInt; zw = (math.min((zw).toLong,lg44.zw)).toInt; wx = (math.min((wx).toLong,lg44.wx)).toInt; wy = (math.min((wy).toLong,lg44.wy)).toInt; wz = (math.min((wz).toLong,lg44.wz)).toInt; ww = (math.min((ww).toLong,lg44.ww)).toInt; this }
    def minEqCast(fg44: GMat4F): this.type = { xx = math.round(math.min((xx).toFloat,fg44.xx)); xy = math.round(math.min((xy).toFloat,fg44.xy)); xz = math.round(math.min((xz).toFloat,fg44.xz)); xw = math.round(math.min((xw).toFloat,fg44.xw)); yx = math.round(math.min((yx).toFloat,fg44.yx)); yy = math.round(math.min((yy).toFloat,fg44.yy)); yz = math.round(math.min((yz).toFloat,fg44.yz)); yw = math.round(math.min((yw).toFloat,fg44.yw)); zx = math.round(math.min((zx).toFloat,fg44.zx)); zy = math.round(math.min((zy).toFloat,fg44.zy)); zz = math.round(math.min((zz).toFloat,fg44.zz)); zw = math.round(math.min((zw).toFloat,fg44.zw)); wx = math.round(math.min((wx).toFloat,fg44.wx)); wy = math.round(math.min((wy).toFloat,fg44.wy)); wz = math.round(math.min((wz).toFloat,fg44.wz)); ww = math.round(math.min((ww).toFloat,fg44.ww)); this }
    def minEqCast(dg44: GMat4D): this.type = { xx = (math.round(math.min((xx).toDouble,dg44.xx))).toInt; xy = (math.round(math.min((xy).toDouble,dg44.xy))).toInt; xz = (math.round(math.min((xz).toDouble,dg44.xz))).toInt; xw = (math.round(math.min((xw).toDouble,dg44.xw))).toInt; yx = (math.round(math.min((yx).toDouble,dg44.yx))).toInt; yy = (math.round(math.min((yy).toDouble,dg44.yy))).toInt; yz = (math.round(math.min((yz).toDouble,dg44.yz))).toInt; yw = (math.round(math.min((yw).toDouble,dg44.yw))).toInt; zx = (math.round(math.min((zx).toDouble,dg44.zx))).toInt; zy = (math.round(math.min((zy).toDouble,dg44.zy))).toInt; zz = (math.round(math.min((zz).toDouble,dg44.zz))).toInt; zw = (math.round(math.min((zw).toDouble,dg44.zw))).toInt; wx = (math.round(math.min((wx).toDouble,dg44.wx))).toInt; wy = (math.round(math.min((wy).toDouble,dg44.wy))).toInt; wz = (math.round(math.min((wz).toDouble,dg44.wz))).toInt; ww = (math.round(math.min((ww).toDouble,dg44.ww))).toInt; this }
    def operateEq(sg44: GMat4S)(fun: (Int,Int)=>Int) = { xx = fun(xx,(sg44.xx).toInt); xy = fun(xy,(sg44.xy).toInt); xz = fun(xz,(sg44.xz).toInt); xw = fun(xw,(sg44.xw).toInt); yx = fun(yx,(sg44.yx).toInt); yy = fun(yy,(sg44.yy).toInt); yz = fun(yz,(sg44.yz).toInt); yw = fun(yw,(sg44.yw).toInt); zx = fun(zx,(sg44.zx).toInt); zy = fun(zy,(sg44.zy).toInt); zz = fun(zz,(sg44.zz).toInt); zw = fun(zw,(sg44.zw).toInt); wx = fun(wx,(sg44.wx).toInt); wy = fun(wy,(sg44.wy).toInt); wz = fun(wz,(sg44.wz).toInt); ww = fun(ww,(sg44.ww).toInt); this }
    def operateEq(ig44: GMat4I)(fun: (Int,Int)=>Int) = { xx = fun(xx,ig44.xx); xy = fun(xy,ig44.xy); xz = fun(xz,ig44.xz); xw = fun(xw,ig44.xw); yx = fun(yx,ig44.yx); yy = fun(yy,ig44.yy); yz = fun(yz,ig44.yz); yw = fun(yw,ig44.yw); zx = fun(zx,ig44.zx); zy = fun(zy,ig44.zy); zz = fun(zz,ig44.zz); zw = fun(zw,ig44.zw); wx = fun(wx,ig44.wx); wy = fun(wy,ig44.wy); wz = fun(wz,ig44.wz); ww = fun(ww,ig44.ww); this }
    def operateEqCast(lg44: GMat4L)(fun: (Long,Long)=>Long) = { xx = (fun((xx).toLong,lg44.xx)).toInt; xy = (fun((xy).toLong,lg44.xy)).toInt; xz = (fun((xz).toLong,lg44.xz)).toInt; xw = (fun((xw).toLong,lg44.xw)).toInt; yx = (fun((yx).toLong,lg44.yx)).toInt; yy = (fun((yy).toLong,lg44.yy)).toInt; yz = (fun((yz).toLong,lg44.yz)).toInt; yw = (fun((yw).toLong,lg44.yw)).toInt; zx = (fun((zx).toLong,lg44.zx)).toInt; zy = (fun((zy).toLong,lg44.zy)).toInt; zz = (fun((zz).toLong,lg44.zz)).toInt; zw = (fun((zw).toLong,lg44.zw)).toInt; wx = (fun((wx).toLong,lg44.wx)).toInt; wy = (fun((wy).toLong,lg44.wy)).toInt; wz = (fun((wz).toLong,lg44.wz)).toInt; ww = (fun((ww).toLong,lg44.ww)).toInt; this }
    def operateEqCast(fg44: GMat4F)(fun: (Float,Float)=>Float) = { xx = math.round(fun((xx).toFloat,fg44.xx)); xy = math.round(fun((xy).toFloat,fg44.xy)); xz = math.round(fun((xz).toFloat,fg44.xz)); xw = math.round(fun((xw).toFloat,fg44.xw)); yx = math.round(fun((yx).toFloat,fg44.yx)); yy = math.round(fun((yy).toFloat,fg44.yy)); yz = math.round(fun((yz).toFloat,fg44.yz)); yw = math.round(fun((yw).toFloat,fg44.yw)); zx = math.round(fun((zx).toFloat,fg44.zx)); zy = math.round(fun((zy).toFloat,fg44.zy)); zz = math.round(fun((zz).toFloat,fg44.zz)); zw = math.round(fun((zw).toFloat,fg44.zw)); wx = math.round(fun((wx).toFloat,fg44.wx)); wy = math.round(fun((wy).toFloat,fg44.wy)); wz = math.round(fun((wz).toFloat,fg44.wz)); ww = math.round(fun((ww).toFloat,fg44.ww)); this }
    def operateEqCast(dg44: GMat4D)(fun: (Double,Double)=>Double) = { xx = (math.round(fun((xx).toDouble,dg44.xx))).toInt; xy = (math.round(fun((xy).toDouble,dg44.xy))).toInt; xz = (math.round(fun((xz).toDouble,dg44.xz))).toInt; xw = (math.round(fun((xw).toDouble,dg44.xw))).toInt; yx = (math.round(fun((yx).toDouble,dg44.yx))).toInt; yy = (math.round(fun((yy).toDouble,dg44.yy))).toInt; yz = (math.round(fun((yz).toDouble,dg44.yz))).toInt; yw = (math.round(fun((yw).toDouble,dg44.yw))).toInt; zx = (math.round(fun((zx).toDouble,dg44.zx))).toInt; zy = (math.round(fun((zy).toDouble,dg44.zy))).toInt; zz = (math.round(fun((zz).toDouble,dg44.zz))).toInt; zw = (math.round(fun((zw).toDouble,dg44.zw))).toInt; wx = (math.round(fun((wx).toDouble,dg44.wx))).toInt; wy = (math.round(fun((wy).toDouble,dg44.wy))).toInt; wz = (math.round(fun((wz).toDouble,dg44.wz))).toInt; ww = (math.round(fun((ww).toDouble,dg44.ww))).toInt; this }
    def :|~(sg4: GVec4S) = { xx = (sg4.x).toInt; xy = (sg4.x).toInt; xz = (sg4.x).toInt; xw = (sg4.x).toInt; yx = (sg4.y).toInt; yy = (sg4.y).toInt; yz = (sg4.y).toInt; yw = (sg4.y).toInt; zx = (sg4.z).toInt; zy = (sg4.z).toInt; zz = (sg4.z).toInt; zw = (sg4.z).toInt; wx = (sg4.w).toInt; wy = (sg4.w).toInt; wz = (sg4.w).toInt; ww = (sg4.w).toInt; this }
    def :-~(sg4: GVec4S) = { xx = (sg4.x).toInt; xy = (sg4.y).toInt; xz = (sg4.z).toInt; xw = (sg4.w).toInt; yx = (sg4.x).toInt; yy = (sg4.y).toInt; yz = (sg4.z).toInt; yw = (sg4.w).toInt; zx = (sg4.x).toInt; zy = (sg4.y).toInt; zz = (sg4.z).toInt; zw = (sg4.w).toInt; wx = (sg4.x).toInt; wy = (sg4.y).toInt; wz = (sg4.z).toInt; ww = (sg4.w).toInt; this }
    def :|~(ig4: GVec4I) = { xx = ig4.x; xy = ig4.x; xz = ig4.x; xw = ig4.x; yx = ig4.y; yy = ig4.y; yz = ig4.y; yw = ig4.y; zx = ig4.z; zy = ig4.z; zz = ig4.z; zw = ig4.z; wx = ig4.w; wy = ig4.w; wz = ig4.w; ww = ig4.w; this }
    def :-~(ig4: GVec4I) = { xx = ig4.x; xy = ig4.y; xz = ig4.z; xw = ig4.w; yx = ig4.x; yy = ig4.y; yz = ig4.z; yw = ig4.w; zx = ig4.x; zy = ig4.y; zz = ig4.z; zw = ig4.w; wx = ig4.x; wy = ig4.y; wz = ig4.z; ww = ig4.w; this }
    def :|~~(lg4: GVec4L) = { xx = (lg4.x).toInt; xy = (lg4.x).toInt; xz = (lg4.x).toInt; xw = (lg4.x).toInt; yx = (lg4.y).toInt; yy = (lg4.y).toInt; yz = (lg4.y).toInt; yw = (lg4.y).toInt; zx = (lg4.z).toInt; zy = (lg4.z).toInt; zz = (lg4.z).toInt; zw = (lg4.z).toInt; wx = (lg4.w).toInt; wy = (lg4.w).toInt; wz = (lg4.w).toInt; ww = (lg4.w).toInt; this }
    def :-~~(lg4: GVec4L) = { xx = (lg4.x).toInt; xy = (lg4.y).toInt; xz = (lg4.z).toInt; xw = (lg4.w).toInt; yx = (lg4.x).toInt; yy = (lg4.y).toInt; yz = (lg4.z).toInt; yw = (lg4.w).toInt; zx = (lg4.x).toInt; zy = (lg4.y).toInt; zz = (lg4.z).toInt; zw = (lg4.w).toInt; wx = (lg4.x).toInt; wy = (lg4.y).toInt; wz = (lg4.z).toInt; ww = (lg4.w).toInt; this }
    def :|~~(fg4: GVec4F) = { xx = math.round(fg4.x); xy = math.round(fg4.x); xz = math.round(fg4.x); xw = math.round(fg4.x); yx = math.round(fg4.y); yy = math.round(fg4.y); yz = math.round(fg4.y); yw = math.round(fg4.y); zx = math.round(fg4.z); zy = math.round(fg4.z); zz = math.round(fg4.z); zw = math.round(fg4.z); wx = math.round(fg4.w); wy = math.round(fg4.w); wz = math.round(fg4.w); ww = math.round(fg4.w); this }
    def :-~~(fg4: GVec4F) = { xx = math.round(fg4.x); xy = math.round(fg4.y); xz = math.round(fg4.z); xw = math.round(fg4.w); yx = math.round(fg4.x); yy = math.round(fg4.y); yz = math.round(fg4.z); yw = math.round(fg4.w); zx = math.round(fg4.x); zy = math.round(fg4.y); zz = math.round(fg4.z); zw = math.round(fg4.w); wx = math.round(fg4.x); wy = math.round(fg4.y); wz = math.round(fg4.z); ww = math.round(fg4.w); this }
    def :|~~(dg4: GVec4D) = { xx = (math.round(dg4.x)).toInt; xy = (math.round(dg4.x)).toInt; xz = (math.round(dg4.x)).toInt; xw = (math.round(dg4.x)).toInt; yx = (math.round(dg4.y)).toInt; yy = (math.round(dg4.y)).toInt; yz = (math.round(dg4.y)).toInt; yw = (math.round(dg4.y)).toInt; zx = (math.round(dg4.z)).toInt; zy = (math.round(dg4.z)).toInt; zz = (math.round(dg4.z)).toInt; zw = (math.round(dg4.z)).toInt; wx = (math.round(dg4.w)).toInt; wy = (math.round(dg4.w)).toInt; wz = (math.round(dg4.w)).toInt; ww = (math.round(dg4.w)).toInt; this }
    def :-~~(dg4: GVec4D) = { xx = (math.round(dg4.x)).toInt; xy = (math.round(dg4.y)).toInt; xz = (math.round(dg4.z)).toInt; xw = (math.round(dg4.w)).toInt; yx = (math.round(dg4.x)).toInt; yy = (math.round(dg4.y)).toInt; yz = (math.round(dg4.z)).toInt; yw = (math.round(dg4.w)).toInt; zx = (math.round(dg4.x)).toInt; zy = (math.round(dg4.y)).toInt; zz = (math.round(dg4.z)).toInt; zw = (math.round(dg4.w)).toInt; wx = (math.round(dg4.x)).toInt; wy = (math.round(dg4.y)).toInt; wz = (math.round(dg4.z)).toInt; ww = (math.round(dg4.w)).toInt; this }
    def **~(sg44: GMat4S) = {val xx0 = xx*(sg44.xx).toInt+xy*(sg44.yx).toInt+xz*(sg44.zx).toInt+xw*(sg44.wx).toInt; val xy0 = xx*(sg44.xy).toInt+xy*(sg44.yy).toInt+xz*(sg44.zy).toInt+xw*(sg44.wy).toInt; val xz0 = xx*(sg44.xz).toInt+xy*(sg44.yz).toInt+xz*(sg44.zz).toInt+xw*(sg44.wz).toInt; val xw0 = xx*(sg44.xw).toInt+xy*(sg44.yw).toInt+xz*(sg44.zw).toInt+xw*(sg44.ww).toInt; val yx0 = yx*(sg44.xx).toInt+yy*(sg44.yx).toInt+yz*(sg44.zx).toInt+yw*(sg44.wx).toInt; val yy0 = yx*(sg44.xy).toInt+yy*(sg44.yy).toInt+yz*(sg44.zy).toInt+yw*(sg44.wy).toInt; val yz0 = yx*(sg44.xz).toInt+yy*(sg44.yz).toInt+yz*(sg44.zz).toInt+yw*(sg44.wz).toInt; val yw0 = yx*(sg44.xw).toInt+yy*(sg44.yw).toInt+yz*(sg44.zw).toInt+yw*(sg44.ww).toInt; val zx0 = zx*(sg44.xx).toInt+zy*(sg44.yx).toInt+zz*(sg44.zx).toInt+zw*(sg44.wx).toInt; val zy0 = zx*(sg44.xy).toInt+zy*(sg44.yy).toInt+zz*(sg44.zy).toInt+zw*(sg44.wy).toInt; val zz0 = zx*(sg44.xz).toInt+zy*(sg44.yz).toInt+zz*(sg44.zz).toInt+zw*(sg44.wz).toInt; val zw0 = zx*(sg44.xw).toInt+zy*(sg44.yw).toInt+zz*(sg44.zw).toInt+zw*(sg44.ww).toInt; val wx0 = wx*(sg44.xx).toInt+wy*(sg44.yx).toInt+wz*(sg44.zx).toInt+ww*(sg44.wx).toInt; val wy0 = wx*(sg44.xy).toInt+wy*(sg44.yy).toInt+wz*(sg44.zy).toInt+ww*(sg44.wy).toInt; val wz0 = wx*(sg44.xz).toInt+wy*(sg44.yz).toInt+wz*(sg44.zz).toInt+ww*(sg44.wz).toInt; val ww0 = wx*(sg44.xw).toInt+wy*(sg44.yw).toInt+wz*(sg44.zw).toInt+ww*(sg44.ww).toInt; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(ig44: GMat4I) = {val xx0 = xx*ig44.xx+xy*ig44.yx+xz*ig44.zx+xw*ig44.wx; val xy0 = xx*ig44.xy+xy*ig44.yy+xz*ig44.zy+xw*ig44.wy; val xz0 = xx*ig44.xz+xy*ig44.yz+xz*ig44.zz+xw*ig44.wz; val xw0 = xx*ig44.xw+xy*ig44.yw+xz*ig44.zw+xw*ig44.ww; val yx0 = yx*ig44.xx+yy*ig44.yx+yz*ig44.zx+yw*ig44.wx; val yy0 = yx*ig44.xy+yy*ig44.yy+yz*ig44.zy+yw*ig44.wy; val yz0 = yx*ig44.xz+yy*ig44.yz+yz*ig44.zz+yw*ig44.wz; val yw0 = yx*ig44.xw+yy*ig44.yw+yz*ig44.zw+yw*ig44.ww; val zx0 = zx*ig44.xx+zy*ig44.yx+zz*ig44.zx+zw*ig44.wx; val zy0 = zx*ig44.xy+zy*ig44.yy+zz*ig44.zy+zw*ig44.wy; val zz0 = zx*ig44.xz+zy*ig44.yz+zz*ig44.zz+zw*ig44.wz; val zw0 = zx*ig44.xw+zy*ig44.yw+zz*ig44.zw+zw*ig44.ww; val wx0 = wx*ig44.xx+wy*ig44.yx+wz*ig44.zx+ww*ig44.wx; val wy0 = wx*ig44.xy+wy*ig44.yy+wz*ig44.zy+ww*ig44.wy; val wz0 = wx*ig44.xz+wy*ig44.yz+wz*ig44.zz+ww*ig44.wz; val ww0 = wx*ig44.xw+wy*ig44.yw+wz*ig44.zw+ww*ig44.ww; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~~(lg44: GMat4L) = {val xx0 = (xx).toLong*lg44.xx+(xy).toLong*lg44.yx+(xz).toLong*lg44.zx+(xw).toLong*lg44.wx; val xy0 = (xx).toLong*lg44.xy+(xy).toLong*lg44.yy+(xz).toLong*lg44.zy+(xw).toLong*lg44.wy; val xz0 = (xx).toLong*lg44.xz+(xy).toLong*lg44.yz+(xz).toLong*lg44.zz+(xw).toLong*lg44.wz; val xw0 = (xx).toLong*lg44.xw+(xy).toLong*lg44.yw+(xz).toLong*lg44.zw+(xw).toLong*lg44.ww; val yx0 = (yx).toLong*lg44.xx+(yy).toLong*lg44.yx+(yz).toLong*lg44.zx+(yw).toLong*lg44.wx; val yy0 = (yx).toLong*lg44.xy+(yy).toLong*lg44.yy+(yz).toLong*lg44.zy+(yw).toLong*lg44.wy; val yz0 = (yx).toLong*lg44.xz+(yy).toLong*lg44.yz+(yz).toLong*lg44.zz+(yw).toLong*lg44.wz; val yw0 = (yx).toLong*lg44.xw+(yy).toLong*lg44.yw+(yz).toLong*lg44.zw+(yw).toLong*lg44.ww; val zx0 = (zx).toLong*lg44.xx+(zy).toLong*lg44.yx+(zz).toLong*lg44.zx+(zw).toLong*lg44.wx; val zy0 = (zx).toLong*lg44.xy+(zy).toLong*lg44.yy+(zz).toLong*lg44.zy+(zw).toLong*lg44.wy; val zz0 = (zx).toLong*lg44.xz+(zy).toLong*lg44.yz+(zz).toLong*lg44.zz+(zw).toLong*lg44.wz; val zw0 = (zx).toLong*lg44.xw+(zy).toLong*lg44.yw+(zz).toLong*lg44.zw+(zw).toLong*lg44.ww; val wx0 = (wx).toLong*lg44.xx+(wy).toLong*lg44.yx+(wz).toLong*lg44.zx+(ww).toLong*lg44.wx; val wy0 = (wx).toLong*lg44.xy+(wy).toLong*lg44.yy+(wz).toLong*lg44.zy+(ww).toLong*lg44.wy; val wz0 = (wx).toLong*lg44.xz+(wy).toLong*lg44.yz+(wz).toLong*lg44.zz+(ww).toLong*lg44.wz; val ww0 = (wx).toLong*lg44.xw+(wy).toLong*lg44.yw+(wz).toLong*lg44.zw+(ww).toLong*lg44.ww; xx = (xx0).toInt; xy = (xy0).toInt; xz = (xz0).toInt; xw = (xw0).toInt; yx = (yx0).toInt; yy = (yy0).toInt; yz = (yz0).toInt; yw = (yw0).toInt; zx = (zx0).toInt; zy = (zy0).toInt; zz = (zz0).toInt; zw = (zw0).toInt; wx = (wx0).toInt; wy = (wy0).toInt; wz = (wz0).toInt; ww = (ww0).toInt; this }
    def **~~(fg44: GMat4F) = {val xx0 = (xx).toFloat*fg44.xx+(xy).toFloat*fg44.yx+(xz).toFloat*fg44.zx+(xw).toFloat*fg44.wx; val xy0 = (xx).toFloat*fg44.xy+(xy).toFloat*fg44.yy+(xz).toFloat*fg44.zy+(xw).toFloat*fg44.wy; val xz0 = (xx).toFloat*fg44.xz+(xy).toFloat*fg44.yz+(xz).toFloat*fg44.zz+(xw).toFloat*fg44.wz; val xw0 = (xx).toFloat*fg44.xw+(xy).toFloat*fg44.yw+(xz).toFloat*fg44.zw+(xw).toFloat*fg44.ww; val yx0 = (yx).toFloat*fg44.xx+(yy).toFloat*fg44.yx+(yz).toFloat*fg44.zx+(yw).toFloat*fg44.wx; val yy0 = (yx).toFloat*fg44.xy+(yy).toFloat*fg44.yy+(yz).toFloat*fg44.zy+(yw).toFloat*fg44.wy; val yz0 = (yx).toFloat*fg44.xz+(yy).toFloat*fg44.yz+(yz).toFloat*fg44.zz+(yw).toFloat*fg44.wz; val yw0 = (yx).toFloat*fg44.xw+(yy).toFloat*fg44.yw+(yz).toFloat*fg44.zw+(yw).toFloat*fg44.ww; val zx0 = (zx).toFloat*fg44.xx+(zy).toFloat*fg44.yx+(zz).toFloat*fg44.zx+(zw).toFloat*fg44.wx; val zy0 = (zx).toFloat*fg44.xy+(zy).toFloat*fg44.yy+(zz).toFloat*fg44.zy+(zw).toFloat*fg44.wy; val zz0 = (zx).toFloat*fg44.xz+(zy).toFloat*fg44.yz+(zz).toFloat*fg44.zz+(zw).toFloat*fg44.wz; val zw0 = (zx).toFloat*fg44.xw+(zy).toFloat*fg44.yw+(zz).toFloat*fg44.zw+(zw).toFloat*fg44.ww; val wx0 = (wx).toFloat*fg44.xx+(wy).toFloat*fg44.yx+(wz).toFloat*fg44.zx+(ww).toFloat*fg44.wx; val wy0 = (wx).toFloat*fg44.xy+(wy).toFloat*fg44.yy+(wz).toFloat*fg44.zy+(ww).toFloat*fg44.wy; val wz0 = (wx).toFloat*fg44.xz+(wy).toFloat*fg44.yz+(wz).toFloat*fg44.zz+(ww).toFloat*fg44.wz; val ww0 = (wx).toFloat*fg44.xw+(wy).toFloat*fg44.yw+(wz).toFloat*fg44.zw+(ww).toFloat*fg44.ww; xx = math.round(xx0); xy = math.round(xy0); xz = math.round(xz0); xw = math.round(xw0); yx = math.round(yx0); yy = math.round(yy0); yz = math.round(yz0); yw = math.round(yw0); zx = math.round(zx0); zy = math.round(zy0); zz = math.round(zz0); zw = math.round(zw0); wx = math.round(wx0); wy = math.round(wy0); wz = math.round(wz0); ww = math.round(ww0); this }
    def **~~(dg44: GMat4D) = {val xx0 = (xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx; val xy0 = (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy; val xz0 = (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz; val xw0 = (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww; val yx0 = (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx; val yy0 = (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy; val yz0 = (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz; val yw0 = (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww; val zx0 = (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx; val zy0 = (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy; val zz0 = (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz; val zw0 = (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww; val wx0 = (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx; val wy0 = (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy; val wz0 = (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz; val ww0 = (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww; xx = (math.round(xx0)).toInt; xy = (math.round(xy0)).toInt; xz = (math.round(xz0)).toInt; xw = (math.round(xw0)).toInt; yx = (math.round(yx0)).toInt; yy = (math.round(yy0)).toInt; yz = (math.round(yz0)).toInt; yw = (math.round(yw0)).toInt; zx = (math.round(zx0)).toInt; zy = (math.round(zy0)).toInt; zz = (math.round(zz0)).toInt; zw = (math.round(zw0)).toInt; wx = (math.round(wx0)).toInt; wy = (math.round(wy0)).toInt; wz = (math.round(wz0)).toInt; ww = (math.round(ww0)).toInt; this }
    class RowViewX extends AVec4I { def x = xx; def x_=(x0: Int) { xx = x0 }; def y = xy; def y_=(x0: Int) { xy = x0 }; def z = xz; def z_=(x0: Int) { xz = x0 }; def w = xw; def w_=(x0: Int) { xw = x0 } }
    class ColViewX extends AVec4I { def x = xx; def x_=(x0: Int) { xx = x0 }; def y = yx; def y_=(x0: Int) { yx = x0 }; def z = zx; def z_=(x0: Int) { zx = x0 }; def w = wx; def w_=(x0: Int) { wx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec4I { def x = yx; def x_=(x0: Int) { yx = x0 }; def y = yy; def y_=(x0: Int) { yy = x0 }; def z = yz; def z_=(x0: Int) { yz = x0 }; def w = yw; def w_=(x0: Int) { yw = x0 } }
    class ColViewY extends AVec4I { def x = xy; def x_=(x0: Int) { xy = x0 }; def y = yy; def y_=(x0: Int) { yy = x0 }; def z = zy; def z_=(x0: Int) { zy = x0 }; def w = wy; def w_=(x0: Int) { wy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec4I { def x = zx; def x_=(x0: Int) { zx = x0 }; def y = zy; def y_=(x0: Int) { zy = x0 }; def z = zz; def z_=(x0: Int) { zz = x0 }; def w = zw; def w_=(x0: Int) { zw = x0 } }
    class ColViewZ extends AVec4I { def x = xz; def x_=(x0: Int) { xz = x0 }; def y = yz; def y_=(x0: Int) { yz = x0 }; def z = zz; def z_=(x0: Int) { zz = x0 }; def w = wz; def w_=(x0: Int) { wz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    class RowViewW extends AVec4I { def x = wx; def x_=(x0: Int) { wx = x0 }; def y = wy; def y_=(x0: Int) { wy = x0 }; def z = wz; def z_=(x0: Int) { wz = x0 }; def w = ww; def w_=(x0: Int) { ww = x0 } }
    class ColViewW extends AVec4I { def x = xw; def x_=(x0: Int) { xw = x0 }; def y = yw; def y_=(x0: Int) { yw = x0 }; def z = zw; def z_=(x0: Int) { zw = x0 }; def w = ww; def w_=(x0: Int) { ww = x0 } }
    def wRowView = new RowViewW
    def wColView = new ColViewW
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = xw; xw = wx; wx = temp; temp = yz; yz = zy; zy = temp; temp = yw; yw = wy; wy = temp; temp = zw; zw = wz; wz = temp; this }
  } // class AMat4I

  object AMat4I {
    def apply(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): AMat4I = new MMat4I(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): AMat4I = IMat4I.parse(str).mut
    def identity: AMat4I = MMat4I.identity
    def zero: AMat4I = MMat4I.zero
    def traced(ig4: GVec4I) = new MMat4I(ig4.x, 0, 0, 0, 0, ig4.y, 0, 0, 0, 0, ig4.z, 0, 0, 0, 0, ig4.w)
  } // object AMat4I


  abstract class AMat4L extends GMat4L {
    def xx_=(xx0: Long): Unit
    def xy_=(xy0: Long): Unit
    def xz_=(xz0: Long): Unit
    def xw_=(xw0: Long): Unit
    def yx_=(yx0: Long): Unit
    def yy_=(yy0: Long): Unit
    def yz_=(yz0: Long): Unit
    def yw_=(yw0: Long): Unit
    def zx_=(zx0: Long): Unit
    def zy_=(zy0: Long): Unit
    def zz_=(zz0: Long): Unit
    def zw_=(zw0: Long): Unit
    def wx_=(wx0: Long): Unit
    def wy_=(wy0: Long): Unit
    def wz_=(wz0: Long): Unit
    def ww_=(ww0: Long): Unit
    override def clone(): AMat4L = new MMat4L(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: AMat4S = new MMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def toI: AMat4I = new MMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, xw0: Long = xw, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, yw0: Long = yw, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz, zw0: Long = zw, wx0: Long = wx, wy0: Long = wy, wz0: Long = wz, ww0: Long = ww): AMat4L = new MMat4L(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: AMat3L = new MMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapEq(fun: Long => Long): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); xw = fun(xw); yx = fun(yx); yy = fun(yy); yz = fun(yz); yw = fun(yw); zx = fun(zx); zy = fun(zy); zz = fun(zz); zw = fun(zw); wx = fun(wx); wy = fun(wy); wz = fun(wz); ww = fun(ww); this }
    override def toF: AMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: AMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; xw = -xw; yx = -yx; yy = -yy; yz = -yz; yw = -yw; zx = -zx; zy = -zy; zz = -zz; zw = -zw; wx = -wx; wy = -wy; wz = -wz; ww = -ww; this }
    def :~(x0: Long): this.type = { xx = x0; xy = x0; xz = x0; xw = x0; yx = x0; yy = x0; yz = x0; yw = x0; zx = x0; zy = x0; zz = x0; zw = x0; wx = x0; wy = x0; wz = x0; ww = x0; this }
    def :~~(x0: Double): this.type = { xx = math.round(x0); xy = math.round(x0); xz = math.round(x0); xw = math.round(x0); yx = math.round(x0); yy = math.round(x0); yz = math.round(x0); yw = math.round(x0); zx = math.round(x0); zy = math.round(x0); zz = math.round(x0); zw = math.round(x0); wx = math.round(x0); wy = math.round(x0); wz = math.round(x0); ww = math.round(x0); this }
    def :~(sg44: GMat4S): this.type = { xx = (sg44.xx).toLong; xy = (sg44.xy).toLong; xz = (sg44.xz).toLong; xw = (sg44.xw).toLong; yx = (sg44.yx).toLong; yy = (sg44.yy).toLong; yz = (sg44.yz).toLong; yw = (sg44.yw).toLong; zx = (sg44.zx).toLong; zy = (sg44.zy).toLong; zz = (sg44.zz).toLong; zw = (sg44.zw).toLong; wx = (sg44.wx).toLong; wy = (sg44.wy).toLong; wz = (sg44.wz).toLong; ww = (sg44.ww).toLong; this }
    def :~(ig44: GMat4I): this.type = { xx = (ig44.xx).toLong; xy = (ig44.xy).toLong; xz = (ig44.xz).toLong; xw = (ig44.xw).toLong; yx = (ig44.yx).toLong; yy = (ig44.yy).toLong; yz = (ig44.yz).toLong; yw = (ig44.yw).toLong; zx = (ig44.zx).toLong; zy = (ig44.zy).toLong; zz = (ig44.zz).toLong; zw = (ig44.zw).toLong; wx = (ig44.wx).toLong; wy = (ig44.wy).toLong; wz = (ig44.wz).toLong; ww = (ig44.ww).toLong; this }
    def :~(lg44: GMat4L): this.type = { xx = lg44.xx; xy = lg44.xy; xz = lg44.xz; xw = lg44.xw; yx = lg44.yx; yy = lg44.yy; yz = lg44.yz; yw = lg44.yw; zx = lg44.zx; zy = lg44.zy; zz = lg44.zz; zw = lg44.zw; wx = lg44.wx; wy = lg44.wy; wz = lg44.wz; ww = lg44.ww; this }
    def :~(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): this.type = { xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def :~~(fg44: GMat4F): this.type = { xx = math.round((fg44.xx).toDouble); xy = math.round((fg44.xy).toDouble); xz = math.round((fg44.xz).toDouble); xw = math.round((fg44.xw).toDouble); yx = math.round((fg44.yx).toDouble); yy = math.round((fg44.yy).toDouble); yz = math.round((fg44.yz).toDouble); yw = math.round((fg44.yw).toDouble); zx = math.round((fg44.zx).toDouble); zy = math.round((fg44.zy).toDouble); zz = math.round((fg44.zz).toDouble); zw = math.round((fg44.zw).toDouble); wx = math.round((fg44.wx).toDouble); wy = math.round((fg44.wy).toDouble); wz = math.round((fg44.wz).toDouble); ww = math.round((fg44.ww).toDouble); this }
    def :~~(dg44: GMat4D): this.type = { xx = math.round(dg44.xx); xy = math.round(dg44.xy); xz = math.round(dg44.xz); xw = math.round(dg44.xw); yx = math.round(dg44.yx); yy = math.round(dg44.yy); yz = math.round(dg44.yz); yw = math.round(dg44.yw); zx = math.round(dg44.zx); zy = math.round(dg44.zy); zz = math.round(dg44.zz); zw = math.round(dg44.zw); wx = math.round(dg44.wx); wy = math.round(dg44.wy); wz = math.round(dg44.wz); ww = math.round(dg44.ww); this }
    def +~(x0: Long): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; xw = xw + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; yw = yw + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; zw = zw + x0; wx = wx + x0; wy = wy + x0; wz = wz + x0; ww = ww + x0; this }
    def +~~(x0: Double): this.type = { xx = math.round((xx).toDouble + x0); xy = math.round((xy).toDouble + x0); xz = math.round((xz).toDouble + x0); xw = math.round((xw).toDouble + x0); yx = math.round((yx).toDouble + x0); yy = math.round((yy).toDouble + x0); yz = math.round((yz).toDouble + x0); yw = math.round((yw).toDouble + x0); zx = math.round((zx).toDouble + x0); zy = math.round((zy).toDouble + x0); zz = math.round((zz).toDouble + x0); zw = math.round((zw).toDouble + x0); wx = math.round((wx).toDouble + x0); wy = math.round((wy).toDouble + x0); wz = math.round((wz).toDouble + x0); ww = math.round((ww).toDouble + x0); this }
    def +~(sg44: GMat4S): this.type = { xx = xx + (sg44.xx).toLong; xy = xy + (sg44.xy).toLong; xz = xz + (sg44.xz).toLong; xw = xw + (sg44.xw).toLong; yx = yx + (sg44.yx).toLong; yy = yy + (sg44.yy).toLong; yz = yz + (sg44.yz).toLong; yw = yw + (sg44.yw).toLong; zx = zx + (sg44.zx).toLong; zy = zy + (sg44.zy).toLong; zz = zz + (sg44.zz).toLong; zw = zw + (sg44.zw).toLong; wx = wx + (sg44.wx).toLong; wy = wy + (sg44.wy).toLong; wz = wz + (sg44.wz).toLong; ww = ww + (sg44.ww).toLong; this }
    def +~(ig44: GMat4I): this.type = { xx = xx + (ig44.xx).toLong; xy = xy + (ig44.xy).toLong; xz = xz + (ig44.xz).toLong; xw = xw + (ig44.xw).toLong; yx = yx + (ig44.yx).toLong; yy = yy + (ig44.yy).toLong; yz = yz + (ig44.yz).toLong; yw = yw + (ig44.yw).toLong; zx = zx + (ig44.zx).toLong; zy = zy + (ig44.zy).toLong; zz = zz + (ig44.zz).toLong; zw = zw + (ig44.zw).toLong; wx = wx + (ig44.wx).toLong; wy = wy + (ig44.wy).toLong; wz = wz + (ig44.wz).toLong; ww = ww + (ig44.ww).toLong; this }
    def +~(lg44: GMat4L): this.type = { xx = xx + lg44.xx; xy = xy + lg44.xy; xz = xz + lg44.xz; xw = xw + lg44.xw; yx = yx + lg44.yx; yy = yy + lg44.yy; yz = yz + lg44.yz; yw = yw + lg44.yw; zx = zx + lg44.zx; zy = zy + lg44.zy; zz = zz + lg44.zz; zw = zw + lg44.zw; wx = wx + lg44.wx; wy = wy + lg44.wy; wz = wz + lg44.wz; ww = ww + lg44.ww; this }
    def +~(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; xw = xw + xw0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; yw = yw + yw0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; zw = zw + zw0; wx = wx + wx0; wy = wy + wy0; wz = wz + wz0; ww = ww + ww0; this }
    def +~~(fg44: GMat4F): this.type = { xx = math.round((xx).toDouble + (fg44.xx).toDouble); xy = math.round((xy).toDouble + (fg44.xy).toDouble); xz = math.round((xz).toDouble + (fg44.xz).toDouble); xw = math.round((xw).toDouble + (fg44.xw).toDouble); yx = math.round((yx).toDouble + (fg44.yx).toDouble); yy = math.round((yy).toDouble + (fg44.yy).toDouble); yz = math.round((yz).toDouble + (fg44.yz).toDouble); yw = math.round((yw).toDouble + (fg44.yw).toDouble); zx = math.round((zx).toDouble + (fg44.zx).toDouble); zy = math.round((zy).toDouble + (fg44.zy).toDouble); zz = math.round((zz).toDouble + (fg44.zz).toDouble); zw = math.round((zw).toDouble + (fg44.zw).toDouble); wx = math.round((wx).toDouble + (fg44.wx).toDouble); wy = math.round((wy).toDouble + (fg44.wy).toDouble); wz = math.round((wz).toDouble + (fg44.wz).toDouble); ww = math.round((ww).toDouble + (fg44.ww).toDouble); this }
    def +~~(dg44: GMat4D): this.type = { xx = math.round((xx).toDouble + dg44.xx); xy = math.round((xy).toDouble + dg44.xy); xz = math.round((xz).toDouble + dg44.xz); xw = math.round((xw).toDouble + dg44.xw); yx = math.round((yx).toDouble + dg44.yx); yy = math.round((yy).toDouble + dg44.yy); yz = math.round((yz).toDouble + dg44.yz); yw = math.round((yw).toDouble + dg44.yw); zx = math.round((zx).toDouble + dg44.zx); zy = math.round((zy).toDouble + dg44.zy); zz = math.round((zz).toDouble + dg44.zz); zw = math.round((zw).toDouble + dg44.zw); wx = math.round((wx).toDouble + dg44.wx); wy = math.round((wy).toDouble + dg44.wy); wz = math.round((wz).toDouble + dg44.wz); ww = math.round((ww).toDouble + dg44.ww); this }
    def -~(x0: Long): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; xw = xw - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; yw = yw - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; zw = zw - x0; wx = wx - x0; wy = wy - x0; wz = wz - x0; ww = ww - x0; this }
    def -~~(x0: Double): this.type = { xx = math.round((xx).toDouble - x0); xy = math.round((xy).toDouble - x0); xz = math.round((xz).toDouble - x0); xw = math.round((xw).toDouble - x0); yx = math.round((yx).toDouble - x0); yy = math.round((yy).toDouble - x0); yz = math.round((yz).toDouble - x0); yw = math.round((yw).toDouble - x0); zx = math.round((zx).toDouble - x0); zy = math.round((zy).toDouble - x0); zz = math.round((zz).toDouble - x0); zw = math.round((zw).toDouble - x0); wx = math.round((wx).toDouble - x0); wy = math.round((wy).toDouble - x0); wz = math.round((wz).toDouble - x0); ww = math.round((ww).toDouble - x0); this }
    def -~(sg44: GMat4S): this.type = { xx = xx - (sg44.xx).toLong; xy = xy - (sg44.xy).toLong; xz = xz - (sg44.xz).toLong; xw = xw - (sg44.xw).toLong; yx = yx - (sg44.yx).toLong; yy = yy - (sg44.yy).toLong; yz = yz - (sg44.yz).toLong; yw = yw - (sg44.yw).toLong; zx = zx - (sg44.zx).toLong; zy = zy - (sg44.zy).toLong; zz = zz - (sg44.zz).toLong; zw = zw - (sg44.zw).toLong; wx = wx - (sg44.wx).toLong; wy = wy - (sg44.wy).toLong; wz = wz - (sg44.wz).toLong; ww = ww - (sg44.ww).toLong; this }
    def -~(ig44: GMat4I): this.type = { xx = xx - (ig44.xx).toLong; xy = xy - (ig44.xy).toLong; xz = xz - (ig44.xz).toLong; xw = xw - (ig44.xw).toLong; yx = yx - (ig44.yx).toLong; yy = yy - (ig44.yy).toLong; yz = yz - (ig44.yz).toLong; yw = yw - (ig44.yw).toLong; zx = zx - (ig44.zx).toLong; zy = zy - (ig44.zy).toLong; zz = zz - (ig44.zz).toLong; zw = zw - (ig44.zw).toLong; wx = wx - (ig44.wx).toLong; wy = wy - (ig44.wy).toLong; wz = wz - (ig44.wz).toLong; ww = ww - (ig44.ww).toLong; this }
    def -~(lg44: GMat4L): this.type = { xx = xx - lg44.xx; xy = xy - lg44.xy; xz = xz - lg44.xz; xw = xw - lg44.xw; yx = yx - lg44.yx; yy = yy - lg44.yy; yz = yz - lg44.yz; yw = yw - lg44.yw; zx = zx - lg44.zx; zy = zy - lg44.zy; zz = zz - lg44.zz; zw = zw - lg44.zw; wx = wx - lg44.wx; wy = wy - lg44.wy; wz = wz - lg44.wz; ww = ww - lg44.ww; this }
    def -~(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; xw = xw - xw0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; yw = yw - yw0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; zw = zw - zw0; wx = wx - wx0; wy = wy - wy0; wz = wz - wz0; ww = ww - ww0; this }
    def -~~(fg44: GMat4F): this.type = { xx = math.round((xx).toDouble - (fg44.xx).toDouble); xy = math.round((xy).toDouble - (fg44.xy).toDouble); xz = math.round((xz).toDouble - (fg44.xz).toDouble); xw = math.round((xw).toDouble - (fg44.xw).toDouble); yx = math.round((yx).toDouble - (fg44.yx).toDouble); yy = math.round((yy).toDouble - (fg44.yy).toDouble); yz = math.round((yz).toDouble - (fg44.yz).toDouble); yw = math.round((yw).toDouble - (fg44.yw).toDouble); zx = math.round((zx).toDouble - (fg44.zx).toDouble); zy = math.round((zy).toDouble - (fg44.zy).toDouble); zz = math.round((zz).toDouble - (fg44.zz).toDouble); zw = math.round((zw).toDouble - (fg44.zw).toDouble); wx = math.round((wx).toDouble - (fg44.wx).toDouble); wy = math.round((wy).toDouble - (fg44.wy).toDouble); wz = math.round((wz).toDouble - (fg44.wz).toDouble); ww = math.round((ww).toDouble - (fg44.ww).toDouble); this }
    def -~~(dg44: GMat4D): this.type = { xx = math.round((xx).toDouble - dg44.xx); xy = math.round((xy).toDouble - dg44.xy); xz = math.round((xz).toDouble - dg44.xz); xw = math.round((xw).toDouble - dg44.xw); yx = math.round((yx).toDouble - dg44.yx); yy = math.round((yy).toDouble - dg44.yy); yz = math.round((yz).toDouble - dg44.yz); yw = math.round((yw).toDouble - dg44.yw); zx = math.round((zx).toDouble - dg44.zx); zy = math.round((zy).toDouble - dg44.zy); zz = math.round((zz).toDouble - dg44.zz); zw = math.round((zw).toDouble - dg44.zw); wx = math.round((wx).toDouble - dg44.wx); wy = math.round((wy).toDouble - dg44.wy); wz = math.round((wz).toDouble - dg44.wz); ww = math.round((ww).toDouble - dg44.ww); this }
    def *~(x0: Long): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; xw = xw * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; yw = yw * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; zw = zw * x0; wx = wx * x0; wy = wy * x0; wz = wz * x0; ww = ww * x0; this }
    def *~~(x0: Double): this.type = { xx = math.round((xx).toDouble * x0); xy = math.round((xy).toDouble * x0); xz = math.round((xz).toDouble * x0); xw = math.round((xw).toDouble * x0); yx = math.round((yx).toDouble * x0); yy = math.round((yy).toDouble * x0); yz = math.round((yz).toDouble * x0); yw = math.round((yw).toDouble * x0); zx = math.round((zx).toDouble * x0); zy = math.round((zy).toDouble * x0); zz = math.round((zz).toDouble * x0); zw = math.round((zw).toDouble * x0); wx = math.round((wx).toDouble * x0); wy = math.round((wy).toDouble * x0); wz = math.round((wz).toDouble * x0); ww = math.round((ww).toDouble * x0); this }
    def *~(sg44: GMat4S): this.type = { xx = xx * (sg44.xx).toLong; xy = xy * (sg44.xy).toLong; xz = xz * (sg44.xz).toLong; xw = xw * (sg44.xw).toLong; yx = yx * (sg44.yx).toLong; yy = yy * (sg44.yy).toLong; yz = yz * (sg44.yz).toLong; yw = yw * (sg44.yw).toLong; zx = zx * (sg44.zx).toLong; zy = zy * (sg44.zy).toLong; zz = zz * (sg44.zz).toLong; zw = zw * (sg44.zw).toLong; wx = wx * (sg44.wx).toLong; wy = wy * (sg44.wy).toLong; wz = wz * (sg44.wz).toLong; ww = ww * (sg44.ww).toLong; this }
    def *~(ig44: GMat4I): this.type = { xx = xx * (ig44.xx).toLong; xy = xy * (ig44.xy).toLong; xz = xz * (ig44.xz).toLong; xw = xw * (ig44.xw).toLong; yx = yx * (ig44.yx).toLong; yy = yy * (ig44.yy).toLong; yz = yz * (ig44.yz).toLong; yw = yw * (ig44.yw).toLong; zx = zx * (ig44.zx).toLong; zy = zy * (ig44.zy).toLong; zz = zz * (ig44.zz).toLong; zw = zw * (ig44.zw).toLong; wx = wx * (ig44.wx).toLong; wy = wy * (ig44.wy).toLong; wz = wz * (ig44.wz).toLong; ww = ww * (ig44.ww).toLong; this }
    def *~(lg44: GMat4L): this.type = { xx = xx * lg44.xx; xy = xy * lg44.xy; xz = xz * lg44.xz; xw = xw * lg44.xw; yx = yx * lg44.yx; yy = yy * lg44.yy; yz = yz * lg44.yz; yw = yw * lg44.yw; zx = zx * lg44.zx; zy = zy * lg44.zy; zz = zz * lg44.zz; zw = zw * lg44.zw; wx = wx * lg44.wx; wy = wy * lg44.wy; wz = wz * lg44.wz; ww = ww * lg44.ww; this }
    def *~(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; xw = xw * xw0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; yw = yw * yw0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; zw = zw * zw0; wx = wx * wx0; wy = wy * wy0; wz = wz * wz0; ww = ww * ww0; this }
    def *~~(fg44: GMat4F): this.type = { xx = math.round((xx).toDouble * (fg44.xx).toDouble); xy = math.round((xy).toDouble * (fg44.xy).toDouble); xz = math.round((xz).toDouble * (fg44.xz).toDouble); xw = math.round((xw).toDouble * (fg44.xw).toDouble); yx = math.round((yx).toDouble * (fg44.yx).toDouble); yy = math.round((yy).toDouble * (fg44.yy).toDouble); yz = math.round((yz).toDouble * (fg44.yz).toDouble); yw = math.round((yw).toDouble * (fg44.yw).toDouble); zx = math.round((zx).toDouble * (fg44.zx).toDouble); zy = math.round((zy).toDouble * (fg44.zy).toDouble); zz = math.round((zz).toDouble * (fg44.zz).toDouble); zw = math.round((zw).toDouble * (fg44.zw).toDouble); wx = math.round((wx).toDouble * (fg44.wx).toDouble); wy = math.round((wy).toDouble * (fg44.wy).toDouble); wz = math.round((wz).toDouble * (fg44.wz).toDouble); ww = math.round((ww).toDouble * (fg44.ww).toDouble); this }
    def *~~(dg44: GMat4D): this.type = { xx = math.round((xx).toDouble * dg44.xx); xy = math.round((xy).toDouble * dg44.xy); xz = math.round((xz).toDouble * dg44.xz); xw = math.round((xw).toDouble * dg44.xw); yx = math.round((yx).toDouble * dg44.yx); yy = math.round((yy).toDouble * dg44.yy); yz = math.round((yz).toDouble * dg44.yz); yw = math.round((yw).toDouble * dg44.yw); zx = math.round((zx).toDouble * dg44.zx); zy = math.round((zy).toDouble * dg44.zy); zz = math.round((zz).toDouble * dg44.zz); zw = math.round((zw).toDouble * dg44.zw); wx = math.round((wx).toDouble * dg44.wx); wy = math.round((wy).toDouble * dg44.wy); wz = math.round((wz).toDouble * dg44.wz); ww = math.round((ww).toDouble * dg44.ww); this }
    def /~(x0: Long): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; xw = xw / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; yw = yw / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; zw = zw / x0; wx = wx / x0; wy = wy / x0; wz = wz / x0; ww = ww / x0; this }
    def /~~(x0: Double): this.type = { xx = math.round((xx).toDouble / x0); xy = math.round((xy).toDouble / x0); xz = math.round((xz).toDouble / x0); xw = math.round((xw).toDouble / x0); yx = math.round((yx).toDouble / x0); yy = math.round((yy).toDouble / x0); yz = math.round((yz).toDouble / x0); yw = math.round((yw).toDouble / x0); zx = math.round((zx).toDouble / x0); zy = math.round((zy).toDouble / x0); zz = math.round((zz).toDouble / x0); zw = math.round((zw).toDouble / x0); wx = math.round((wx).toDouble / x0); wy = math.round((wy).toDouble / x0); wz = math.round((wz).toDouble / x0); ww = math.round((ww).toDouble / x0); this }
    def /~(sg44: GMat4S): this.type = { xx = xx / (sg44.xx).toLong; xy = xy / (sg44.xy).toLong; xz = xz / (sg44.xz).toLong; xw = xw / (sg44.xw).toLong; yx = yx / (sg44.yx).toLong; yy = yy / (sg44.yy).toLong; yz = yz / (sg44.yz).toLong; yw = yw / (sg44.yw).toLong; zx = zx / (sg44.zx).toLong; zy = zy / (sg44.zy).toLong; zz = zz / (sg44.zz).toLong; zw = zw / (sg44.zw).toLong; wx = wx / (sg44.wx).toLong; wy = wy / (sg44.wy).toLong; wz = wz / (sg44.wz).toLong; ww = ww / (sg44.ww).toLong; this }
    def /~(ig44: GMat4I): this.type = { xx = xx / (ig44.xx).toLong; xy = xy / (ig44.xy).toLong; xz = xz / (ig44.xz).toLong; xw = xw / (ig44.xw).toLong; yx = yx / (ig44.yx).toLong; yy = yy / (ig44.yy).toLong; yz = yz / (ig44.yz).toLong; yw = yw / (ig44.yw).toLong; zx = zx / (ig44.zx).toLong; zy = zy / (ig44.zy).toLong; zz = zz / (ig44.zz).toLong; zw = zw / (ig44.zw).toLong; wx = wx / (ig44.wx).toLong; wy = wy / (ig44.wy).toLong; wz = wz / (ig44.wz).toLong; ww = ww / (ig44.ww).toLong; this }
    def /~(lg44: GMat4L): this.type = { xx = xx / lg44.xx; xy = xy / lg44.xy; xz = xz / lg44.xz; xw = xw / lg44.xw; yx = yx / lg44.yx; yy = yy / lg44.yy; yz = yz / lg44.yz; yw = yw / lg44.yw; zx = zx / lg44.zx; zy = zy / lg44.zy; zz = zz / lg44.zz; zw = zw / lg44.zw; wx = wx / lg44.wx; wy = wy / lg44.wy; wz = wz / lg44.wz; ww = ww / lg44.ww; this }
    def /~(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; xw = xw / xw0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; yw = yw / yw0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; zw = zw / zw0; wx = wx / wx0; wy = wy / wy0; wz = wz / wz0; ww = ww / ww0; this }
    def /~~(fg44: GMat4F): this.type = { xx = math.round((xx).toDouble / (fg44.xx).toDouble); xy = math.round((xy).toDouble / (fg44.xy).toDouble); xz = math.round((xz).toDouble / (fg44.xz).toDouble); xw = math.round((xw).toDouble / (fg44.xw).toDouble); yx = math.round((yx).toDouble / (fg44.yx).toDouble); yy = math.round((yy).toDouble / (fg44.yy).toDouble); yz = math.round((yz).toDouble / (fg44.yz).toDouble); yw = math.round((yw).toDouble / (fg44.yw).toDouble); zx = math.round((zx).toDouble / (fg44.zx).toDouble); zy = math.round((zy).toDouble / (fg44.zy).toDouble); zz = math.round((zz).toDouble / (fg44.zz).toDouble); zw = math.round((zw).toDouble / (fg44.zw).toDouble); wx = math.round((wx).toDouble / (fg44.wx).toDouble); wy = math.round((wy).toDouble / (fg44.wy).toDouble); wz = math.round((wz).toDouble / (fg44.wz).toDouble); ww = math.round((ww).toDouble / (fg44.ww).toDouble); this }
    def /~~(dg44: GMat4D): this.type = { xx = math.round((xx).toDouble / dg44.xx); xy = math.round((xy).toDouble / dg44.xy); xz = math.round((xz).toDouble / dg44.xz); xw = math.round((xw).toDouble / dg44.xw); yx = math.round((yx).toDouble / dg44.yx); yy = math.round((yy).toDouble / dg44.yy); yz = math.round((yz).toDouble / dg44.yz); yw = math.round((yw).toDouble / dg44.yw); zx = math.round((zx).toDouble / dg44.zx); zy = math.round((zy).toDouble / dg44.zy); zz = math.round((zz).toDouble / dg44.zz); zw = math.round((zw).toDouble / dg44.zw); wx = math.round((wx).toDouble / dg44.wx); wy = math.round((wy).toDouble / dg44.wy); wz = math.round((wz).toDouble / dg44.wz); ww = math.round((ww).toDouble / dg44.ww); this }
    def maxEq(x0: Long): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); xw = math.max(xw,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); yw = math.max(yw,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); zw = math.max(zw,x0); wx = math.max(wx,x0); wy = math.max(wy,x0); wz = math.max(wz,x0); ww = math.max(ww,x0); this }
    def maxEqCast(x0: Double): this.type = { xx = math.round(math.max((xx).toDouble,x0)); xy = math.round(math.max((xy).toDouble,x0)); xz = math.round(math.max((xz).toDouble,x0)); xw = math.round(math.max((xw).toDouble,x0)); yx = math.round(math.max((yx).toDouble,x0)); yy = math.round(math.max((yy).toDouble,x0)); yz = math.round(math.max((yz).toDouble,x0)); yw = math.round(math.max((yw).toDouble,x0)); zx = math.round(math.max((zx).toDouble,x0)); zy = math.round(math.max((zy).toDouble,x0)); zz = math.round(math.max((zz).toDouble,x0)); zw = math.round(math.max((zw).toDouble,x0)); wx = math.round(math.max((wx).toDouble,x0)); wy = math.round(math.max((wy).toDouble,x0)); wz = math.round(math.max((wz).toDouble,x0)); ww = math.round(math.max((ww).toDouble,x0)); this }
    def maxEq(sg44: GMat4S): this.type = { xx = math.max(xx,(sg44.xx).toLong); xy = math.max(xy,(sg44.xy).toLong); xz = math.max(xz,(sg44.xz).toLong); xw = math.max(xw,(sg44.xw).toLong); yx = math.max(yx,(sg44.yx).toLong); yy = math.max(yy,(sg44.yy).toLong); yz = math.max(yz,(sg44.yz).toLong); yw = math.max(yw,(sg44.yw).toLong); zx = math.max(zx,(sg44.zx).toLong); zy = math.max(zy,(sg44.zy).toLong); zz = math.max(zz,(sg44.zz).toLong); zw = math.max(zw,(sg44.zw).toLong); wx = math.max(wx,(sg44.wx).toLong); wy = math.max(wy,(sg44.wy).toLong); wz = math.max(wz,(sg44.wz).toLong); ww = math.max(ww,(sg44.ww).toLong); this }
    def maxEq(ig44: GMat4I): this.type = { xx = math.max(xx,(ig44.xx).toLong); xy = math.max(xy,(ig44.xy).toLong); xz = math.max(xz,(ig44.xz).toLong); xw = math.max(xw,(ig44.xw).toLong); yx = math.max(yx,(ig44.yx).toLong); yy = math.max(yy,(ig44.yy).toLong); yz = math.max(yz,(ig44.yz).toLong); yw = math.max(yw,(ig44.yw).toLong); zx = math.max(zx,(ig44.zx).toLong); zy = math.max(zy,(ig44.zy).toLong); zz = math.max(zz,(ig44.zz).toLong); zw = math.max(zw,(ig44.zw).toLong); wx = math.max(wx,(ig44.wx).toLong); wy = math.max(wy,(ig44.wy).toLong); wz = math.max(wz,(ig44.wz).toLong); ww = math.max(ww,(ig44.ww).toLong); this }
    def maxEq(lg44: GMat4L): this.type = { xx = math.max(xx,lg44.xx); xy = math.max(xy,lg44.xy); xz = math.max(xz,lg44.xz); xw = math.max(xw,lg44.xw); yx = math.max(yx,lg44.yx); yy = math.max(yy,lg44.yy); yz = math.max(yz,lg44.yz); yw = math.max(yw,lg44.yw); zx = math.max(zx,lg44.zx); zy = math.max(zy,lg44.zy); zz = math.max(zz,lg44.zz); zw = math.max(zw,lg44.zw); wx = math.max(wx,lg44.wx); wy = math.max(wy,lg44.wy); wz = math.max(wz,lg44.wz); ww = math.max(ww,lg44.ww); this }
    def maxEq(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); xw = math.max(xw,xw0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); yw = math.max(yw,yw0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); zw = math.max(zw,zw0); wx = math.max(wx,wx0); wy = math.max(wy,wy0); wz = math.max(wz,wz0); ww = math.max(ww,ww0); this }
    def maxEqCast(fg44: GMat4F): this.type = { xx = math.round(math.max((xx).toDouble,(fg44.xx).toDouble)); xy = math.round(math.max((xy).toDouble,(fg44.xy).toDouble)); xz = math.round(math.max((xz).toDouble,(fg44.xz).toDouble)); xw = math.round(math.max((xw).toDouble,(fg44.xw).toDouble)); yx = math.round(math.max((yx).toDouble,(fg44.yx).toDouble)); yy = math.round(math.max((yy).toDouble,(fg44.yy).toDouble)); yz = math.round(math.max((yz).toDouble,(fg44.yz).toDouble)); yw = math.round(math.max((yw).toDouble,(fg44.yw).toDouble)); zx = math.round(math.max((zx).toDouble,(fg44.zx).toDouble)); zy = math.round(math.max((zy).toDouble,(fg44.zy).toDouble)); zz = math.round(math.max((zz).toDouble,(fg44.zz).toDouble)); zw = math.round(math.max((zw).toDouble,(fg44.zw).toDouble)); wx = math.round(math.max((wx).toDouble,(fg44.wx).toDouble)); wy = math.round(math.max((wy).toDouble,(fg44.wy).toDouble)); wz = math.round(math.max((wz).toDouble,(fg44.wz).toDouble)); ww = math.round(math.max((ww).toDouble,(fg44.ww).toDouble)); this }
    def maxEqCast(dg44: GMat4D): this.type = { xx = math.round(math.max((xx).toDouble,dg44.xx)); xy = math.round(math.max((xy).toDouble,dg44.xy)); xz = math.round(math.max((xz).toDouble,dg44.xz)); xw = math.round(math.max((xw).toDouble,dg44.xw)); yx = math.round(math.max((yx).toDouble,dg44.yx)); yy = math.round(math.max((yy).toDouble,dg44.yy)); yz = math.round(math.max((yz).toDouble,dg44.yz)); yw = math.round(math.max((yw).toDouble,dg44.yw)); zx = math.round(math.max((zx).toDouble,dg44.zx)); zy = math.round(math.max((zy).toDouble,dg44.zy)); zz = math.round(math.max((zz).toDouble,dg44.zz)); zw = math.round(math.max((zw).toDouble,dg44.zw)); wx = math.round(math.max((wx).toDouble,dg44.wx)); wy = math.round(math.max((wy).toDouble,dg44.wy)); wz = math.round(math.max((wz).toDouble,dg44.wz)); ww = math.round(math.max((ww).toDouble,dg44.ww)); this }
    def minEq(x0: Long): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); xw = math.min(xw,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); yw = math.min(yw,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); zw = math.min(zw,x0); wx = math.min(wx,x0); wy = math.min(wy,x0); wz = math.min(wz,x0); ww = math.min(ww,x0); this }
    def minEqCast(x0: Double): this.type = { xx = math.round(math.min((xx).toDouble,x0)); xy = math.round(math.min((xy).toDouble,x0)); xz = math.round(math.min((xz).toDouble,x0)); xw = math.round(math.min((xw).toDouble,x0)); yx = math.round(math.min((yx).toDouble,x0)); yy = math.round(math.min((yy).toDouble,x0)); yz = math.round(math.min((yz).toDouble,x0)); yw = math.round(math.min((yw).toDouble,x0)); zx = math.round(math.min((zx).toDouble,x0)); zy = math.round(math.min((zy).toDouble,x0)); zz = math.round(math.min((zz).toDouble,x0)); zw = math.round(math.min((zw).toDouble,x0)); wx = math.round(math.min((wx).toDouble,x0)); wy = math.round(math.min((wy).toDouble,x0)); wz = math.round(math.min((wz).toDouble,x0)); ww = math.round(math.min((ww).toDouble,x0)); this }
    def minEq(sg44: GMat4S): this.type = { xx = math.min(xx,(sg44.xx).toLong); xy = math.min(xy,(sg44.xy).toLong); xz = math.min(xz,(sg44.xz).toLong); xw = math.min(xw,(sg44.xw).toLong); yx = math.min(yx,(sg44.yx).toLong); yy = math.min(yy,(sg44.yy).toLong); yz = math.min(yz,(sg44.yz).toLong); yw = math.min(yw,(sg44.yw).toLong); zx = math.min(zx,(sg44.zx).toLong); zy = math.min(zy,(sg44.zy).toLong); zz = math.min(zz,(sg44.zz).toLong); zw = math.min(zw,(sg44.zw).toLong); wx = math.min(wx,(sg44.wx).toLong); wy = math.min(wy,(sg44.wy).toLong); wz = math.min(wz,(sg44.wz).toLong); ww = math.min(ww,(sg44.ww).toLong); this }
    def minEq(ig44: GMat4I): this.type = { xx = math.min(xx,(ig44.xx).toLong); xy = math.min(xy,(ig44.xy).toLong); xz = math.min(xz,(ig44.xz).toLong); xw = math.min(xw,(ig44.xw).toLong); yx = math.min(yx,(ig44.yx).toLong); yy = math.min(yy,(ig44.yy).toLong); yz = math.min(yz,(ig44.yz).toLong); yw = math.min(yw,(ig44.yw).toLong); zx = math.min(zx,(ig44.zx).toLong); zy = math.min(zy,(ig44.zy).toLong); zz = math.min(zz,(ig44.zz).toLong); zw = math.min(zw,(ig44.zw).toLong); wx = math.min(wx,(ig44.wx).toLong); wy = math.min(wy,(ig44.wy).toLong); wz = math.min(wz,(ig44.wz).toLong); ww = math.min(ww,(ig44.ww).toLong); this }
    def minEq(lg44: GMat4L): this.type = { xx = math.min(xx,lg44.xx); xy = math.min(xy,lg44.xy); xz = math.min(xz,lg44.xz); xw = math.min(xw,lg44.xw); yx = math.min(yx,lg44.yx); yy = math.min(yy,lg44.yy); yz = math.min(yz,lg44.yz); yw = math.min(yw,lg44.yw); zx = math.min(zx,lg44.zx); zy = math.min(zy,lg44.zy); zz = math.min(zz,lg44.zz); zw = math.min(zw,lg44.zw); wx = math.min(wx,lg44.wx); wy = math.min(wy,lg44.wy); wz = math.min(wz,lg44.wz); ww = math.min(ww,lg44.ww); this }
    def minEq(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); xw = math.min(xw,xw0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); yw = math.min(yw,yw0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); zw = math.min(zw,zw0); wx = math.min(wx,wx0); wy = math.min(wy,wy0); wz = math.min(wz,wz0); ww = math.min(ww,ww0); this }
    def minEqCast(fg44: GMat4F): this.type = { xx = math.round(math.min((xx).toDouble,(fg44.xx).toDouble)); xy = math.round(math.min((xy).toDouble,(fg44.xy).toDouble)); xz = math.round(math.min((xz).toDouble,(fg44.xz).toDouble)); xw = math.round(math.min((xw).toDouble,(fg44.xw).toDouble)); yx = math.round(math.min((yx).toDouble,(fg44.yx).toDouble)); yy = math.round(math.min((yy).toDouble,(fg44.yy).toDouble)); yz = math.round(math.min((yz).toDouble,(fg44.yz).toDouble)); yw = math.round(math.min((yw).toDouble,(fg44.yw).toDouble)); zx = math.round(math.min((zx).toDouble,(fg44.zx).toDouble)); zy = math.round(math.min((zy).toDouble,(fg44.zy).toDouble)); zz = math.round(math.min((zz).toDouble,(fg44.zz).toDouble)); zw = math.round(math.min((zw).toDouble,(fg44.zw).toDouble)); wx = math.round(math.min((wx).toDouble,(fg44.wx).toDouble)); wy = math.round(math.min((wy).toDouble,(fg44.wy).toDouble)); wz = math.round(math.min((wz).toDouble,(fg44.wz).toDouble)); ww = math.round(math.min((ww).toDouble,(fg44.ww).toDouble)); this }
    def minEqCast(dg44: GMat4D): this.type = { xx = math.round(math.min((xx).toDouble,dg44.xx)); xy = math.round(math.min((xy).toDouble,dg44.xy)); xz = math.round(math.min((xz).toDouble,dg44.xz)); xw = math.round(math.min((xw).toDouble,dg44.xw)); yx = math.round(math.min((yx).toDouble,dg44.yx)); yy = math.round(math.min((yy).toDouble,dg44.yy)); yz = math.round(math.min((yz).toDouble,dg44.yz)); yw = math.round(math.min((yw).toDouble,dg44.yw)); zx = math.round(math.min((zx).toDouble,dg44.zx)); zy = math.round(math.min((zy).toDouble,dg44.zy)); zz = math.round(math.min((zz).toDouble,dg44.zz)); zw = math.round(math.min((zw).toDouble,dg44.zw)); wx = math.round(math.min((wx).toDouble,dg44.wx)); wy = math.round(math.min((wy).toDouble,dg44.wy)); wz = math.round(math.min((wz).toDouble,dg44.wz)); ww = math.round(math.min((ww).toDouble,dg44.ww)); this }
    def operateEq(sg44: GMat4S)(fun: (Long,Long)=>Long) = { xx = fun(xx,(sg44.xx).toLong); xy = fun(xy,(sg44.xy).toLong); xz = fun(xz,(sg44.xz).toLong); xw = fun(xw,(sg44.xw).toLong); yx = fun(yx,(sg44.yx).toLong); yy = fun(yy,(sg44.yy).toLong); yz = fun(yz,(sg44.yz).toLong); yw = fun(yw,(sg44.yw).toLong); zx = fun(zx,(sg44.zx).toLong); zy = fun(zy,(sg44.zy).toLong); zz = fun(zz,(sg44.zz).toLong); zw = fun(zw,(sg44.zw).toLong); wx = fun(wx,(sg44.wx).toLong); wy = fun(wy,(sg44.wy).toLong); wz = fun(wz,(sg44.wz).toLong); ww = fun(ww,(sg44.ww).toLong); this }
    def operateEq(ig44: GMat4I)(fun: (Long,Long)=>Long) = { xx = fun(xx,(ig44.xx).toLong); xy = fun(xy,(ig44.xy).toLong); xz = fun(xz,(ig44.xz).toLong); xw = fun(xw,(ig44.xw).toLong); yx = fun(yx,(ig44.yx).toLong); yy = fun(yy,(ig44.yy).toLong); yz = fun(yz,(ig44.yz).toLong); yw = fun(yw,(ig44.yw).toLong); zx = fun(zx,(ig44.zx).toLong); zy = fun(zy,(ig44.zy).toLong); zz = fun(zz,(ig44.zz).toLong); zw = fun(zw,(ig44.zw).toLong); wx = fun(wx,(ig44.wx).toLong); wy = fun(wy,(ig44.wy).toLong); wz = fun(wz,(ig44.wz).toLong); ww = fun(ww,(ig44.ww).toLong); this }
    def operateEq(lg44: GMat4L)(fun: (Long,Long)=>Long) = { xx = fun(xx,lg44.xx); xy = fun(xy,lg44.xy); xz = fun(xz,lg44.xz); xw = fun(xw,lg44.xw); yx = fun(yx,lg44.yx); yy = fun(yy,lg44.yy); yz = fun(yz,lg44.yz); yw = fun(yw,lg44.yw); zx = fun(zx,lg44.zx); zy = fun(zy,lg44.zy); zz = fun(zz,lg44.zz); zw = fun(zw,lg44.zw); wx = fun(wx,lg44.wx); wy = fun(wy,lg44.wy); wz = fun(wz,lg44.wz); ww = fun(ww,lg44.ww); this }
    def operateEqCast(fg44: GMat4F)(fun: (Double,Double)=>Double) = { xx = math.round(fun((xx).toDouble,(fg44.xx).toDouble)); xy = math.round(fun((xy).toDouble,(fg44.xy).toDouble)); xz = math.round(fun((xz).toDouble,(fg44.xz).toDouble)); xw = math.round(fun((xw).toDouble,(fg44.xw).toDouble)); yx = math.round(fun((yx).toDouble,(fg44.yx).toDouble)); yy = math.round(fun((yy).toDouble,(fg44.yy).toDouble)); yz = math.round(fun((yz).toDouble,(fg44.yz).toDouble)); yw = math.round(fun((yw).toDouble,(fg44.yw).toDouble)); zx = math.round(fun((zx).toDouble,(fg44.zx).toDouble)); zy = math.round(fun((zy).toDouble,(fg44.zy).toDouble)); zz = math.round(fun((zz).toDouble,(fg44.zz).toDouble)); zw = math.round(fun((zw).toDouble,(fg44.zw).toDouble)); wx = math.round(fun((wx).toDouble,(fg44.wx).toDouble)); wy = math.round(fun((wy).toDouble,(fg44.wy).toDouble)); wz = math.round(fun((wz).toDouble,(fg44.wz).toDouble)); ww = math.round(fun((ww).toDouble,(fg44.ww).toDouble)); this }
    def operateEqCast(dg44: GMat4D)(fun: (Double,Double)=>Double) = { xx = math.round(fun((xx).toDouble,dg44.xx)); xy = math.round(fun((xy).toDouble,dg44.xy)); xz = math.round(fun((xz).toDouble,dg44.xz)); xw = math.round(fun((xw).toDouble,dg44.xw)); yx = math.round(fun((yx).toDouble,dg44.yx)); yy = math.round(fun((yy).toDouble,dg44.yy)); yz = math.round(fun((yz).toDouble,dg44.yz)); yw = math.round(fun((yw).toDouble,dg44.yw)); zx = math.round(fun((zx).toDouble,dg44.zx)); zy = math.round(fun((zy).toDouble,dg44.zy)); zz = math.round(fun((zz).toDouble,dg44.zz)); zw = math.round(fun((zw).toDouble,dg44.zw)); wx = math.round(fun((wx).toDouble,dg44.wx)); wy = math.round(fun((wy).toDouble,dg44.wy)); wz = math.round(fun((wz).toDouble,dg44.wz)); ww = math.round(fun((ww).toDouble,dg44.ww)); this }
    def :|~(sg4: GVec4S) = { xx = (sg4.x).toLong; xy = (sg4.x).toLong; xz = (sg4.x).toLong; xw = (sg4.x).toLong; yx = (sg4.y).toLong; yy = (sg4.y).toLong; yz = (sg4.y).toLong; yw = (sg4.y).toLong; zx = (sg4.z).toLong; zy = (sg4.z).toLong; zz = (sg4.z).toLong; zw = (sg4.z).toLong; wx = (sg4.w).toLong; wy = (sg4.w).toLong; wz = (sg4.w).toLong; ww = (sg4.w).toLong; this }
    def :-~(sg4: GVec4S) = { xx = (sg4.x).toLong; xy = (sg4.y).toLong; xz = (sg4.z).toLong; xw = (sg4.w).toLong; yx = (sg4.x).toLong; yy = (sg4.y).toLong; yz = (sg4.z).toLong; yw = (sg4.w).toLong; zx = (sg4.x).toLong; zy = (sg4.y).toLong; zz = (sg4.z).toLong; zw = (sg4.w).toLong; wx = (sg4.x).toLong; wy = (sg4.y).toLong; wz = (sg4.z).toLong; ww = (sg4.w).toLong; this }
    def :|~(ig4: GVec4I) = { xx = (ig4.x).toLong; xy = (ig4.x).toLong; xz = (ig4.x).toLong; xw = (ig4.x).toLong; yx = (ig4.y).toLong; yy = (ig4.y).toLong; yz = (ig4.y).toLong; yw = (ig4.y).toLong; zx = (ig4.z).toLong; zy = (ig4.z).toLong; zz = (ig4.z).toLong; zw = (ig4.z).toLong; wx = (ig4.w).toLong; wy = (ig4.w).toLong; wz = (ig4.w).toLong; ww = (ig4.w).toLong; this }
    def :-~(ig4: GVec4I) = { xx = (ig4.x).toLong; xy = (ig4.y).toLong; xz = (ig4.z).toLong; xw = (ig4.w).toLong; yx = (ig4.x).toLong; yy = (ig4.y).toLong; yz = (ig4.z).toLong; yw = (ig4.w).toLong; zx = (ig4.x).toLong; zy = (ig4.y).toLong; zz = (ig4.z).toLong; zw = (ig4.w).toLong; wx = (ig4.x).toLong; wy = (ig4.y).toLong; wz = (ig4.z).toLong; ww = (ig4.w).toLong; this }
    def :|~(lg4: GVec4L) = { xx = lg4.x; xy = lg4.x; xz = lg4.x; xw = lg4.x; yx = lg4.y; yy = lg4.y; yz = lg4.y; yw = lg4.y; zx = lg4.z; zy = lg4.z; zz = lg4.z; zw = lg4.z; wx = lg4.w; wy = lg4.w; wz = lg4.w; ww = lg4.w; this }
    def :-~(lg4: GVec4L) = { xx = lg4.x; xy = lg4.y; xz = lg4.z; xw = lg4.w; yx = lg4.x; yy = lg4.y; yz = lg4.z; yw = lg4.w; zx = lg4.x; zy = lg4.y; zz = lg4.z; zw = lg4.w; wx = lg4.x; wy = lg4.y; wz = lg4.z; ww = lg4.w; this }
    def :|~~(fg4: GVec4F) = { xx = math.round((fg4.x).toDouble); xy = math.round((fg4.x).toDouble); xz = math.round((fg4.x).toDouble); xw = math.round((fg4.x).toDouble); yx = math.round((fg4.y).toDouble); yy = math.round((fg4.y).toDouble); yz = math.round((fg4.y).toDouble); yw = math.round((fg4.y).toDouble); zx = math.round((fg4.z).toDouble); zy = math.round((fg4.z).toDouble); zz = math.round((fg4.z).toDouble); zw = math.round((fg4.z).toDouble); wx = math.round((fg4.w).toDouble); wy = math.round((fg4.w).toDouble); wz = math.round((fg4.w).toDouble); ww = math.round((fg4.w).toDouble); this }
    def :-~~(fg4: GVec4F) = { xx = math.round((fg4.x).toDouble); xy = math.round((fg4.y).toDouble); xz = math.round((fg4.z).toDouble); xw = math.round((fg4.w).toDouble); yx = math.round((fg4.x).toDouble); yy = math.round((fg4.y).toDouble); yz = math.round((fg4.z).toDouble); yw = math.round((fg4.w).toDouble); zx = math.round((fg4.x).toDouble); zy = math.round((fg4.y).toDouble); zz = math.round((fg4.z).toDouble); zw = math.round((fg4.w).toDouble); wx = math.round((fg4.x).toDouble); wy = math.round((fg4.y).toDouble); wz = math.round((fg4.z).toDouble); ww = math.round((fg4.w).toDouble); this }
    def :|~~(dg4: GVec4D) = { xx = math.round(dg4.x); xy = math.round(dg4.x); xz = math.round(dg4.x); xw = math.round(dg4.x); yx = math.round(dg4.y); yy = math.round(dg4.y); yz = math.round(dg4.y); yw = math.round(dg4.y); zx = math.round(dg4.z); zy = math.round(dg4.z); zz = math.round(dg4.z); zw = math.round(dg4.z); wx = math.round(dg4.w); wy = math.round(dg4.w); wz = math.round(dg4.w); ww = math.round(dg4.w); this }
    def :-~~(dg4: GVec4D) = { xx = math.round(dg4.x); xy = math.round(dg4.y); xz = math.round(dg4.z); xw = math.round(dg4.w); yx = math.round(dg4.x); yy = math.round(dg4.y); yz = math.round(dg4.z); yw = math.round(dg4.w); zx = math.round(dg4.x); zy = math.round(dg4.y); zz = math.round(dg4.z); zw = math.round(dg4.w); wx = math.round(dg4.x); wy = math.round(dg4.y); wz = math.round(dg4.z); ww = math.round(dg4.w); this }
    def **~(sg44: GMat4S) = {val xx0 = xx*(sg44.xx).toLong+xy*(sg44.yx).toLong+xz*(sg44.zx).toLong+xw*(sg44.wx).toLong; val xy0 = xx*(sg44.xy).toLong+xy*(sg44.yy).toLong+xz*(sg44.zy).toLong+xw*(sg44.wy).toLong; val xz0 = xx*(sg44.xz).toLong+xy*(sg44.yz).toLong+xz*(sg44.zz).toLong+xw*(sg44.wz).toLong; val xw0 = xx*(sg44.xw).toLong+xy*(sg44.yw).toLong+xz*(sg44.zw).toLong+xw*(sg44.ww).toLong; val yx0 = yx*(sg44.xx).toLong+yy*(sg44.yx).toLong+yz*(sg44.zx).toLong+yw*(sg44.wx).toLong; val yy0 = yx*(sg44.xy).toLong+yy*(sg44.yy).toLong+yz*(sg44.zy).toLong+yw*(sg44.wy).toLong; val yz0 = yx*(sg44.xz).toLong+yy*(sg44.yz).toLong+yz*(sg44.zz).toLong+yw*(sg44.wz).toLong; val yw0 = yx*(sg44.xw).toLong+yy*(sg44.yw).toLong+yz*(sg44.zw).toLong+yw*(sg44.ww).toLong; val zx0 = zx*(sg44.xx).toLong+zy*(sg44.yx).toLong+zz*(sg44.zx).toLong+zw*(sg44.wx).toLong; val zy0 = zx*(sg44.xy).toLong+zy*(sg44.yy).toLong+zz*(sg44.zy).toLong+zw*(sg44.wy).toLong; val zz0 = zx*(sg44.xz).toLong+zy*(sg44.yz).toLong+zz*(sg44.zz).toLong+zw*(sg44.wz).toLong; val zw0 = zx*(sg44.xw).toLong+zy*(sg44.yw).toLong+zz*(sg44.zw).toLong+zw*(sg44.ww).toLong; val wx0 = wx*(sg44.xx).toLong+wy*(sg44.yx).toLong+wz*(sg44.zx).toLong+ww*(sg44.wx).toLong; val wy0 = wx*(sg44.xy).toLong+wy*(sg44.yy).toLong+wz*(sg44.zy).toLong+ww*(sg44.wy).toLong; val wz0 = wx*(sg44.xz).toLong+wy*(sg44.yz).toLong+wz*(sg44.zz).toLong+ww*(sg44.wz).toLong; val ww0 = wx*(sg44.xw).toLong+wy*(sg44.yw).toLong+wz*(sg44.zw).toLong+ww*(sg44.ww).toLong; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(ig44: GMat4I) = {val xx0 = xx*(ig44.xx).toLong+xy*(ig44.yx).toLong+xz*(ig44.zx).toLong+xw*(ig44.wx).toLong; val xy0 = xx*(ig44.xy).toLong+xy*(ig44.yy).toLong+xz*(ig44.zy).toLong+xw*(ig44.wy).toLong; val xz0 = xx*(ig44.xz).toLong+xy*(ig44.yz).toLong+xz*(ig44.zz).toLong+xw*(ig44.wz).toLong; val xw0 = xx*(ig44.xw).toLong+xy*(ig44.yw).toLong+xz*(ig44.zw).toLong+xw*(ig44.ww).toLong; val yx0 = yx*(ig44.xx).toLong+yy*(ig44.yx).toLong+yz*(ig44.zx).toLong+yw*(ig44.wx).toLong; val yy0 = yx*(ig44.xy).toLong+yy*(ig44.yy).toLong+yz*(ig44.zy).toLong+yw*(ig44.wy).toLong; val yz0 = yx*(ig44.xz).toLong+yy*(ig44.yz).toLong+yz*(ig44.zz).toLong+yw*(ig44.wz).toLong; val yw0 = yx*(ig44.xw).toLong+yy*(ig44.yw).toLong+yz*(ig44.zw).toLong+yw*(ig44.ww).toLong; val zx0 = zx*(ig44.xx).toLong+zy*(ig44.yx).toLong+zz*(ig44.zx).toLong+zw*(ig44.wx).toLong; val zy0 = zx*(ig44.xy).toLong+zy*(ig44.yy).toLong+zz*(ig44.zy).toLong+zw*(ig44.wy).toLong; val zz0 = zx*(ig44.xz).toLong+zy*(ig44.yz).toLong+zz*(ig44.zz).toLong+zw*(ig44.wz).toLong; val zw0 = zx*(ig44.xw).toLong+zy*(ig44.yw).toLong+zz*(ig44.zw).toLong+zw*(ig44.ww).toLong; val wx0 = wx*(ig44.xx).toLong+wy*(ig44.yx).toLong+wz*(ig44.zx).toLong+ww*(ig44.wx).toLong; val wy0 = wx*(ig44.xy).toLong+wy*(ig44.yy).toLong+wz*(ig44.zy).toLong+ww*(ig44.wy).toLong; val wz0 = wx*(ig44.xz).toLong+wy*(ig44.yz).toLong+wz*(ig44.zz).toLong+ww*(ig44.wz).toLong; val ww0 = wx*(ig44.xw).toLong+wy*(ig44.yw).toLong+wz*(ig44.zw).toLong+ww*(ig44.ww).toLong; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(lg44: GMat4L) = {val xx0 = xx*lg44.xx+xy*lg44.yx+xz*lg44.zx+xw*lg44.wx; val xy0 = xx*lg44.xy+xy*lg44.yy+xz*lg44.zy+xw*lg44.wy; val xz0 = xx*lg44.xz+xy*lg44.yz+xz*lg44.zz+xw*lg44.wz; val xw0 = xx*lg44.xw+xy*lg44.yw+xz*lg44.zw+xw*lg44.ww; val yx0 = yx*lg44.xx+yy*lg44.yx+yz*lg44.zx+yw*lg44.wx; val yy0 = yx*lg44.xy+yy*lg44.yy+yz*lg44.zy+yw*lg44.wy; val yz0 = yx*lg44.xz+yy*lg44.yz+yz*lg44.zz+yw*lg44.wz; val yw0 = yx*lg44.xw+yy*lg44.yw+yz*lg44.zw+yw*lg44.ww; val zx0 = zx*lg44.xx+zy*lg44.yx+zz*lg44.zx+zw*lg44.wx; val zy0 = zx*lg44.xy+zy*lg44.yy+zz*lg44.zy+zw*lg44.wy; val zz0 = zx*lg44.xz+zy*lg44.yz+zz*lg44.zz+zw*lg44.wz; val zw0 = zx*lg44.xw+zy*lg44.yw+zz*lg44.zw+zw*lg44.ww; val wx0 = wx*lg44.xx+wy*lg44.yx+wz*lg44.zx+ww*lg44.wx; val wy0 = wx*lg44.xy+wy*lg44.yy+wz*lg44.zy+ww*lg44.wy; val wz0 = wx*lg44.xz+wy*lg44.yz+wz*lg44.zz+ww*lg44.wz; val ww0 = wx*lg44.xw+wy*lg44.yw+wz*lg44.zw+ww*lg44.ww; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~~(fg44: GMat4F) = {val xx0 = (xx).toDouble*(fg44.xx).toDouble+(xy).toDouble*(fg44.yx).toDouble+(xz).toDouble*(fg44.zx).toDouble+(xw).toDouble*(fg44.wx).toDouble; val xy0 = (xx).toDouble*(fg44.xy).toDouble+(xy).toDouble*(fg44.yy).toDouble+(xz).toDouble*(fg44.zy).toDouble+(xw).toDouble*(fg44.wy).toDouble; val xz0 = (xx).toDouble*(fg44.xz).toDouble+(xy).toDouble*(fg44.yz).toDouble+(xz).toDouble*(fg44.zz).toDouble+(xw).toDouble*(fg44.wz).toDouble; val xw0 = (xx).toDouble*(fg44.xw).toDouble+(xy).toDouble*(fg44.yw).toDouble+(xz).toDouble*(fg44.zw).toDouble+(xw).toDouble*(fg44.ww).toDouble; val yx0 = (yx).toDouble*(fg44.xx).toDouble+(yy).toDouble*(fg44.yx).toDouble+(yz).toDouble*(fg44.zx).toDouble+(yw).toDouble*(fg44.wx).toDouble; val yy0 = (yx).toDouble*(fg44.xy).toDouble+(yy).toDouble*(fg44.yy).toDouble+(yz).toDouble*(fg44.zy).toDouble+(yw).toDouble*(fg44.wy).toDouble; val yz0 = (yx).toDouble*(fg44.xz).toDouble+(yy).toDouble*(fg44.yz).toDouble+(yz).toDouble*(fg44.zz).toDouble+(yw).toDouble*(fg44.wz).toDouble; val yw0 = (yx).toDouble*(fg44.xw).toDouble+(yy).toDouble*(fg44.yw).toDouble+(yz).toDouble*(fg44.zw).toDouble+(yw).toDouble*(fg44.ww).toDouble; val zx0 = (zx).toDouble*(fg44.xx).toDouble+(zy).toDouble*(fg44.yx).toDouble+(zz).toDouble*(fg44.zx).toDouble+(zw).toDouble*(fg44.wx).toDouble; val zy0 = (zx).toDouble*(fg44.xy).toDouble+(zy).toDouble*(fg44.yy).toDouble+(zz).toDouble*(fg44.zy).toDouble+(zw).toDouble*(fg44.wy).toDouble; val zz0 = (zx).toDouble*(fg44.xz).toDouble+(zy).toDouble*(fg44.yz).toDouble+(zz).toDouble*(fg44.zz).toDouble+(zw).toDouble*(fg44.wz).toDouble; val zw0 = (zx).toDouble*(fg44.xw).toDouble+(zy).toDouble*(fg44.yw).toDouble+(zz).toDouble*(fg44.zw).toDouble+(zw).toDouble*(fg44.ww).toDouble; val wx0 = (wx).toDouble*(fg44.xx).toDouble+(wy).toDouble*(fg44.yx).toDouble+(wz).toDouble*(fg44.zx).toDouble+(ww).toDouble*(fg44.wx).toDouble; val wy0 = (wx).toDouble*(fg44.xy).toDouble+(wy).toDouble*(fg44.yy).toDouble+(wz).toDouble*(fg44.zy).toDouble+(ww).toDouble*(fg44.wy).toDouble; val wz0 = (wx).toDouble*(fg44.xz).toDouble+(wy).toDouble*(fg44.yz).toDouble+(wz).toDouble*(fg44.zz).toDouble+(ww).toDouble*(fg44.wz).toDouble; val ww0 = (wx).toDouble*(fg44.xw).toDouble+(wy).toDouble*(fg44.yw).toDouble+(wz).toDouble*(fg44.zw).toDouble+(ww).toDouble*(fg44.ww).toDouble; xx = math.round(xx0); xy = math.round(xy0); xz = math.round(xz0); xw = math.round(xw0); yx = math.round(yx0); yy = math.round(yy0); yz = math.round(yz0); yw = math.round(yw0); zx = math.round(zx0); zy = math.round(zy0); zz = math.round(zz0); zw = math.round(zw0); wx = math.round(wx0); wy = math.round(wy0); wz = math.round(wz0); ww = math.round(ww0); this }
    def **~~(dg44: GMat4D) = {val xx0 = (xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx; val xy0 = (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy; val xz0 = (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz; val xw0 = (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww; val yx0 = (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx; val yy0 = (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy; val yz0 = (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz; val yw0 = (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww; val zx0 = (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx; val zy0 = (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy; val zz0 = (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz; val zw0 = (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww; val wx0 = (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx; val wy0 = (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy; val wz0 = (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz; val ww0 = (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww; xx = math.round(xx0); xy = math.round(xy0); xz = math.round(xz0); xw = math.round(xw0); yx = math.round(yx0); yy = math.round(yy0); yz = math.round(yz0); yw = math.round(yw0); zx = math.round(zx0); zy = math.round(zy0); zz = math.round(zz0); zw = math.round(zw0); wx = math.round(wx0); wy = math.round(wy0); wz = math.round(wz0); ww = math.round(ww0); this }
    class RowViewX extends AVec4L { def x = xx; def x_=(x0: Long) { xx = x0 }; def y = xy; def y_=(x0: Long) { xy = x0 }; def z = xz; def z_=(x0: Long) { xz = x0 }; def w = xw; def w_=(x0: Long) { xw = x0 } }
    class ColViewX extends AVec4L { def x = xx; def x_=(x0: Long) { xx = x0 }; def y = yx; def y_=(x0: Long) { yx = x0 }; def z = zx; def z_=(x0: Long) { zx = x0 }; def w = wx; def w_=(x0: Long) { wx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec4L { def x = yx; def x_=(x0: Long) { yx = x0 }; def y = yy; def y_=(x0: Long) { yy = x0 }; def z = yz; def z_=(x0: Long) { yz = x0 }; def w = yw; def w_=(x0: Long) { yw = x0 } }
    class ColViewY extends AVec4L { def x = xy; def x_=(x0: Long) { xy = x0 }; def y = yy; def y_=(x0: Long) { yy = x0 }; def z = zy; def z_=(x0: Long) { zy = x0 }; def w = wy; def w_=(x0: Long) { wy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec4L { def x = zx; def x_=(x0: Long) { zx = x0 }; def y = zy; def y_=(x0: Long) { zy = x0 }; def z = zz; def z_=(x0: Long) { zz = x0 }; def w = zw; def w_=(x0: Long) { zw = x0 } }
    class ColViewZ extends AVec4L { def x = xz; def x_=(x0: Long) { xz = x0 }; def y = yz; def y_=(x0: Long) { yz = x0 }; def z = zz; def z_=(x0: Long) { zz = x0 }; def w = wz; def w_=(x0: Long) { wz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    class RowViewW extends AVec4L { def x = wx; def x_=(x0: Long) { wx = x0 }; def y = wy; def y_=(x0: Long) { wy = x0 }; def z = wz; def z_=(x0: Long) { wz = x0 }; def w = ww; def w_=(x0: Long) { ww = x0 } }
    class ColViewW extends AVec4L { def x = xw; def x_=(x0: Long) { xw = x0 }; def y = yw; def y_=(x0: Long) { yw = x0 }; def z = zw; def z_=(x0: Long) { zw = x0 }; def w = ww; def w_=(x0: Long) { ww = x0 } }
    def wRowView = new RowViewW
    def wColView = new ColViewW
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = xw; xw = wx; wx = temp; temp = yz; yz = zy; zy = temp; temp = yw; yw = wy; wy = temp; temp = zw; zw = wz; wz = temp; this }
  } // class AMat4L

  object AMat4L {
    def apply(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): AMat4L = new MMat4L(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): AMat4L = IMat4L.parse(str).mut
    def identity: AMat4L = MMat4L.identity
    def zero: AMat4L = MMat4L.zero
    def traced(lg4: GVec4L) = new MMat4L(lg4.x, 0, 0, 0, 0, lg4.y, 0, 0, 0, 0, lg4.z, 0, 0, 0, 0, lg4.w)
  } // object AMat4L


  abstract class AMat4F extends GMat4F {
    def xx_=(xx0: Float): Unit
    def xy_=(xy0: Float): Unit
    def xz_=(xz0: Float): Unit
    def xw_=(xw0: Float): Unit
    def yx_=(yx0: Float): Unit
    def yy_=(yy0: Float): Unit
    def yz_=(yz0: Float): Unit
    def yw_=(yw0: Float): Unit
    def zx_=(zx0: Float): Unit
    def zy_=(zy0: Float): Unit
    def zz_=(zz0: Float): Unit
    def zw_=(zw0: Float): Unit
    def wx_=(wx0: Float): Unit
    def wy_=(wy0: Float): Unit
    def wz_=(wz0: Float): Unit
    def ww_=(ww0: Float): Unit
    override def clone(): AMat4F = new MMat4F(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: AMat4S = new MMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: AMat4I = new MMat4I(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toL: AMat4L = new MMat4L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((xw).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((yw).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble), math.round((zw).toDouble), math.round((wx).toDouble), math.round((wy).toDouble), math.round((wz).toDouble), math.round((ww).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, xw0: Float = xw, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, yw0: Float = yw, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz, zw0: Float = zw, wx0: Float = wx, wy0: Float = wy, wz0: Float = wz, ww0: Float = ww): AMat4F = new MMat4F(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: AMat3F = new MMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapEq(fun: Float => Float): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); xw = fun(xw); yx = fun(yx); yy = fun(yy); yz = fun(yz); yw = fun(yw); zx = fun(zx); zy = fun(zy); zz = fun(zz); zw = fun(zw); wx = fun(wx); wy = fun(wy); wz = fun(wz); ww = fun(ww); this }
    override def toD: AMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; xw = -xw; yx = -yx; yy = -yy; yz = -yz; yw = -yw; zx = -zx; zy = -zy; zz = -zz; zw = -zw; wx = -wx; wy = -wy; wz = -wz; ww = -ww; this }
    def :~~(x0: Long): this.type = { xx = (x0).toFloat; xy = (x0).toFloat; xz = (x0).toFloat; xw = (x0).toFloat; yx = (x0).toFloat; yy = (x0).toFloat; yz = (x0).toFloat; yw = (x0).toFloat; zx = (x0).toFloat; zy = (x0).toFloat; zz = (x0).toFloat; zw = (x0).toFloat; wx = (x0).toFloat; wy = (x0).toFloat; wz = (x0).toFloat; ww = (x0).toFloat; this }
    def :~(x0: Float): this.type = { xx = x0; xy = x0; xz = x0; xw = x0; yx = x0; yy = x0; yz = x0; yw = x0; zx = x0; zy = x0; zz = x0; zw = x0; wx = x0; wy = x0; wz = x0; ww = x0; this }
    def :~~(x0: Double): this.type = { xx = (x0).toFloat; xy = (x0).toFloat; xz = (x0).toFloat; xw = (x0).toFloat; yx = (x0).toFloat; yy = (x0).toFloat; yz = (x0).toFloat; yw = (x0).toFloat; zx = (x0).toFloat; zy = (x0).toFloat; zz = (x0).toFloat; zw = (x0).toFloat; wx = (x0).toFloat; wy = (x0).toFloat; wz = (x0).toFloat; ww = (x0).toFloat; this }
    def :~(sg44: GMat4S): this.type = { xx = (sg44.xx).toFloat; xy = (sg44.xy).toFloat; xz = (sg44.xz).toFloat; xw = (sg44.xw).toFloat; yx = (sg44.yx).toFloat; yy = (sg44.yy).toFloat; yz = (sg44.yz).toFloat; yw = (sg44.yw).toFloat; zx = (sg44.zx).toFloat; zy = (sg44.zy).toFloat; zz = (sg44.zz).toFloat; zw = (sg44.zw).toFloat; wx = (sg44.wx).toFloat; wy = (sg44.wy).toFloat; wz = (sg44.wz).toFloat; ww = (sg44.ww).toFloat; this }
    def :~(ig44: GMat4I): this.type = { xx = (ig44.xx).toFloat; xy = (ig44.xy).toFloat; xz = (ig44.xz).toFloat; xw = (ig44.xw).toFloat; yx = (ig44.yx).toFloat; yy = (ig44.yy).toFloat; yz = (ig44.yz).toFloat; yw = (ig44.yw).toFloat; zx = (ig44.zx).toFloat; zy = (ig44.zy).toFloat; zz = (ig44.zz).toFloat; zw = (ig44.zw).toFloat; wx = (ig44.wx).toFloat; wy = (ig44.wy).toFloat; wz = (ig44.wz).toFloat; ww = (ig44.ww).toFloat; this }
    def :~~(lg44: GMat4L): this.type = { xx = ((lg44.xx).toDouble).toFloat; xy = ((lg44.xy).toDouble).toFloat; xz = ((lg44.xz).toDouble).toFloat; xw = ((lg44.xw).toDouble).toFloat; yx = ((lg44.yx).toDouble).toFloat; yy = ((lg44.yy).toDouble).toFloat; yz = ((lg44.yz).toDouble).toFloat; yw = ((lg44.yw).toDouble).toFloat; zx = ((lg44.zx).toDouble).toFloat; zy = ((lg44.zy).toDouble).toFloat; zz = ((lg44.zz).toDouble).toFloat; zw = ((lg44.zw).toDouble).toFloat; wx = ((lg44.wx).toDouble).toFloat; wy = ((lg44.wy).toDouble).toFloat; wz = ((lg44.wz).toDouble).toFloat; ww = ((lg44.ww).toDouble).toFloat; this }
    def :~(fg44: GMat4F): this.type = { xx = fg44.xx; xy = fg44.xy; xz = fg44.xz; xw = fg44.xw; yx = fg44.yx; yy = fg44.yy; yz = fg44.yz; yw = fg44.yw; zx = fg44.zx; zy = fg44.zy; zz = fg44.zz; zw = fg44.zw; wx = fg44.wx; wy = fg44.wy; wz = fg44.wz; ww = fg44.ww; this }
    def :~(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): this.type = { xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def :~~(dg44: GMat4D): this.type = { xx = (dg44.xx).toFloat; xy = (dg44.xy).toFloat; xz = (dg44.xz).toFloat; xw = (dg44.xw).toFloat; yx = (dg44.yx).toFloat; yy = (dg44.yy).toFloat; yz = (dg44.yz).toFloat; yw = (dg44.yw).toFloat; zx = (dg44.zx).toFloat; zy = (dg44.zy).toFloat; zz = (dg44.zz).toFloat; zw = (dg44.zw).toFloat; wx = (dg44.wx).toFloat; wy = (dg44.wy).toFloat; wz = (dg44.wz).toFloat; ww = (dg44.ww).toFloat; this }
    def +~~(x0: Long): this.type = { xx = ((xx).toDouble + (x0).toDouble).toFloat; xy = ((xy).toDouble + (x0).toDouble).toFloat; xz = ((xz).toDouble + (x0).toDouble).toFloat; xw = ((xw).toDouble + (x0).toDouble).toFloat; yx = ((yx).toDouble + (x0).toDouble).toFloat; yy = ((yy).toDouble + (x0).toDouble).toFloat; yz = ((yz).toDouble + (x0).toDouble).toFloat; yw = ((yw).toDouble + (x0).toDouble).toFloat; zx = ((zx).toDouble + (x0).toDouble).toFloat; zy = ((zy).toDouble + (x0).toDouble).toFloat; zz = ((zz).toDouble + (x0).toDouble).toFloat; zw = ((zw).toDouble + (x0).toDouble).toFloat; wx = ((wx).toDouble + (x0).toDouble).toFloat; wy = ((wy).toDouble + (x0).toDouble).toFloat; wz = ((wz).toDouble + (x0).toDouble).toFloat; ww = ((ww).toDouble + (x0).toDouble).toFloat; this }
    def +~(x0: Float): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; xw = xw + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; yw = yw + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; zw = zw + x0; wx = wx + x0; wy = wy + x0; wz = wz + x0; ww = ww + x0; this }
    def +~~(x0: Double): this.type = { xx = ((xx).toDouble + x0).toFloat; xy = ((xy).toDouble + x0).toFloat; xz = ((xz).toDouble + x0).toFloat; xw = ((xw).toDouble + x0).toFloat; yx = ((yx).toDouble + x0).toFloat; yy = ((yy).toDouble + x0).toFloat; yz = ((yz).toDouble + x0).toFloat; yw = ((yw).toDouble + x0).toFloat; zx = ((zx).toDouble + x0).toFloat; zy = ((zy).toDouble + x0).toFloat; zz = ((zz).toDouble + x0).toFloat; zw = ((zw).toDouble + x0).toFloat; wx = ((wx).toDouble + x0).toFloat; wy = ((wy).toDouble + x0).toFloat; wz = ((wz).toDouble + x0).toFloat; ww = ((ww).toDouble + x0).toFloat; this }
    def +~(sg44: GMat4S): this.type = { xx = xx + (sg44.xx).toFloat; xy = xy + (sg44.xy).toFloat; xz = xz + (sg44.xz).toFloat; xw = xw + (sg44.xw).toFloat; yx = yx + (sg44.yx).toFloat; yy = yy + (sg44.yy).toFloat; yz = yz + (sg44.yz).toFloat; yw = yw + (sg44.yw).toFloat; zx = zx + (sg44.zx).toFloat; zy = zy + (sg44.zy).toFloat; zz = zz + (sg44.zz).toFloat; zw = zw + (sg44.zw).toFloat; wx = wx + (sg44.wx).toFloat; wy = wy + (sg44.wy).toFloat; wz = wz + (sg44.wz).toFloat; ww = ww + (sg44.ww).toFloat; this }
    def +~(ig44: GMat4I): this.type = { xx = xx + (ig44.xx).toFloat; xy = xy + (ig44.xy).toFloat; xz = xz + (ig44.xz).toFloat; xw = xw + (ig44.xw).toFloat; yx = yx + (ig44.yx).toFloat; yy = yy + (ig44.yy).toFloat; yz = yz + (ig44.yz).toFloat; yw = yw + (ig44.yw).toFloat; zx = zx + (ig44.zx).toFloat; zy = zy + (ig44.zy).toFloat; zz = zz + (ig44.zz).toFloat; zw = zw + (ig44.zw).toFloat; wx = wx + (ig44.wx).toFloat; wy = wy + (ig44.wy).toFloat; wz = wz + (ig44.wz).toFloat; ww = ww + (ig44.ww).toFloat; this }
    def +~~(lg44: GMat4L): this.type = { xx = ((xx).toDouble + (lg44.xx).toDouble).toFloat; xy = ((xy).toDouble + (lg44.xy).toDouble).toFloat; xz = ((xz).toDouble + (lg44.xz).toDouble).toFloat; xw = ((xw).toDouble + (lg44.xw).toDouble).toFloat; yx = ((yx).toDouble + (lg44.yx).toDouble).toFloat; yy = ((yy).toDouble + (lg44.yy).toDouble).toFloat; yz = ((yz).toDouble + (lg44.yz).toDouble).toFloat; yw = ((yw).toDouble + (lg44.yw).toDouble).toFloat; zx = ((zx).toDouble + (lg44.zx).toDouble).toFloat; zy = ((zy).toDouble + (lg44.zy).toDouble).toFloat; zz = ((zz).toDouble + (lg44.zz).toDouble).toFloat; zw = ((zw).toDouble + (lg44.zw).toDouble).toFloat; wx = ((wx).toDouble + (lg44.wx).toDouble).toFloat; wy = ((wy).toDouble + (lg44.wy).toDouble).toFloat; wz = ((wz).toDouble + (lg44.wz).toDouble).toFloat; ww = ((ww).toDouble + (lg44.ww).toDouble).toFloat; this }
    def +~(fg44: GMat4F): this.type = { xx = xx + fg44.xx; xy = xy + fg44.xy; xz = xz + fg44.xz; xw = xw + fg44.xw; yx = yx + fg44.yx; yy = yy + fg44.yy; yz = yz + fg44.yz; yw = yw + fg44.yw; zx = zx + fg44.zx; zy = zy + fg44.zy; zz = zz + fg44.zz; zw = zw + fg44.zw; wx = wx + fg44.wx; wy = wy + fg44.wy; wz = wz + fg44.wz; ww = ww + fg44.ww; this }
    def +~(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; xw = xw + xw0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; yw = yw + yw0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; zw = zw + zw0; wx = wx + wx0; wy = wy + wy0; wz = wz + wz0; ww = ww + ww0; this }
    def +~~(dg44: GMat4D): this.type = { xx = ((xx).toDouble + dg44.xx).toFloat; xy = ((xy).toDouble + dg44.xy).toFloat; xz = ((xz).toDouble + dg44.xz).toFloat; xw = ((xw).toDouble + dg44.xw).toFloat; yx = ((yx).toDouble + dg44.yx).toFloat; yy = ((yy).toDouble + dg44.yy).toFloat; yz = ((yz).toDouble + dg44.yz).toFloat; yw = ((yw).toDouble + dg44.yw).toFloat; zx = ((zx).toDouble + dg44.zx).toFloat; zy = ((zy).toDouble + dg44.zy).toFloat; zz = ((zz).toDouble + dg44.zz).toFloat; zw = ((zw).toDouble + dg44.zw).toFloat; wx = ((wx).toDouble + dg44.wx).toFloat; wy = ((wy).toDouble + dg44.wy).toFloat; wz = ((wz).toDouble + dg44.wz).toFloat; ww = ((ww).toDouble + dg44.ww).toFloat; this }
    def -~~(x0: Long): this.type = { xx = ((xx).toDouble - (x0).toDouble).toFloat; xy = ((xy).toDouble - (x0).toDouble).toFloat; xz = ((xz).toDouble - (x0).toDouble).toFloat; xw = ((xw).toDouble - (x0).toDouble).toFloat; yx = ((yx).toDouble - (x0).toDouble).toFloat; yy = ((yy).toDouble - (x0).toDouble).toFloat; yz = ((yz).toDouble - (x0).toDouble).toFloat; yw = ((yw).toDouble - (x0).toDouble).toFloat; zx = ((zx).toDouble - (x0).toDouble).toFloat; zy = ((zy).toDouble - (x0).toDouble).toFloat; zz = ((zz).toDouble - (x0).toDouble).toFloat; zw = ((zw).toDouble - (x0).toDouble).toFloat; wx = ((wx).toDouble - (x0).toDouble).toFloat; wy = ((wy).toDouble - (x0).toDouble).toFloat; wz = ((wz).toDouble - (x0).toDouble).toFloat; ww = ((ww).toDouble - (x0).toDouble).toFloat; this }
    def -~(x0: Float): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; xw = xw - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; yw = yw - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; zw = zw - x0; wx = wx - x0; wy = wy - x0; wz = wz - x0; ww = ww - x0; this }
    def -~~(x0: Double): this.type = { xx = ((xx).toDouble - x0).toFloat; xy = ((xy).toDouble - x0).toFloat; xz = ((xz).toDouble - x0).toFloat; xw = ((xw).toDouble - x0).toFloat; yx = ((yx).toDouble - x0).toFloat; yy = ((yy).toDouble - x0).toFloat; yz = ((yz).toDouble - x0).toFloat; yw = ((yw).toDouble - x0).toFloat; zx = ((zx).toDouble - x0).toFloat; zy = ((zy).toDouble - x0).toFloat; zz = ((zz).toDouble - x0).toFloat; zw = ((zw).toDouble - x0).toFloat; wx = ((wx).toDouble - x0).toFloat; wy = ((wy).toDouble - x0).toFloat; wz = ((wz).toDouble - x0).toFloat; ww = ((ww).toDouble - x0).toFloat; this }
    def -~(sg44: GMat4S): this.type = { xx = xx - (sg44.xx).toFloat; xy = xy - (sg44.xy).toFloat; xz = xz - (sg44.xz).toFloat; xw = xw - (sg44.xw).toFloat; yx = yx - (sg44.yx).toFloat; yy = yy - (sg44.yy).toFloat; yz = yz - (sg44.yz).toFloat; yw = yw - (sg44.yw).toFloat; zx = zx - (sg44.zx).toFloat; zy = zy - (sg44.zy).toFloat; zz = zz - (sg44.zz).toFloat; zw = zw - (sg44.zw).toFloat; wx = wx - (sg44.wx).toFloat; wy = wy - (sg44.wy).toFloat; wz = wz - (sg44.wz).toFloat; ww = ww - (sg44.ww).toFloat; this }
    def -~(ig44: GMat4I): this.type = { xx = xx - (ig44.xx).toFloat; xy = xy - (ig44.xy).toFloat; xz = xz - (ig44.xz).toFloat; xw = xw - (ig44.xw).toFloat; yx = yx - (ig44.yx).toFloat; yy = yy - (ig44.yy).toFloat; yz = yz - (ig44.yz).toFloat; yw = yw - (ig44.yw).toFloat; zx = zx - (ig44.zx).toFloat; zy = zy - (ig44.zy).toFloat; zz = zz - (ig44.zz).toFloat; zw = zw - (ig44.zw).toFloat; wx = wx - (ig44.wx).toFloat; wy = wy - (ig44.wy).toFloat; wz = wz - (ig44.wz).toFloat; ww = ww - (ig44.ww).toFloat; this }
    def -~~(lg44: GMat4L): this.type = { xx = ((xx).toDouble - (lg44.xx).toDouble).toFloat; xy = ((xy).toDouble - (lg44.xy).toDouble).toFloat; xz = ((xz).toDouble - (lg44.xz).toDouble).toFloat; xw = ((xw).toDouble - (lg44.xw).toDouble).toFloat; yx = ((yx).toDouble - (lg44.yx).toDouble).toFloat; yy = ((yy).toDouble - (lg44.yy).toDouble).toFloat; yz = ((yz).toDouble - (lg44.yz).toDouble).toFloat; yw = ((yw).toDouble - (lg44.yw).toDouble).toFloat; zx = ((zx).toDouble - (lg44.zx).toDouble).toFloat; zy = ((zy).toDouble - (lg44.zy).toDouble).toFloat; zz = ((zz).toDouble - (lg44.zz).toDouble).toFloat; zw = ((zw).toDouble - (lg44.zw).toDouble).toFloat; wx = ((wx).toDouble - (lg44.wx).toDouble).toFloat; wy = ((wy).toDouble - (lg44.wy).toDouble).toFloat; wz = ((wz).toDouble - (lg44.wz).toDouble).toFloat; ww = ((ww).toDouble - (lg44.ww).toDouble).toFloat; this }
    def -~(fg44: GMat4F): this.type = { xx = xx - fg44.xx; xy = xy - fg44.xy; xz = xz - fg44.xz; xw = xw - fg44.xw; yx = yx - fg44.yx; yy = yy - fg44.yy; yz = yz - fg44.yz; yw = yw - fg44.yw; zx = zx - fg44.zx; zy = zy - fg44.zy; zz = zz - fg44.zz; zw = zw - fg44.zw; wx = wx - fg44.wx; wy = wy - fg44.wy; wz = wz - fg44.wz; ww = ww - fg44.ww; this }
    def -~(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; xw = xw - xw0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; yw = yw - yw0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; zw = zw - zw0; wx = wx - wx0; wy = wy - wy0; wz = wz - wz0; ww = ww - ww0; this }
    def -~~(dg44: GMat4D): this.type = { xx = ((xx).toDouble - dg44.xx).toFloat; xy = ((xy).toDouble - dg44.xy).toFloat; xz = ((xz).toDouble - dg44.xz).toFloat; xw = ((xw).toDouble - dg44.xw).toFloat; yx = ((yx).toDouble - dg44.yx).toFloat; yy = ((yy).toDouble - dg44.yy).toFloat; yz = ((yz).toDouble - dg44.yz).toFloat; yw = ((yw).toDouble - dg44.yw).toFloat; zx = ((zx).toDouble - dg44.zx).toFloat; zy = ((zy).toDouble - dg44.zy).toFloat; zz = ((zz).toDouble - dg44.zz).toFloat; zw = ((zw).toDouble - dg44.zw).toFloat; wx = ((wx).toDouble - dg44.wx).toFloat; wy = ((wy).toDouble - dg44.wy).toFloat; wz = ((wz).toDouble - dg44.wz).toFloat; ww = ((ww).toDouble - dg44.ww).toFloat; this }
    def *~~(x0: Long): this.type = { xx = ((xx).toDouble * (x0).toDouble).toFloat; xy = ((xy).toDouble * (x0).toDouble).toFloat; xz = ((xz).toDouble * (x0).toDouble).toFloat; xw = ((xw).toDouble * (x0).toDouble).toFloat; yx = ((yx).toDouble * (x0).toDouble).toFloat; yy = ((yy).toDouble * (x0).toDouble).toFloat; yz = ((yz).toDouble * (x0).toDouble).toFloat; yw = ((yw).toDouble * (x0).toDouble).toFloat; zx = ((zx).toDouble * (x0).toDouble).toFloat; zy = ((zy).toDouble * (x0).toDouble).toFloat; zz = ((zz).toDouble * (x0).toDouble).toFloat; zw = ((zw).toDouble * (x0).toDouble).toFloat; wx = ((wx).toDouble * (x0).toDouble).toFloat; wy = ((wy).toDouble * (x0).toDouble).toFloat; wz = ((wz).toDouble * (x0).toDouble).toFloat; ww = ((ww).toDouble * (x0).toDouble).toFloat; this }
    def *~(x0: Float): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; xw = xw * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; yw = yw * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; zw = zw * x0; wx = wx * x0; wy = wy * x0; wz = wz * x0; ww = ww * x0; this }
    def *~~(x0: Double): this.type = { xx = ((xx).toDouble * x0).toFloat; xy = ((xy).toDouble * x0).toFloat; xz = ((xz).toDouble * x0).toFloat; xw = ((xw).toDouble * x0).toFloat; yx = ((yx).toDouble * x0).toFloat; yy = ((yy).toDouble * x0).toFloat; yz = ((yz).toDouble * x0).toFloat; yw = ((yw).toDouble * x0).toFloat; zx = ((zx).toDouble * x0).toFloat; zy = ((zy).toDouble * x0).toFloat; zz = ((zz).toDouble * x0).toFloat; zw = ((zw).toDouble * x0).toFloat; wx = ((wx).toDouble * x0).toFloat; wy = ((wy).toDouble * x0).toFloat; wz = ((wz).toDouble * x0).toFloat; ww = ((ww).toDouble * x0).toFloat; this }
    def *~(sg44: GMat4S): this.type = { xx = xx * (sg44.xx).toFloat; xy = xy * (sg44.xy).toFloat; xz = xz * (sg44.xz).toFloat; xw = xw * (sg44.xw).toFloat; yx = yx * (sg44.yx).toFloat; yy = yy * (sg44.yy).toFloat; yz = yz * (sg44.yz).toFloat; yw = yw * (sg44.yw).toFloat; zx = zx * (sg44.zx).toFloat; zy = zy * (sg44.zy).toFloat; zz = zz * (sg44.zz).toFloat; zw = zw * (sg44.zw).toFloat; wx = wx * (sg44.wx).toFloat; wy = wy * (sg44.wy).toFloat; wz = wz * (sg44.wz).toFloat; ww = ww * (sg44.ww).toFloat; this }
    def *~(ig44: GMat4I): this.type = { xx = xx * (ig44.xx).toFloat; xy = xy * (ig44.xy).toFloat; xz = xz * (ig44.xz).toFloat; xw = xw * (ig44.xw).toFloat; yx = yx * (ig44.yx).toFloat; yy = yy * (ig44.yy).toFloat; yz = yz * (ig44.yz).toFloat; yw = yw * (ig44.yw).toFloat; zx = zx * (ig44.zx).toFloat; zy = zy * (ig44.zy).toFloat; zz = zz * (ig44.zz).toFloat; zw = zw * (ig44.zw).toFloat; wx = wx * (ig44.wx).toFloat; wy = wy * (ig44.wy).toFloat; wz = wz * (ig44.wz).toFloat; ww = ww * (ig44.ww).toFloat; this }
    def *~~(lg44: GMat4L): this.type = { xx = ((xx).toDouble * (lg44.xx).toDouble).toFloat; xy = ((xy).toDouble * (lg44.xy).toDouble).toFloat; xz = ((xz).toDouble * (lg44.xz).toDouble).toFloat; xw = ((xw).toDouble * (lg44.xw).toDouble).toFloat; yx = ((yx).toDouble * (lg44.yx).toDouble).toFloat; yy = ((yy).toDouble * (lg44.yy).toDouble).toFloat; yz = ((yz).toDouble * (lg44.yz).toDouble).toFloat; yw = ((yw).toDouble * (lg44.yw).toDouble).toFloat; zx = ((zx).toDouble * (lg44.zx).toDouble).toFloat; zy = ((zy).toDouble * (lg44.zy).toDouble).toFloat; zz = ((zz).toDouble * (lg44.zz).toDouble).toFloat; zw = ((zw).toDouble * (lg44.zw).toDouble).toFloat; wx = ((wx).toDouble * (lg44.wx).toDouble).toFloat; wy = ((wy).toDouble * (lg44.wy).toDouble).toFloat; wz = ((wz).toDouble * (lg44.wz).toDouble).toFloat; ww = ((ww).toDouble * (lg44.ww).toDouble).toFloat; this }
    def *~(fg44: GMat4F): this.type = { xx = xx * fg44.xx; xy = xy * fg44.xy; xz = xz * fg44.xz; xw = xw * fg44.xw; yx = yx * fg44.yx; yy = yy * fg44.yy; yz = yz * fg44.yz; yw = yw * fg44.yw; zx = zx * fg44.zx; zy = zy * fg44.zy; zz = zz * fg44.zz; zw = zw * fg44.zw; wx = wx * fg44.wx; wy = wy * fg44.wy; wz = wz * fg44.wz; ww = ww * fg44.ww; this }
    def *~(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; xw = xw * xw0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; yw = yw * yw0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; zw = zw * zw0; wx = wx * wx0; wy = wy * wy0; wz = wz * wz0; ww = ww * ww0; this }
    def *~~(dg44: GMat4D): this.type = { xx = ((xx).toDouble * dg44.xx).toFloat; xy = ((xy).toDouble * dg44.xy).toFloat; xz = ((xz).toDouble * dg44.xz).toFloat; xw = ((xw).toDouble * dg44.xw).toFloat; yx = ((yx).toDouble * dg44.yx).toFloat; yy = ((yy).toDouble * dg44.yy).toFloat; yz = ((yz).toDouble * dg44.yz).toFloat; yw = ((yw).toDouble * dg44.yw).toFloat; zx = ((zx).toDouble * dg44.zx).toFloat; zy = ((zy).toDouble * dg44.zy).toFloat; zz = ((zz).toDouble * dg44.zz).toFloat; zw = ((zw).toDouble * dg44.zw).toFloat; wx = ((wx).toDouble * dg44.wx).toFloat; wy = ((wy).toDouble * dg44.wy).toFloat; wz = ((wz).toDouble * dg44.wz).toFloat; ww = ((ww).toDouble * dg44.ww).toFloat; this }
    def /~~(x0: Long): this.type = { xx = ((xx).toDouble / (x0).toDouble).toFloat; xy = ((xy).toDouble / (x0).toDouble).toFloat; xz = ((xz).toDouble / (x0).toDouble).toFloat; xw = ((xw).toDouble / (x0).toDouble).toFloat; yx = ((yx).toDouble / (x0).toDouble).toFloat; yy = ((yy).toDouble / (x0).toDouble).toFloat; yz = ((yz).toDouble / (x0).toDouble).toFloat; yw = ((yw).toDouble / (x0).toDouble).toFloat; zx = ((zx).toDouble / (x0).toDouble).toFloat; zy = ((zy).toDouble / (x0).toDouble).toFloat; zz = ((zz).toDouble / (x0).toDouble).toFloat; zw = ((zw).toDouble / (x0).toDouble).toFloat; wx = ((wx).toDouble / (x0).toDouble).toFloat; wy = ((wy).toDouble / (x0).toDouble).toFloat; wz = ((wz).toDouble / (x0).toDouble).toFloat; ww = ((ww).toDouble / (x0).toDouble).toFloat; this }
    def /~(x0: Float): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; xw = xw / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; yw = yw / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; zw = zw / x0; wx = wx / x0; wy = wy / x0; wz = wz / x0; ww = ww / x0; this }
    def /~~(x0: Double): this.type = { xx = ((xx).toDouble / x0).toFloat; xy = ((xy).toDouble / x0).toFloat; xz = ((xz).toDouble / x0).toFloat; xw = ((xw).toDouble / x0).toFloat; yx = ((yx).toDouble / x0).toFloat; yy = ((yy).toDouble / x0).toFloat; yz = ((yz).toDouble / x0).toFloat; yw = ((yw).toDouble / x0).toFloat; zx = ((zx).toDouble / x0).toFloat; zy = ((zy).toDouble / x0).toFloat; zz = ((zz).toDouble / x0).toFloat; zw = ((zw).toDouble / x0).toFloat; wx = ((wx).toDouble / x0).toFloat; wy = ((wy).toDouble / x0).toFloat; wz = ((wz).toDouble / x0).toFloat; ww = ((ww).toDouble / x0).toFloat; this }
    def /~(sg44: GMat4S): this.type = { xx = xx / (sg44.xx).toFloat; xy = xy / (sg44.xy).toFloat; xz = xz / (sg44.xz).toFloat; xw = xw / (sg44.xw).toFloat; yx = yx / (sg44.yx).toFloat; yy = yy / (sg44.yy).toFloat; yz = yz / (sg44.yz).toFloat; yw = yw / (sg44.yw).toFloat; zx = zx / (sg44.zx).toFloat; zy = zy / (sg44.zy).toFloat; zz = zz / (sg44.zz).toFloat; zw = zw / (sg44.zw).toFloat; wx = wx / (sg44.wx).toFloat; wy = wy / (sg44.wy).toFloat; wz = wz / (sg44.wz).toFloat; ww = ww / (sg44.ww).toFloat; this }
    def /~(ig44: GMat4I): this.type = { xx = xx / (ig44.xx).toFloat; xy = xy / (ig44.xy).toFloat; xz = xz / (ig44.xz).toFloat; xw = xw / (ig44.xw).toFloat; yx = yx / (ig44.yx).toFloat; yy = yy / (ig44.yy).toFloat; yz = yz / (ig44.yz).toFloat; yw = yw / (ig44.yw).toFloat; zx = zx / (ig44.zx).toFloat; zy = zy / (ig44.zy).toFloat; zz = zz / (ig44.zz).toFloat; zw = zw / (ig44.zw).toFloat; wx = wx / (ig44.wx).toFloat; wy = wy / (ig44.wy).toFloat; wz = wz / (ig44.wz).toFloat; ww = ww / (ig44.ww).toFloat; this }
    def /~~(lg44: GMat4L): this.type = { xx = ((xx).toDouble / (lg44.xx).toDouble).toFloat; xy = ((xy).toDouble / (lg44.xy).toDouble).toFloat; xz = ((xz).toDouble / (lg44.xz).toDouble).toFloat; xw = ((xw).toDouble / (lg44.xw).toDouble).toFloat; yx = ((yx).toDouble / (lg44.yx).toDouble).toFloat; yy = ((yy).toDouble / (lg44.yy).toDouble).toFloat; yz = ((yz).toDouble / (lg44.yz).toDouble).toFloat; yw = ((yw).toDouble / (lg44.yw).toDouble).toFloat; zx = ((zx).toDouble / (lg44.zx).toDouble).toFloat; zy = ((zy).toDouble / (lg44.zy).toDouble).toFloat; zz = ((zz).toDouble / (lg44.zz).toDouble).toFloat; zw = ((zw).toDouble / (lg44.zw).toDouble).toFloat; wx = ((wx).toDouble / (lg44.wx).toDouble).toFloat; wy = ((wy).toDouble / (lg44.wy).toDouble).toFloat; wz = ((wz).toDouble / (lg44.wz).toDouble).toFloat; ww = ((ww).toDouble / (lg44.ww).toDouble).toFloat; this }
    def /~(fg44: GMat4F): this.type = { xx = xx / fg44.xx; xy = xy / fg44.xy; xz = xz / fg44.xz; xw = xw / fg44.xw; yx = yx / fg44.yx; yy = yy / fg44.yy; yz = yz / fg44.yz; yw = yw / fg44.yw; zx = zx / fg44.zx; zy = zy / fg44.zy; zz = zz / fg44.zz; zw = zw / fg44.zw; wx = wx / fg44.wx; wy = wy / fg44.wy; wz = wz / fg44.wz; ww = ww / fg44.ww; this }
    def /~(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; xw = xw / xw0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; yw = yw / yw0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; zw = zw / zw0; wx = wx / wx0; wy = wy / wy0; wz = wz / wz0; ww = ww / ww0; this }
    def /~~(dg44: GMat4D): this.type = { xx = ((xx).toDouble / dg44.xx).toFloat; xy = ((xy).toDouble / dg44.xy).toFloat; xz = ((xz).toDouble / dg44.xz).toFloat; xw = ((xw).toDouble / dg44.xw).toFloat; yx = ((yx).toDouble / dg44.yx).toFloat; yy = ((yy).toDouble / dg44.yy).toFloat; yz = ((yz).toDouble / dg44.yz).toFloat; yw = ((yw).toDouble / dg44.yw).toFloat; zx = ((zx).toDouble / dg44.zx).toFloat; zy = ((zy).toDouble / dg44.zy).toFloat; zz = ((zz).toDouble / dg44.zz).toFloat; zw = ((zw).toDouble / dg44.zw).toFloat; wx = ((wx).toDouble / dg44.wx).toFloat; wy = ((wy).toDouble / dg44.wy).toFloat; wz = ((wz).toDouble / dg44.wz).toFloat; ww = ((ww).toDouble / dg44.ww).toFloat; this }
    def maxEqCast(x0: Long): this.type = { xx = (math.max((xx).toDouble,(x0).toDouble)).toFloat; xy = (math.max((xy).toDouble,(x0).toDouble)).toFloat; xz = (math.max((xz).toDouble,(x0).toDouble)).toFloat; xw = (math.max((xw).toDouble,(x0).toDouble)).toFloat; yx = (math.max((yx).toDouble,(x0).toDouble)).toFloat; yy = (math.max((yy).toDouble,(x0).toDouble)).toFloat; yz = (math.max((yz).toDouble,(x0).toDouble)).toFloat; yw = (math.max((yw).toDouble,(x0).toDouble)).toFloat; zx = (math.max((zx).toDouble,(x0).toDouble)).toFloat; zy = (math.max((zy).toDouble,(x0).toDouble)).toFloat; zz = (math.max((zz).toDouble,(x0).toDouble)).toFloat; zw = (math.max((zw).toDouble,(x0).toDouble)).toFloat; wx = (math.max((wx).toDouble,(x0).toDouble)).toFloat; wy = (math.max((wy).toDouble,(x0).toDouble)).toFloat; wz = (math.max((wz).toDouble,(x0).toDouble)).toFloat; ww = (math.max((ww).toDouble,(x0).toDouble)).toFloat; this }
    def maxEq(x0: Float): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); xw = math.max(xw,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); yw = math.max(yw,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); zw = math.max(zw,x0); wx = math.max(wx,x0); wy = math.max(wy,x0); wz = math.max(wz,x0); ww = math.max(ww,x0); this }
    def maxEqCast(x0: Double): this.type = { xx = (math.max((xx).toDouble,x0)).toFloat; xy = (math.max((xy).toDouble,x0)).toFloat; xz = (math.max((xz).toDouble,x0)).toFloat; xw = (math.max((xw).toDouble,x0)).toFloat; yx = (math.max((yx).toDouble,x0)).toFloat; yy = (math.max((yy).toDouble,x0)).toFloat; yz = (math.max((yz).toDouble,x0)).toFloat; yw = (math.max((yw).toDouble,x0)).toFloat; zx = (math.max((zx).toDouble,x0)).toFloat; zy = (math.max((zy).toDouble,x0)).toFloat; zz = (math.max((zz).toDouble,x0)).toFloat; zw = (math.max((zw).toDouble,x0)).toFloat; wx = (math.max((wx).toDouble,x0)).toFloat; wy = (math.max((wy).toDouble,x0)).toFloat; wz = (math.max((wz).toDouble,x0)).toFloat; ww = (math.max((ww).toDouble,x0)).toFloat; this }
    def maxEq(sg44: GMat4S): this.type = { xx = math.max(xx,(sg44.xx).toFloat); xy = math.max(xy,(sg44.xy).toFloat); xz = math.max(xz,(sg44.xz).toFloat); xw = math.max(xw,(sg44.xw).toFloat); yx = math.max(yx,(sg44.yx).toFloat); yy = math.max(yy,(sg44.yy).toFloat); yz = math.max(yz,(sg44.yz).toFloat); yw = math.max(yw,(sg44.yw).toFloat); zx = math.max(zx,(sg44.zx).toFloat); zy = math.max(zy,(sg44.zy).toFloat); zz = math.max(zz,(sg44.zz).toFloat); zw = math.max(zw,(sg44.zw).toFloat); wx = math.max(wx,(sg44.wx).toFloat); wy = math.max(wy,(sg44.wy).toFloat); wz = math.max(wz,(sg44.wz).toFloat); ww = math.max(ww,(sg44.ww).toFloat); this }
    def maxEq(ig44: GMat4I): this.type = { xx = math.max(xx,(ig44.xx).toFloat); xy = math.max(xy,(ig44.xy).toFloat); xz = math.max(xz,(ig44.xz).toFloat); xw = math.max(xw,(ig44.xw).toFloat); yx = math.max(yx,(ig44.yx).toFloat); yy = math.max(yy,(ig44.yy).toFloat); yz = math.max(yz,(ig44.yz).toFloat); yw = math.max(yw,(ig44.yw).toFloat); zx = math.max(zx,(ig44.zx).toFloat); zy = math.max(zy,(ig44.zy).toFloat); zz = math.max(zz,(ig44.zz).toFloat); zw = math.max(zw,(ig44.zw).toFloat); wx = math.max(wx,(ig44.wx).toFloat); wy = math.max(wy,(ig44.wy).toFloat); wz = math.max(wz,(ig44.wz).toFloat); ww = math.max(ww,(ig44.ww).toFloat); this }
    def maxEqCast(lg44: GMat4L): this.type = { xx = (math.max((xx).toDouble,(lg44.xx).toDouble)).toFloat; xy = (math.max((xy).toDouble,(lg44.xy).toDouble)).toFloat; xz = (math.max((xz).toDouble,(lg44.xz).toDouble)).toFloat; xw = (math.max((xw).toDouble,(lg44.xw).toDouble)).toFloat; yx = (math.max((yx).toDouble,(lg44.yx).toDouble)).toFloat; yy = (math.max((yy).toDouble,(lg44.yy).toDouble)).toFloat; yz = (math.max((yz).toDouble,(lg44.yz).toDouble)).toFloat; yw = (math.max((yw).toDouble,(lg44.yw).toDouble)).toFloat; zx = (math.max((zx).toDouble,(lg44.zx).toDouble)).toFloat; zy = (math.max((zy).toDouble,(lg44.zy).toDouble)).toFloat; zz = (math.max((zz).toDouble,(lg44.zz).toDouble)).toFloat; zw = (math.max((zw).toDouble,(lg44.zw).toDouble)).toFloat; wx = (math.max((wx).toDouble,(lg44.wx).toDouble)).toFloat; wy = (math.max((wy).toDouble,(lg44.wy).toDouble)).toFloat; wz = (math.max((wz).toDouble,(lg44.wz).toDouble)).toFloat; ww = (math.max((ww).toDouble,(lg44.ww).toDouble)).toFloat; this }
    def maxEq(fg44: GMat4F): this.type = { xx = math.max(xx,fg44.xx); xy = math.max(xy,fg44.xy); xz = math.max(xz,fg44.xz); xw = math.max(xw,fg44.xw); yx = math.max(yx,fg44.yx); yy = math.max(yy,fg44.yy); yz = math.max(yz,fg44.yz); yw = math.max(yw,fg44.yw); zx = math.max(zx,fg44.zx); zy = math.max(zy,fg44.zy); zz = math.max(zz,fg44.zz); zw = math.max(zw,fg44.zw); wx = math.max(wx,fg44.wx); wy = math.max(wy,fg44.wy); wz = math.max(wz,fg44.wz); ww = math.max(ww,fg44.ww); this }
    def maxEq(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); xw = math.max(xw,xw0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); yw = math.max(yw,yw0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); zw = math.max(zw,zw0); wx = math.max(wx,wx0); wy = math.max(wy,wy0); wz = math.max(wz,wz0); ww = math.max(ww,ww0); this }
    def maxEqCast(dg44: GMat4D): this.type = { xx = (math.max((xx).toDouble,dg44.xx)).toFloat; xy = (math.max((xy).toDouble,dg44.xy)).toFloat; xz = (math.max((xz).toDouble,dg44.xz)).toFloat; xw = (math.max((xw).toDouble,dg44.xw)).toFloat; yx = (math.max((yx).toDouble,dg44.yx)).toFloat; yy = (math.max((yy).toDouble,dg44.yy)).toFloat; yz = (math.max((yz).toDouble,dg44.yz)).toFloat; yw = (math.max((yw).toDouble,dg44.yw)).toFloat; zx = (math.max((zx).toDouble,dg44.zx)).toFloat; zy = (math.max((zy).toDouble,dg44.zy)).toFloat; zz = (math.max((zz).toDouble,dg44.zz)).toFloat; zw = (math.max((zw).toDouble,dg44.zw)).toFloat; wx = (math.max((wx).toDouble,dg44.wx)).toFloat; wy = (math.max((wy).toDouble,dg44.wy)).toFloat; wz = (math.max((wz).toDouble,dg44.wz)).toFloat; ww = (math.max((ww).toDouble,dg44.ww)).toFloat; this }
    def minEqCast(x0: Long): this.type = { xx = (math.min((xx).toDouble,(x0).toDouble)).toFloat; xy = (math.min((xy).toDouble,(x0).toDouble)).toFloat; xz = (math.min((xz).toDouble,(x0).toDouble)).toFloat; xw = (math.min((xw).toDouble,(x0).toDouble)).toFloat; yx = (math.min((yx).toDouble,(x0).toDouble)).toFloat; yy = (math.min((yy).toDouble,(x0).toDouble)).toFloat; yz = (math.min((yz).toDouble,(x0).toDouble)).toFloat; yw = (math.min((yw).toDouble,(x0).toDouble)).toFloat; zx = (math.min((zx).toDouble,(x0).toDouble)).toFloat; zy = (math.min((zy).toDouble,(x0).toDouble)).toFloat; zz = (math.min((zz).toDouble,(x0).toDouble)).toFloat; zw = (math.min((zw).toDouble,(x0).toDouble)).toFloat; wx = (math.min((wx).toDouble,(x0).toDouble)).toFloat; wy = (math.min((wy).toDouble,(x0).toDouble)).toFloat; wz = (math.min((wz).toDouble,(x0).toDouble)).toFloat; ww = (math.min((ww).toDouble,(x0).toDouble)).toFloat; this }
    def minEq(x0: Float): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); xw = math.min(xw,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); yw = math.min(yw,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); zw = math.min(zw,x0); wx = math.min(wx,x0); wy = math.min(wy,x0); wz = math.min(wz,x0); ww = math.min(ww,x0); this }
    def minEqCast(x0: Double): this.type = { xx = (math.min((xx).toDouble,x0)).toFloat; xy = (math.min((xy).toDouble,x0)).toFloat; xz = (math.min((xz).toDouble,x0)).toFloat; xw = (math.min((xw).toDouble,x0)).toFloat; yx = (math.min((yx).toDouble,x0)).toFloat; yy = (math.min((yy).toDouble,x0)).toFloat; yz = (math.min((yz).toDouble,x0)).toFloat; yw = (math.min((yw).toDouble,x0)).toFloat; zx = (math.min((zx).toDouble,x0)).toFloat; zy = (math.min((zy).toDouble,x0)).toFloat; zz = (math.min((zz).toDouble,x0)).toFloat; zw = (math.min((zw).toDouble,x0)).toFloat; wx = (math.min((wx).toDouble,x0)).toFloat; wy = (math.min((wy).toDouble,x0)).toFloat; wz = (math.min((wz).toDouble,x0)).toFloat; ww = (math.min((ww).toDouble,x0)).toFloat; this }
    def minEq(sg44: GMat4S): this.type = { xx = math.min(xx,(sg44.xx).toFloat); xy = math.min(xy,(sg44.xy).toFloat); xz = math.min(xz,(sg44.xz).toFloat); xw = math.min(xw,(sg44.xw).toFloat); yx = math.min(yx,(sg44.yx).toFloat); yy = math.min(yy,(sg44.yy).toFloat); yz = math.min(yz,(sg44.yz).toFloat); yw = math.min(yw,(sg44.yw).toFloat); zx = math.min(zx,(sg44.zx).toFloat); zy = math.min(zy,(sg44.zy).toFloat); zz = math.min(zz,(sg44.zz).toFloat); zw = math.min(zw,(sg44.zw).toFloat); wx = math.min(wx,(sg44.wx).toFloat); wy = math.min(wy,(sg44.wy).toFloat); wz = math.min(wz,(sg44.wz).toFloat); ww = math.min(ww,(sg44.ww).toFloat); this }
    def minEq(ig44: GMat4I): this.type = { xx = math.min(xx,(ig44.xx).toFloat); xy = math.min(xy,(ig44.xy).toFloat); xz = math.min(xz,(ig44.xz).toFloat); xw = math.min(xw,(ig44.xw).toFloat); yx = math.min(yx,(ig44.yx).toFloat); yy = math.min(yy,(ig44.yy).toFloat); yz = math.min(yz,(ig44.yz).toFloat); yw = math.min(yw,(ig44.yw).toFloat); zx = math.min(zx,(ig44.zx).toFloat); zy = math.min(zy,(ig44.zy).toFloat); zz = math.min(zz,(ig44.zz).toFloat); zw = math.min(zw,(ig44.zw).toFloat); wx = math.min(wx,(ig44.wx).toFloat); wy = math.min(wy,(ig44.wy).toFloat); wz = math.min(wz,(ig44.wz).toFloat); ww = math.min(ww,(ig44.ww).toFloat); this }
    def minEqCast(lg44: GMat4L): this.type = { xx = (math.min((xx).toDouble,(lg44.xx).toDouble)).toFloat; xy = (math.min((xy).toDouble,(lg44.xy).toDouble)).toFloat; xz = (math.min((xz).toDouble,(lg44.xz).toDouble)).toFloat; xw = (math.min((xw).toDouble,(lg44.xw).toDouble)).toFloat; yx = (math.min((yx).toDouble,(lg44.yx).toDouble)).toFloat; yy = (math.min((yy).toDouble,(lg44.yy).toDouble)).toFloat; yz = (math.min((yz).toDouble,(lg44.yz).toDouble)).toFloat; yw = (math.min((yw).toDouble,(lg44.yw).toDouble)).toFloat; zx = (math.min((zx).toDouble,(lg44.zx).toDouble)).toFloat; zy = (math.min((zy).toDouble,(lg44.zy).toDouble)).toFloat; zz = (math.min((zz).toDouble,(lg44.zz).toDouble)).toFloat; zw = (math.min((zw).toDouble,(lg44.zw).toDouble)).toFloat; wx = (math.min((wx).toDouble,(lg44.wx).toDouble)).toFloat; wy = (math.min((wy).toDouble,(lg44.wy).toDouble)).toFloat; wz = (math.min((wz).toDouble,(lg44.wz).toDouble)).toFloat; ww = (math.min((ww).toDouble,(lg44.ww).toDouble)).toFloat; this }
    def minEq(fg44: GMat4F): this.type = { xx = math.min(xx,fg44.xx); xy = math.min(xy,fg44.xy); xz = math.min(xz,fg44.xz); xw = math.min(xw,fg44.xw); yx = math.min(yx,fg44.yx); yy = math.min(yy,fg44.yy); yz = math.min(yz,fg44.yz); yw = math.min(yw,fg44.yw); zx = math.min(zx,fg44.zx); zy = math.min(zy,fg44.zy); zz = math.min(zz,fg44.zz); zw = math.min(zw,fg44.zw); wx = math.min(wx,fg44.wx); wy = math.min(wy,fg44.wy); wz = math.min(wz,fg44.wz); ww = math.min(ww,fg44.ww); this }
    def minEq(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); xw = math.min(xw,xw0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); yw = math.min(yw,yw0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); zw = math.min(zw,zw0); wx = math.min(wx,wx0); wy = math.min(wy,wy0); wz = math.min(wz,wz0); ww = math.min(ww,ww0); this }
    def minEqCast(dg44: GMat4D): this.type = { xx = (math.min((xx).toDouble,dg44.xx)).toFloat; xy = (math.min((xy).toDouble,dg44.xy)).toFloat; xz = (math.min((xz).toDouble,dg44.xz)).toFloat; xw = (math.min((xw).toDouble,dg44.xw)).toFloat; yx = (math.min((yx).toDouble,dg44.yx)).toFloat; yy = (math.min((yy).toDouble,dg44.yy)).toFloat; yz = (math.min((yz).toDouble,dg44.yz)).toFloat; yw = (math.min((yw).toDouble,dg44.yw)).toFloat; zx = (math.min((zx).toDouble,dg44.zx)).toFloat; zy = (math.min((zy).toDouble,dg44.zy)).toFloat; zz = (math.min((zz).toDouble,dg44.zz)).toFloat; zw = (math.min((zw).toDouble,dg44.zw)).toFloat; wx = (math.min((wx).toDouble,dg44.wx)).toFloat; wy = (math.min((wy).toDouble,dg44.wy)).toFloat; wz = (math.min((wz).toDouble,dg44.wz)).toFloat; ww = (math.min((ww).toDouble,dg44.ww)).toFloat; this }
    def operateEq(sg44: GMat4S)(fun: (Float,Float)=>Float) = { xx = fun(xx,(sg44.xx).toFloat); xy = fun(xy,(sg44.xy).toFloat); xz = fun(xz,(sg44.xz).toFloat); xw = fun(xw,(sg44.xw).toFloat); yx = fun(yx,(sg44.yx).toFloat); yy = fun(yy,(sg44.yy).toFloat); yz = fun(yz,(sg44.yz).toFloat); yw = fun(yw,(sg44.yw).toFloat); zx = fun(zx,(sg44.zx).toFloat); zy = fun(zy,(sg44.zy).toFloat); zz = fun(zz,(sg44.zz).toFloat); zw = fun(zw,(sg44.zw).toFloat); wx = fun(wx,(sg44.wx).toFloat); wy = fun(wy,(sg44.wy).toFloat); wz = fun(wz,(sg44.wz).toFloat); ww = fun(ww,(sg44.ww).toFloat); this }
    def operateEq(ig44: GMat4I)(fun: (Float,Float)=>Float) = { xx = fun(xx,(ig44.xx).toFloat); xy = fun(xy,(ig44.xy).toFloat); xz = fun(xz,(ig44.xz).toFloat); xw = fun(xw,(ig44.xw).toFloat); yx = fun(yx,(ig44.yx).toFloat); yy = fun(yy,(ig44.yy).toFloat); yz = fun(yz,(ig44.yz).toFloat); yw = fun(yw,(ig44.yw).toFloat); zx = fun(zx,(ig44.zx).toFloat); zy = fun(zy,(ig44.zy).toFloat); zz = fun(zz,(ig44.zz).toFloat); zw = fun(zw,(ig44.zw).toFloat); wx = fun(wx,(ig44.wx).toFloat); wy = fun(wy,(ig44.wy).toFloat); wz = fun(wz,(ig44.wz).toFloat); ww = fun(ww,(ig44.ww).toFloat); this }
    def operateEqCast(lg44: GMat4L)(fun: (Double,Double)=>Double) = { xx = (fun((xx).toDouble,(lg44.xx).toDouble)).toFloat; xy = (fun((xy).toDouble,(lg44.xy).toDouble)).toFloat; xz = (fun((xz).toDouble,(lg44.xz).toDouble)).toFloat; xw = (fun((xw).toDouble,(lg44.xw).toDouble)).toFloat; yx = (fun((yx).toDouble,(lg44.yx).toDouble)).toFloat; yy = (fun((yy).toDouble,(lg44.yy).toDouble)).toFloat; yz = (fun((yz).toDouble,(lg44.yz).toDouble)).toFloat; yw = (fun((yw).toDouble,(lg44.yw).toDouble)).toFloat; zx = (fun((zx).toDouble,(lg44.zx).toDouble)).toFloat; zy = (fun((zy).toDouble,(lg44.zy).toDouble)).toFloat; zz = (fun((zz).toDouble,(lg44.zz).toDouble)).toFloat; zw = (fun((zw).toDouble,(lg44.zw).toDouble)).toFloat; wx = (fun((wx).toDouble,(lg44.wx).toDouble)).toFloat; wy = (fun((wy).toDouble,(lg44.wy).toDouble)).toFloat; wz = (fun((wz).toDouble,(lg44.wz).toDouble)).toFloat; ww = (fun((ww).toDouble,(lg44.ww).toDouble)).toFloat; this }
    def operateEq(fg44: GMat4F)(fun: (Float,Float)=>Float) = { xx = fun(xx,fg44.xx); xy = fun(xy,fg44.xy); xz = fun(xz,fg44.xz); xw = fun(xw,fg44.xw); yx = fun(yx,fg44.yx); yy = fun(yy,fg44.yy); yz = fun(yz,fg44.yz); yw = fun(yw,fg44.yw); zx = fun(zx,fg44.zx); zy = fun(zy,fg44.zy); zz = fun(zz,fg44.zz); zw = fun(zw,fg44.zw); wx = fun(wx,fg44.wx); wy = fun(wy,fg44.wy); wz = fun(wz,fg44.wz); ww = fun(ww,fg44.ww); this }
    def operateEqCast(dg44: GMat4D)(fun: (Double,Double)=>Double) = { xx = (fun((xx).toDouble,dg44.xx)).toFloat; xy = (fun((xy).toDouble,dg44.xy)).toFloat; xz = (fun((xz).toDouble,dg44.xz)).toFloat; xw = (fun((xw).toDouble,dg44.xw)).toFloat; yx = (fun((yx).toDouble,dg44.yx)).toFloat; yy = (fun((yy).toDouble,dg44.yy)).toFloat; yz = (fun((yz).toDouble,dg44.yz)).toFloat; yw = (fun((yw).toDouble,dg44.yw)).toFloat; zx = (fun((zx).toDouble,dg44.zx)).toFloat; zy = (fun((zy).toDouble,dg44.zy)).toFloat; zz = (fun((zz).toDouble,dg44.zz)).toFloat; zw = (fun((zw).toDouble,dg44.zw)).toFloat; wx = (fun((wx).toDouble,dg44.wx)).toFloat; wy = (fun((wy).toDouble,dg44.wy)).toFloat; wz = (fun((wz).toDouble,dg44.wz)).toFloat; ww = (fun((ww).toDouble,dg44.ww)).toFloat; this }
    def :|~(sg4: GVec4S) = { xx = (sg4.x).toFloat; xy = (sg4.x).toFloat; xz = (sg4.x).toFloat; xw = (sg4.x).toFloat; yx = (sg4.y).toFloat; yy = (sg4.y).toFloat; yz = (sg4.y).toFloat; yw = (sg4.y).toFloat; zx = (sg4.z).toFloat; zy = (sg4.z).toFloat; zz = (sg4.z).toFloat; zw = (sg4.z).toFloat; wx = (sg4.w).toFloat; wy = (sg4.w).toFloat; wz = (sg4.w).toFloat; ww = (sg4.w).toFloat; this }
    def :-~(sg4: GVec4S) = { xx = (sg4.x).toFloat; xy = (sg4.y).toFloat; xz = (sg4.z).toFloat; xw = (sg4.w).toFloat; yx = (sg4.x).toFloat; yy = (sg4.y).toFloat; yz = (sg4.z).toFloat; yw = (sg4.w).toFloat; zx = (sg4.x).toFloat; zy = (sg4.y).toFloat; zz = (sg4.z).toFloat; zw = (sg4.w).toFloat; wx = (sg4.x).toFloat; wy = (sg4.y).toFloat; wz = (sg4.z).toFloat; ww = (sg4.w).toFloat; this }
    def :|~(ig4: GVec4I) = { xx = (ig4.x).toFloat; xy = (ig4.x).toFloat; xz = (ig4.x).toFloat; xw = (ig4.x).toFloat; yx = (ig4.y).toFloat; yy = (ig4.y).toFloat; yz = (ig4.y).toFloat; yw = (ig4.y).toFloat; zx = (ig4.z).toFloat; zy = (ig4.z).toFloat; zz = (ig4.z).toFloat; zw = (ig4.z).toFloat; wx = (ig4.w).toFloat; wy = (ig4.w).toFloat; wz = (ig4.w).toFloat; ww = (ig4.w).toFloat; this }
    def :-~(ig4: GVec4I) = { xx = (ig4.x).toFloat; xy = (ig4.y).toFloat; xz = (ig4.z).toFloat; xw = (ig4.w).toFloat; yx = (ig4.x).toFloat; yy = (ig4.y).toFloat; yz = (ig4.z).toFloat; yw = (ig4.w).toFloat; zx = (ig4.x).toFloat; zy = (ig4.y).toFloat; zz = (ig4.z).toFloat; zw = (ig4.w).toFloat; wx = (ig4.x).toFloat; wy = (ig4.y).toFloat; wz = (ig4.z).toFloat; ww = (ig4.w).toFloat; this }
    def :|~~(lg4: GVec4L) = { xx = (lg4.x).toFloat; xy = (lg4.x).toFloat; xz = (lg4.x).toFloat; xw = (lg4.x).toFloat; yx = (lg4.y).toFloat; yy = (lg4.y).toFloat; yz = (lg4.y).toFloat; yw = (lg4.y).toFloat; zx = (lg4.z).toFloat; zy = (lg4.z).toFloat; zz = (lg4.z).toFloat; zw = (lg4.z).toFloat; wx = (lg4.w).toFloat; wy = (lg4.w).toFloat; wz = (lg4.w).toFloat; ww = (lg4.w).toFloat; this }
    def :-~~(lg4: GVec4L) = { xx = (lg4.x).toFloat; xy = (lg4.y).toFloat; xz = (lg4.z).toFloat; xw = (lg4.w).toFloat; yx = (lg4.x).toFloat; yy = (lg4.y).toFloat; yz = (lg4.z).toFloat; yw = (lg4.w).toFloat; zx = (lg4.x).toFloat; zy = (lg4.y).toFloat; zz = (lg4.z).toFloat; zw = (lg4.w).toFloat; wx = (lg4.x).toFloat; wy = (lg4.y).toFloat; wz = (lg4.z).toFloat; ww = (lg4.w).toFloat; this }
    def :|~(fg4: GVec4F) = { xx = fg4.x; xy = fg4.x; xz = fg4.x; xw = fg4.x; yx = fg4.y; yy = fg4.y; yz = fg4.y; yw = fg4.y; zx = fg4.z; zy = fg4.z; zz = fg4.z; zw = fg4.z; wx = fg4.w; wy = fg4.w; wz = fg4.w; ww = fg4.w; this }
    def :-~(fg4: GVec4F) = { xx = fg4.x; xy = fg4.y; xz = fg4.z; xw = fg4.w; yx = fg4.x; yy = fg4.y; yz = fg4.z; yw = fg4.w; zx = fg4.x; zy = fg4.y; zz = fg4.z; zw = fg4.w; wx = fg4.x; wy = fg4.y; wz = fg4.z; ww = fg4.w; this }
    def :|~~(dg4: GVec4D) = { xx = (dg4.x).toFloat; xy = (dg4.x).toFloat; xz = (dg4.x).toFloat; xw = (dg4.x).toFloat; yx = (dg4.y).toFloat; yy = (dg4.y).toFloat; yz = (dg4.y).toFloat; yw = (dg4.y).toFloat; zx = (dg4.z).toFloat; zy = (dg4.z).toFloat; zz = (dg4.z).toFloat; zw = (dg4.z).toFloat; wx = (dg4.w).toFloat; wy = (dg4.w).toFloat; wz = (dg4.w).toFloat; ww = (dg4.w).toFloat; this }
    def :-~~(dg4: GVec4D) = { xx = (dg4.x).toFloat; xy = (dg4.y).toFloat; xz = (dg4.z).toFloat; xw = (dg4.w).toFloat; yx = (dg4.x).toFloat; yy = (dg4.y).toFloat; yz = (dg4.z).toFloat; yw = (dg4.w).toFloat; zx = (dg4.x).toFloat; zy = (dg4.y).toFloat; zz = (dg4.z).toFloat; zw = (dg4.w).toFloat; wx = (dg4.x).toFloat; wy = (dg4.y).toFloat; wz = (dg4.z).toFloat; ww = (dg4.w).toFloat; this }
    def **~(sg44: GMat4S) = {val xx0 = xx*(sg44.xx).toFloat+xy*(sg44.yx).toFloat+xz*(sg44.zx).toFloat+xw*(sg44.wx).toFloat; val xy0 = xx*(sg44.xy).toFloat+xy*(sg44.yy).toFloat+xz*(sg44.zy).toFloat+xw*(sg44.wy).toFloat; val xz0 = xx*(sg44.xz).toFloat+xy*(sg44.yz).toFloat+xz*(sg44.zz).toFloat+xw*(sg44.wz).toFloat; val xw0 = xx*(sg44.xw).toFloat+xy*(sg44.yw).toFloat+xz*(sg44.zw).toFloat+xw*(sg44.ww).toFloat; val yx0 = yx*(sg44.xx).toFloat+yy*(sg44.yx).toFloat+yz*(sg44.zx).toFloat+yw*(sg44.wx).toFloat; val yy0 = yx*(sg44.xy).toFloat+yy*(sg44.yy).toFloat+yz*(sg44.zy).toFloat+yw*(sg44.wy).toFloat; val yz0 = yx*(sg44.xz).toFloat+yy*(sg44.yz).toFloat+yz*(sg44.zz).toFloat+yw*(sg44.wz).toFloat; val yw0 = yx*(sg44.xw).toFloat+yy*(sg44.yw).toFloat+yz*(sg44.zw).toFloat+yw*(sg44.ww).toFloat; val zx0 = zx*(sg44.xx).toFloat+zy*(sg44.yx).toFloat+zz*(sg44.zx).toFloat+zw*(sg44.wx).toFloat; val zy0 = zx*(sg44.xy).toFloat+zy*(sg44.yy).toFloat+zz*(sg44.zy).toFloat+zw*(sg44.wy).toFloat; val zz0 = zx*(sg44.xz).toFloat+zy*(sg44.yz).toFloat+zz*(sg44.zz).toFloat+zw*(sg44.wz).toFloat; val zw0 = zx*(sg44.xw).toFloat+zy*(sg44.yw).toFloat+zz*(sg44.zw).toFloat+zw*(sg44.ww).toFloat; val wx0 = wx*(sg44.xx).toFloat+wy*(sg44.yx).toFloat+wz*(sg44.zx).toFloat+ww*(sg44.wx).toFloat; val wy0 = wx*(sg44.xy).toFloat+wy*(sg44.yy).toFloat+wz*(sg44.zy).toFloat+ww*(sg44.wy).toFloat; val wz0 = wx*(sg44.xz).toFloat+wy*(sg44.yz).toFloat+wz*(sg44.zz).toFloat+ww*(sg44.wz).toFloat; val ww0 = wx*(sg44.xw).toFloat+wy*(sg44.yw).toFloat+wz*(sg44.zw).toFloat+ww*(sg44.ww).toFloat; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(ig44: GMat4I) = {val xx0 = xx*(ig44.xx).toFloat+xy*(ig44.yx).toFloat+xz*(ig44.zx).toFloat+xw*(ig44.wx).toFloat; val xy0 = xx*(ig44.xy).toFloat+xy*(ig44.yy).toFloat+xz*(ig44.zy).toFloat+xw*(ig44.wy).toFloat; val xz0 = xx*(ig44.xz).toFloat+xy*(ig44.yz).toFloat+xz*(ig44.zz).toFloat+xw*(ig44.wz).toFloat; val xw0 = xx*(ig44.xw).toFloat+xy*(ig44.yw).toFloat+xz*(ig44.zw).toFloat+xw*(ig44.ww).toFloat; val yx0 = yx*(ig44.xx).toFloat+yy*(ig44.yx).toFloat+yz*(ig44.zx).toFloat+yw*(ig44.wx).toFloat; val yy0 = yx*(ig44.xy).toFloat+yy*(ig44.yy).toFloat+yz*(ig44.zy).toFloat+yw*(ig44.wy).toFloat; val yz0 = yx*(ig44.xz).toFloat+yy*(ig44.yz).toFloat+yz*(ig44.zz).toFloat+yw*(ig44.wz).toFloat; val yw0 = yx*(ig44.xw).toFloat+yy*(ig44.yw).toFloat+yz*(ig44.zw).toFloat+yw*(ig44.ww).toFloat; val zx0 = zx*(ig44.xx).toFloat+zy*(ig44.yx).toFloat+zz*(ig44.zx).toFloat+zw*(ig44.wx).toFloat; val zy0 = zx*(ig44.xy).toFloat+zy*(ig44.yy).toFloat+zz*(ig44.zy).toFloat+zw*(ig44.wy).toFloat; val zz0 = zx*(ig44.xz).toFloat+zy*(ig44.yz).toFloat+zz*(ig44.zz).toFloat+zw*(ig44.wz).toFloat; val zw0 = zx*(ig44.xw).toFloat+zy*(ig44.yw).toFloat+zz*(ig44.zw).toFloat+zw*(ig44.ww).toFloat; val wx0 = wx*(ig44.xx).toFloat+wy*(ig44.yx).toFloat+wz*(ig44.zx).toFloat+ww*(ig44.wx).toFloat; val wy0 = wx*(ig44.xy).toFloat+wy*(ig44.yy).toFloat+wz*(ig44.zy).toFloat+ww*(ig44.wy).toFloat; val wz0 = wx*(ig44.xz).toFloat+wy*(ig44.yz).toFloat+wz*(ig44.zz).toFloat+ww*(ig44.wz).toFloat; val ww0 = wx*(ig44.xw).toFloat+wy*(ig44.yw).toFloat+wz*(ig44.zw).toFloat+ww*(ig44.ww).toFloat; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~~(lg44: GMat4L) = {val xx0 = (xx).toDouble*(lg44.xx).toDouble+(xy).toDouble*(lg44.yx).toDouble+(xz).toDouble*(lg44.zx).toDouble+(xw).toDouble*(lg44.wx).toDouble; val xy0 = (xx).toDouble*(lg44.xy).toDouble+(xy).toDouble*(lg44.yy).toDouble+(xz).toDouble*(lg44.zy).toDouble+(xw).toDouble*(lg44.wy).toDouble; val xz0 = (xx).toDouble*(lg44.xz).toDouble+(xy).toDouble*(lg44.yz).toDouble+(xz).toDouble*(lg44.zz).toDouble+(xw).toDouble*(lg44.wz).toDouble; val xw0 = (xx).toDouble*(lg44.xw).toDouble+(xy).toDouble*(lg44.yw).toDouble+(xz).toDouble*(lg44.zw).toDouble+(xw).toDouble*(lg44.ww).toDouble; val yx0 = (yx).toDouble*(lg44.xx).toDouble+(yy).toDouble*(lg44.yx).toDouble+(yz).toDouble*(lg44.zx).toDouble+(yw).toDouble*(lg44.wx).toDouble; val yy0 = (yx).toDouble*(lg44.xy).toDouble+(yy).toDouble*(lg44.yy).toDouble+(yz).toDouble*(lg44.zy).toDouble+(yw).toDouble*(lg44.wy).toDouble; val yz0 = (yx).toDouble*(lg44.xz).toDouble+(yy).toDouble*(lg44.yz).toDouble+(yz).toDouble*(lg44.zz).toDouble+(yw).toDouble*(lg44.wz).toDouble; val yw0 = (yx).toDouble*(lg44.xw).toDouble+(yy).toDouble*(lg44.yw).toDouble+(yz).toDouble*(lg44.zw).toDouble+(yw).toDouble*(lg44.ww).toDouble; val zx0 = (zx).toDouble*(lg44.xx).toDouble+(zy).toDouble*(lg44.yx).toDouble+(zz).toDouble*(lg44.zx).toDouble+(zw).toDouble*(lg44.wx).toDouble; val zy0 = (zx).toDouble*(lg44.xy).toDouble+(zy).toDouble*(lg44.yy).toDouble+(zz).toDouble*(lg44.zy).toDouble+(zw).toDouble*(lg44.wy).toDouble; val zz0 = (zx).toDouble*(lg44.xz).toDouble+(zy).toDouble*(lg44.yz).toDouble+(zz).toDouble*(lg44.zz).toDouble+(zw).toDouble*(lg44.wz).toDouble; val zw0 = (zx).toDouble*(lg44.xw).toDouble+(zy).toDouble*(lg44.yw).toDouble+(zz).toDouble*(lg44.zw).toDouble+(zw).toDouble*(lg44.ww).toDouble; val wx0 = (wx).toDouble*(lg44.xx).toDouble+(wy).toDouble*(lg44.yx).toDouble+(wz).toDouble*(lg44.zx).toDouble+(ww).toDouble*(lg44.wx).toDouble; val wy0 = (wx).toDouble*(lg44.xy).toDouble+(wy).toDouble*(lg44.yy).toDouble+(wz).toDouble*(lg44.zy).toDouble+(ww).toDouble*(lg44.wy).toDouble; val wz0 = (wx).toDouble*(lg44.xz).toDouble+(wy).toDouble*(lg44.yz).toDouble+(wz).toDouble*(lg44.zz).toDouble+(ww).toDouble*(lg44.wz).toDouble; val ww0 = (wx).toDouble*(lg44.xw).toDouble+(wy).toDouble*(lg44.yw).toDouble+(wz).toDouble*(lg44.zw).toDouble+(ww).toDouble*(lg44.ww).toDouble; xx = (xx0).toFloat; xy = (xy0).toFloat; xz = (xz0).toFloat; xw = (xw0).toFloat; yx = (yx0).toFloat; yy = (yy0).toFloat; yz = (yz0).toFloat; yw = (yw0).toFloat; zx = (zx0).toFloat; zy = (zy0).toFloat; zz = (zz0).toFloat; zw = (zw0).toFloat; wx = (wx0).toFloat; wy = (wy0).toFloat; wz = (wz0).toFloat; ww = (ww0).toFloat; this }
    def **~(fg44: GMat4F) = {val xx0 = xx*fg44.xx+xy*fg44.yx+xz*fg44.zx+xw*fg44.wx; val xy0 = xx*fg44.xy+xy*fg44.yy+xz*fg44.zy+xw*fg44.wy; val xz0 = xx*fg44.xz+xy*fg44.yz+xz*fg44.zz+xw*fg44.wz; val xw0 = xx*fg44.xw+xy*fg44.yw+xz*fg44.zw+xw*fg44.ww; val yx0 = yx*fg44.xx+yy*fg44.yx+yz*fg44.zx+yw*fg44.wx; val yy0 = yx*fg44.xy+yy*fg44.yy+yz*fg44.zy+yw*fg44.wy; val yz0 = yx*fg44.xz+yy*fg44.yz+yz*fg44.zz+yw*fg44.wz; val yw0 = yx*fg44.xw+yy*fg44.yw+yz*fg44.zw+yw*fg44.ww; val zx0 = zx*fg44.xx+zy*fg44.yx+zz*fg44.zx+zw*fg44.wx; val zy0 = zx*fg44.xy+zy*fg44.yy+zz*fg44.zy+zw*fg44.wy; val zz0 = zx*fg44.xz+zy*fg44.yz+zz*fg44.zz+zw*fg44.wz; val zw0 = zx*fg44.xw+zy*fg44.yw+zz*fg44.zw+zw*fg44.ww; val wx0 = wx*fg44.xx+wy*fg44.yx+wz*fg44.zx+ww*fg44.wx; val wy0 = wx*fg44.xy+wy*fg44.yy+wz*fg44.zy+ww*fg44.wy; val wz0 = wx*fg44.xz+wy*fg44.yz+wz*fg44.zz+ww*fg44.wz; val ww0 = wx*fg44.xw+wy*fg44.yw+wz*fg44.zw+ww*fg44.ww; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~~(dg44: GMat4D) = {val xx0 = (xx).toDouble*dg44.xx+(xy).toDouble*dg44.yx+(xz).toDouble*dg44.zx+(xw).toDouble*dg44.wx; val xy0 = (xx).toDouble*dg44.xy+(xy).toDouble*dg44.yy+(xz).toDouble*dg44.zy+(xw).toDouble*dg44.wy; val xz0 = (xx).toDouble*dg44.xz+(xy).toDouble*dg44.yz+(xz).toDouble*dg44.zz+(xw).toDouble*dg44.wz; val xw0 = (xx).toDouble*dg44.xw+(xy).toDouble*dg44.yw+(xz).toDouble*dg44.zw+(xw).toDouble*dg44.ww; val yx0 = (yx).toDouble*dg44.xx+(yy).toDouble*dg44.yx+(yz).toDouble*dg44.zx+(yw).toDouble*dg44.wx; val yy0 = (yx).toDouble*dg44.xy+(yy).toDouble*dg44.yy+(yz).toDouble*dg44.zy+(yw).toDouble*dg44.wy; val yz0 = (yx).toDouble*dg44.xz+(yy).toDouble*dg44.yz+(yz).toDouble*dg44.zz+(yw).toDouble*dg44.wz; val yw0 = (yx).toDouble*dg44.xw+(yy).toDouble*dg44.yw+(yz).toDouble*dg44.zw+(yw).toDouble*dg44.ww; val zx0 = (zx).toDouble*dg44.xx+(zy).toDouble*dg44.yx+(zz).toDouble*dg44.zx+(zw).toDouble*dg44.wx; val zy0 = (zx).toDouble*dg44.xy+(zy).toDouble*dg44.yy+(zz).toDouble*dg44.zy+(zw).toDouble*dg44.wy; val zz0 = (zx).toDouble*dg44.xz+(zy).toDouble*dg44.yz+(zz).toDouble*dg44.zz+(zw).toDouble*dg44.wz; val zw0 = (zx).toDouble*dg44.xw+(zy).toDouble*dg44.yw+(zz).toDouble*dg44.zw+(zw).toDouble*dg44.ww; val wx0 = (wx).toDouble*dg44.xx+(wy).toDouble*dg44.yx+(wz).toDouble*dg44.zx+(ww).toDouble*dg44.wx; val wy0 = (wx).toDouble*dg44.xy+(wy).toDouble*dg44.yy+(wz).toDouble*dg44.zy+(ww).toDouble*dg44.wy; val wz0 = (wx).toDouble*dg44.xz+(wy).toDouble*dg44.yz+(wz).toDouble*dg44.zz+(ww).toDouble*dg44.wz; val ww0 = (wx).toDouble*dg44.xw+(wy).toDouble*dg44.yw+(wz).toDouble*dg44.zw+(ww).toDouble*dg44.ww; xx = (xx0).toFloat; xy = (xy0).toFloat; xz = (xz0).toFloat; xw = (xw0).toFloat; yx = (yx0).toFloat; yy = (yy0).toFloat; yz = (yz0).toFloat; yw = (yw0).toFloat; zx = (zx0).toFloat; zy = (zy0).toFloat; zz = (zz0).toFloat; zw = (zw0).toFloat; wx = (wx0).toFloat; wy = (wy0).toFloat; wz = (wz0).toFloat; ww = (ww0).toFloat; this }
    def gaussJordanEq(fg44: GMat4F): this.type = {var xx0 = fg44.xx; var xy0 = fg44.xy; var xz0 = fg44.xz; var xw0 = fg44.xw; var yx0 = fg44.yx; var yy0 = fg44.yy; var yz0 = fg44.yz; var yw0 = fg44.yw; var zx0 = fg44.zx; var zy0 = fg44.zy; var zz0 = fg44.zz; var zw0 = fg44.zw; var wx0 = fg44.wx; var wy0 = fg44.wy; var wz0 = fg44.wz; var ww0 = fg44.ww; if (math.abs(xx) < math.abs(yx)) {if (math.abs(yx) < math.abs(zx)) {if (math.abs(zx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i43=1/zx; zx=xx; xx=1; var t43=xy; xy=zy*i43; zy=t43; t43=xz; xz=zz*i43; zz=t43; t43=xw; xw=zw*i43; zw=t43; t43=xx0; xx0=zx0*i43; zx0=t43; t43=xy0; xy0=zy0*i43; zy0=t43; t43=xz0; xz0=zz0*i43; zz0=t43; t43=xw0; xw0=zw0*i43; zw0=t43}} else {if (math.abs(yx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i42=1/yx; yx=xx; xx=1; var t42=xy; xy=yy*i42; yy=t42; t42=xz; xz=yz*i42; yz=t42; t42=xw; xw=yw*i42; yw=t42; t42=xx0; xx0=yx0*i42; yx0=t42; t42=xy0; xy0=yy0*i42; yy0=t42; t42=xz0; xz0=yz0*i42; yz0=t42; t42=xw0; xw0=yw0*i42; yw0=t42}}} else {if (math.abs(xx) < math.abs(zx)) {if (math.abs(zx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i43=1/zx; zx=xx; xx=1; var t43=xy; xy=zy*i43; zy=t43; t43=xz; xz=zz*i43; zz=t43; t43=xw; xw=zw*i43; zw=t43; t43=xx0; xx0=zx0*i43; zx0=t43; t43=xy0; xy0=zy0*i43; zy0=t43; t43=xz0; xz0=zz0*i43; zz0=t43; t43=xw0; xw0=zw0*i43; zw0=t43}} else {if (math.abs(xx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i41=1/xx; xx=1; xy=xy*i41; xz=xz*i41; xw=xw*i41; xx0*=i41; xy0*=i41; xz0*=i41; xw0*=i41}}}; { { val j42=yx/xx; yx=0; yy=yy-xy*j42; yz=yz-xz*j42; yw=yw-xw*j42; yx0-=xx0*j42; yy0-=xy0*j42; yz0-=xz0*j42; yw0-=xw0*j42}; { val j43=zx/xx; zx=0; zy=zy-xy*j43; zz=zz-xz*j43; zw=zw-xw*j43; zx0-=xx0*j43; zy0-=xy0*j43; zz0-=xz0*j43; zw0-=xw0*j43}; { val j44=wx/xx; wx=0; wy=wy-xy*j44; wz=wz-xz*j44; ww=ww-xw*j44; wx0-=xx0*j44; wy0-=xy0*j44; wz0-=xz0*j44; ww0-=xw0*j44} }; if (math.abs(yy) < math.abs(zy)) {if (math.abs(zy) < math.abs(wy)) {val i33=1/wy; wy=yy; yy=1; var t33=yz; yz=wz*i33; wz=t33; t33=yw; yw=ww*i33; ww=t33; t33=yx0; yx0=wx0*i33; wx0=t33; t33=yy0; yy0=wy0*i33; wy0=t33; t33=yz0; yz0=wz0*i33; wz0=t33; t33=yw0; yw0=ww0*i33; ww0=t33} else {val i32=1/zy; zy=yy; yy=1; var t32=yz; yz=zz*i32; zz=t32; t32=yw; yw=zw*i32; zw=t32; t32=yx0; yx0=zx0*i32; zx0=t32; t32=yy0; yy0=zy0*i32; zy0=t32; t32=yz0; yz0=zz0*i32; zz0=t32; t32=yw0; yw0=zw0*i32; zw0=t32}} else {if (math.abs(yy) < math.abs(wy)) {val i33=1/wy; wy=yy; yy=1; var t33=yz; yz=wz*i33; wz=t33; t33=yw; yw=ww*i33; ww=t33; t33=yx0; yx0=wx0*i33; wx0=t33; t33=yy0; yy0=wy0*i33; wy0=t33; t33=yz0; yz0=wz0*i33; wz0=t33; t33=yw0; yw0=ww0*i33; ww0=t33} else {val i31=1/yy; yy=1; yz=yz*i31; yw=yw*i31; yx0*=i31; yy0*=i31; yz0*=i31; yw0*=i31}}; { { val j32=zy/yy; zy=0; zz=zz-yz*j32; zw=zw-yw*j32; zx0-=yx0*j32; zy0-=yy0*j32; zz0-=yz0*j32; zw0-=yw0*j32}; { val j33=wy/yy; wy=0; wz=wz-yz*j33; ww=ww-yw*j33; wx0-=yx0*j33; wy0-=yy0*j33; wz0-=yz0*j33; ww0-=yw0*j33} }; if (math.abs(zz) < math.abs(wz)) {val i22=1/wz; wz=zz; zz=1; var t22=zw; zw=ww*i22; ww=t22; t22=zx0; zx0=wx0*i22; wx0=t22; t22=zy0; zy0=wy0*i22; wy0=t22; t22=zz0; zz0=wz0*i22; wz0=t22; t22=zw0; zw0=ww0*i22; ww0=t22} else {val i21=1/zz; zz=1; zw=zw*i21; zx0*=i21; zy0*=i21; zz0*=i21; zw0*=i21}; { val j22=wz/zz; wz=0; ww=ww-zw*j22; wx0-=zx0*j22; wy0-=zy0*j22; wz0-=zz0*j22; ww0-=zw0*j22}; { val i10=1/ww; ww=1; wx0*=i10; wy0*=i10; wz0*=i10; ww0*=i10 }; zx0-=zw*wx0; zy0-=zw*wy0; zz0-=zw*wz0; zw0-=zw*ww0; yx0-=yw*wx0; yy0-=yw*wy0; yz0-=yw*wz0; yw0-=yw*ww0; xx0-=xw*wx0; xy0-=xw*wy0; xz0-=xw*wz0; xw0-=xw*ww0; yx0-=yz*zx0; yy0-=yz*zy0; yz0-=yz*zz0; yw0-=yz*zw0; xx0-=xz*zx0; xy0-=xz*zy0; xz0-=xz*zz0; xw0-=xz*zw0; xx0-=xy*yx0; xy0-=xy*yy0; xz0-=xy*yz0; xw0-=xy*yw0; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    class RowViewX extends AVec4F { def x = xx; def x_=(x0: Float) { xx = x0 }; def y = xy; def y_=(x0: Float) { xy = x0 }; def z = xz; def z_=(x0: Float) { xz = x0 }; def w = xw; def w_=(x0: Float) { xw = x0 } }
    class ColViewX extends AVec4F { def x = xx; def x_=(x0: Float) { xx = x0 }; def y = yx; def y_=(x0: Float) { yx = x0 }; def z = zx; def z_=(x0: Float) { zx = x0 }; def w = wx; def w_=(x0: Float) { wx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec4F { def x = yx; def x_=(x0: Float) { yx = x0 }; def y = yy; def y_=(x0: Float) { yy = x0 }; def z = yz; def z_=(x0: Float) { yz = x0 }; def w = yw; def w_=(x0: Float) { yw = x0 } }
    class ColViewY extends AVec4F { def x = xy; def x_=(x0: Float) { xy = x0 }; def y = yy; def y_=(x0: Float) { yy = x0 }; def z = zy; def z_=(x0: Float) { zy = x0 }; def w = wy; def w_=(x0: Float) { wy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec4F { def x = zx; def x_=(x0: Float) { zx = x0 }; def y = zy; def y_=(x0: Float) { zy = x0 }; def z = zz; def z_=(x0: Float) { zz = x0 }; def w = zw; def w_=(x0: Float) { zw = x0 } }
    class ColViewZ extends AVec4F { def x = xz; def x_=(x0: Float) { xz = x0 }; def y = yz; def y_=(x0: Float) { yz = x0 }; def z = zz; def z_=(x0: Float) { zz = x0 }; def w = wz; def w_=(x0: Float) { wz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    class RowViewW extends AVec4F { def x = wx; def x_=(x0: Float) { wx = x0 }; def y = wy; def y_=(x0: Float) { wy = x0 }; def z = wz; def z_=(x0: Float) { wz = x0 }; def w = ww; def w_=(x0: Float) { ww = x0 } }
    class ColViewW extends AVec4F { def x = xw; def x_=(x0: Float) { xw = x0 }; def y = yw; def y_=(x0: Float) { yw = x0 }; def z = zw; def z_=(x0: Float) { zw = x0 }; def w = ww; def w_=(x0: Float) { ww = x0 } }
    def wRowView = new RowViewW
    def wColView = new ColViewW
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = xw; xw = wx; wx = temp; temp = yz; yz = zy; zy = temp; temp = yw; yw = wy; wy = temp; temp = zw; zw = wz; wz = temp; this }
    def invEq: this.type = gaussJordanEq(IMat4F.identity)
  } // class AMat4F

  object AMat4F {
    def apply(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): AMat4F = new MMat4F(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): AMat4F = IMat4F.parse(str).mut
    def identity: AMat4F = MMat4F.identity
    def zero: AMat4F = MMat4F.zero
    def traced(fg4: GVec4F) = new MMat4F(fg4.x, 0, 0, 0, 0, fg4.y, 0, 0, 0, 0, fg4.z, 0, 0, 0, 0, fg4.w)
  } // object AMat4F


  abstract class AMat4D extends GMat4D {
    def xx_=(xx0: Double): Unit
    def xy_=(xy0: Double): Unit
    def xz_=(xz0: Double): Unit
    def xw_=(xw0: Double): Unit
    def yx_=(yx0: Double): Unit
    def yy_=(yy0: Double): Unit
    def yz_=(yz0: Double): Unit
    def yw_=(yw0: Double): Unit
    def zx_=(zx0: Double): Unit
    def zy_=(zy0: Double): Unit
    def zz_=(zz0: Double): Unit
    def zw_=(zw0: Double): Unit
    def wx_=(wx0: Double): Unit
    def wy_=(wy0: Double): Unit
    def wz_=(wz0: Double): Unit
    def ww_=(ww0: Double): Unit
    override def clone(): AMat4D = new MMat4D(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: AMat4S = new MMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: AMat4I = new MMat4I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(xw)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(yw)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt, (math.round(zw)).toInt, (math.round(wx)).toInt, (math.round(wy)).toInt, (math.round(wz)).toInt, (math.round(ww)).toInt)
    override def toL: AMat4L = new MMat4L(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toF: AMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, xw0: Double = xw, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, yw0: Double = yw, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz, zw0: Double = zw, wx0: Double = wx, wy0: Double = wy, wz0: Double = wz, ww0: Double = ww): AMat4D = new MMat4D(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: AMat3D = new MMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    def mapEq(fun: Double => Double): this.type = {xx = fun(xx); xy = fun(xy); xz = fun(xz); xw = fun(xw); yx = fun(yx); yy = fun(yy); yz = fun(yz); yw = fun(yw); zx = fun(zx); zy = fun(zy); zz = fun(zz); zw = fun(zw); wx = fun(wx); wy = fun(wy); wz = fun(wz); ww = fun(ww); this }
    def negEq: this.type = { xx = -xx; xy = -xy; xz = -xz; xw = -xw; yx = -yx; yy = -yy; yz = -yz; yw = -yw; zx = -zx; zy = -zy; zz = -zz; zw = -zw; wx = -wx; wy = -wy; wz = -wz; ww = -ww; this }
    def :~(x0: Double): this.type = { xx = x0; xy = x0; xz = x0; xw = x0; yx = x0; yy = x0; yz = x0; yw = x0; zx = x0; zy = x0; zz = x0; zw = x0; wx = x0; wy = x0; wz = x0; ww = x0; this }
    def :~(sg44: GMat4S): this.type = { xx = (sg44.xx).toDouble; xy = (sg44.xy).toDouble; xz = (sg44.xz).toDouble; xw = (sg44.xw).toDouble; yx = (sg44.yx).toDouble; yy = (sg44.yy).toDouble; yz = (sg44.yz).toDouble; yw = (sg44.yw).toDouble; zx = (sg44.zx).toDouble; zy = (sg44.zy).toDouble; zz = (sg44.zz).toDouble; zw = (sg44.zw).toDouble; wx = (sg44.wx).toDouble; wy = (sg44.wy).toDouble; wz = (sg44.wz).toDouble; ww = (sg44.ww).toDouble; this }
    def :~(ig44: GMat4I): this.type = { xx = (ig44.xx).toDouble; xy = (ig44.xy).toDouble; xz = (ig44.xz).toDouble; xw = (ig44.xw).toDouble; yx = (ig44.yx).toDouble; yy = (ig44.yy).toDouble; yz = (ig44.yz).toDouble; yw = (ig44.yw).toDouble; zx = (ig44.zx).toDouble; zy = (ig44.zy).toDouble; zz = (ig44.zz).toDouble; zw = (ig44.zw).toDouble; wx = (ig44.wx).toDouble; wy = (ig44.wy).toDouble; wz = (ig44.wz).toDouble; ww = (ig44.ww).toDouble; this }
    def :~(lg44: GMat4L): this.type = { xx = (lg44.xx).toDouble; xy = (lg44.xy).toDouble; xz = (lg44.xz).toDouble; xw = (lg44.xw).toDouble; yx = (lg44.yx).toDouble; yy = (lg44.yy).toDouble; yz = (lg44.yz).toDouble; yw = (lg44.yw).toDouble; zx = (lg44.zx).toDouble; zy = (lg44.zy).toDouble; zz = (lg44.zz).toDouble; zw = (lg44.zw).toDouble; wx = (lg44.wx).toDouble; wy = (lg44.wy).toDouble; wz = (lg44.wz).toDouble; ww = (lg44.ww).toDouble; this }
    def :~(fg44: GMat4F): this.type = { xx = (fg44.xx).toDouble; xy = (fg44.xy).toDouble; xz = (fg44.xz).toDouble; xw = (fg44.xw).toDouble; yx = (fg44.yx).toDouble; yy = (fg44.yy).toDouble; yz = (fg44.yz).toDouble; yw = (fg44.yw).toDouble; zx = (fg44.zx).toDouble; zy = (fg44.zy).toDouble; zz = (fg44.zz).toDouble; zw = (fg44.zw).toDouble; wx = (fg44.wx).toDouble; wy = (fg44.wy).toDouble; wz = (fg44.wz).toDouble; ww = (fg44.ww).toDouble; this }
    def :~(dg44: GMat4D): this.type = { xx = dg44.xx; xy = dg44.xy; xz = dg44.xz; xw = dg44.xw; yx = dg44.yx; yy = dg44.yy; yz = dg44.yz; yw = dg44.yw; zx = dg44.zx; zy = dg44.zy; zz = dg44.zz; zw = dg44.zw; wx = dg44.wx; wy = dg44.wy; wz = dg44.wz; ww = dg44.ww; this }
    def :~(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): this.type = { xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def +~(x0: Double): this.type = { xx = xx + x0; xy = xy + x0; xz = xz + x0; xw = xw + x0; yx = yx + x0; yy = yy + x0; yz = yz + x0; yw = yw + x0; zx = zx + x0; zy = zy + x0; zz = zz + x0; zw = zw + x0; wx = wx + x0; wy = wy + x0; wz = wz + x0; ww = ww + x0; this }
    def +~(sg44: GMat4S): this.type = { xx = xx + (sg44.xx).toDouble; xy = xy + (sg44.xy).toDouble; xz = xz + (sg44.xz).toDouble; xw = xw + (sg44.xw).toDouble; yx = yx + (sg44.yx).toDouble; yy = yy + (sg44.yy).toDouble; yz = yz + (sg44.yz).toDouble; yw = yw + (sg44.yw).toDouble; zx = zx + (sg44.zx).toDouble; zy = zy + (sg44.zy).toDouble; zz = zz + (sg44.zz).toDouble; zw = zw + (sg44.zw).toDouble; wx = wx + (sg44.wx).toDouble; wy = wy + (sg44.wy).toDouble; wz = wz + (sg44.wz).toDouble; ww = ww + (sg44.ww).toDouble; this }
    def +~(ig44: GMat4I): this.type = { xx = xx + (ig44.xx).toDouble; xy = xy + (ig44.xy).toDouble; xz = xz + (ig44.xz).toDouble; xw = xw + (ig44.xw).toDouble; yx = yx + (ig44.yx).toDouble; yy = yy + (ig44.yy).toDouble; yz = yz + (ig44.yz).toDouble; yw = yw + (ig44.yw).toDouble; zx = zx + (ig44.zx).toDouble; zy = zy + (ig44.zy).toDouble; zz = zz + (ig44.zz).toDouble; zw = zw + (ig44.zw).toDouble; wx = wx + (ig44.wx).toDouble; wy = wy + (ig44.wy).toDouble; wz = wz + (ig44.wz).toDouble; ww = ww + (ig44.ww).toDouble; this }
    def +~(lg44: GMat4L): this.type = { xx = xx + (lg44.xx).toDouble; xy = xy + (lg44.xy).toDouble; xz = xz + (lg44.xz).toDouble; xw = xw + (lg44.xw).toDouble; yx = yx + (lg44.yx).toDouble; yy = yy + (lg44.yy).toDouble; yz = yz + (lg44.yz).toDouble; yw = yw + (lg44.yw).toDouble; zx = zx + (lg44.zx).toDouble; zy = zy + (lg44.zy).toDouble; zz = zz + (lg44.zz).toDouble; zw = zw + (lg44.zw).toDouble; wx = wx + (lg44.wx).toDouble; wy = wy + (lg44.wy).toDouble; wz = wz + (lg44.wz).toDouble; ww = ww + (lg44.ww).toDouble; this }
    def +~(fg44: GMat4F): this.type = { xx = xx + (fg44.xx).toDouble; xy = xy + (fg44.xy).toDouble; xz = xz + (fg44.xz).toDouble; xw = xw + (fg44.xw).toDouble; yx = yx + (fg44.yx).toDouble; yy = yy + (fg44.yy).toDouble; yz = yz + (fg44.yz).toDouble; yw = yw + (fg44.yw).toDouble; zx = zx + (fg44.zx).toDouble; zy = zy + (fg44.zy).toDouble; zz = zz + (fg44.zz).toDouble; zw = zw + (fg44.zw).toDouble; wx = wx + (fg44.wx).toDouble; wy = wy + (fg44.wy).toDouble; wz = wz + (fg44.wz).toDouble; ww = ww + (fg44.ww).toDouble; this }
    def +~(dg44: GMat4D): this.type = { xx = xx + dg44.xx; xy = xy + dg44.xy; xz = xz + dg44.xz; xw = xw + dg44.xw; yx = yx + dg44.yx; yy = yy + dg44.yy; yz = yz + dg44.yz; yw = yw + dg44.yw; zx = zx + dg44.zx; zy = zy + dg44.zy; zz = zz + dg44.zz; zw = zw + dg44.zw; wx = wx + dg44.wx; wy = wy + dg44.wy; wz = wz + dg44.wz; ww = ww + dg44.ww; this }
    def +~(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): this.type = { xx = xx + xx0; xy = xy + xy0; xz = xz + xz0; xw = xw + xw0; yx = yx + yx0; yy = yy + yy0; yz = yz + yz0; yw = yw + yw0; zx = zx + zx0; zy = zy + zy0; zz = zz + zz0; zw = zw + zw0; wx = wx + wx0; wy = wy + wy0; wz = wz + wz0; ww = ww + ww0; this }
    def -~(x0: Double): this.type = { xx = xx - x0; xy = xy - x0; xz = xz - x0; xw = xw - x0; yx = yx - x0; yy = yy - x0; yz = yz - x0; yw = yw - x0; zx = zx - x0; zy = zy - x0; zz = zz - x0; zw = zw - x0; wx = wx - x0; wy = wy - x0; wz = wz - x0; ww = ww - x0; this }
    def -~(sg44: GMat4S): this.type = { xx = xx - (sg44.xx).toDouble; xy = xy - (sg44.xy).toDouble; xz = xz - (sg44.xz).toDouble; xw = xw - (sg44.xw).toDouble; yx = yx - (sg44.yx).toDouble; yy = yy - (sg44.yy).toDouble; yz = yz - (sg44.yz).toDouble; yw = yw - (sg44.yw).toDouble; zx = zx - (sg44.zx).toDouble; zy = zy - (sg44.zy).toDouble; zz = zz - (sg44.zz).toDouble; zw = zw - (sg44.zw).toDouble; wx = wx - (sg44.wx).toDouble; wy = wy - (sg44.wy).toDouble; wz = wz - (sg44.wz).toDouble; ww = ww - (sg44.ww).toDouble; this }
    def -~(ig44: GMat4I): this.type = { xx = xx - (ig44.xx).toDouble; xy = xy - (ig44.xy).toDouble; xz = xz - (ig44.xz).toDouble; xw = xw - (ig44.xw).toDouble; yx = yx - (ig44.yx).toDouble; yy = yy - (ig44.yy).toDouble; yz = yz - (ig44.yz).toDouble; yw = yw - (ig44.yw).toDouble; zx = zx - (ig44.zx).toDouble; zy = zy - (ig44.zy).toDouble; zz = zz - (ig44.zz).toDouble; zw = zw - (ig44.zw).toDouble; wx = wx - (ig44.wx).toDouble; wy = wy - (ig44.wy).toDouble; wz = wz - (ig44.wz).toDouble; ww = ww - (ig44.ww).toDouble; this }
    def -~(lg44: GMat4L): this.type = { xx = xx - (lg44.xx).toDouble; xy = xy - (lg44.xy).toDouble; xz = xz - (lg44.xz).toDouble; xw = xw - (lg44.xw).toDouble; yx = yx - (lg44.yx).toDouble; yy = yy - (lg44.yy).toDouble; yz = yz - (lg44.yz).toDouble; yw = yw - (lg44.yw).toDouble; zx = zx - (lg44.zx).toDouble; zy = zy - (lg44.zy).toDouble; zz = zz - (lg44.zz).toDouble; zw = zw - (lg44.zw).toDouble; wx = wx - (lg44.wx).toDouble; wy = wy - (lg44.wy).toDouble; wz = wz - (lg44.wz).toDouble; ww = ww - (lg44.ww).toDouble; this }
    def -~(fg44: GMat4F): this.type = { xx = xx - (fg44.xx).toDouble; xy = xy - (fg44.xy).toDouble; xz = xz - (fg44.xz).toDouble; xw = xw - (fg44.xw).toDouble; yx = yx - (fg44.yx).toDouble; yy = yy - (fg44.yy).toDouble; yz = yz - (fg44.yz).toDouble; yw = yw - (fg44.yw).toDouble; zx = zx - (fg44.zx).toDouble; zy = zy - (fg44.zy).toDouble; zz = zz - (fg44.zz).toDouble; zw = zw - (fg44.zw).toDouble; wx = wx - (fg44.wx).toDouble; wy = wy - (fg44.wy).toDouble; wz = wz - (fg44.wz).toDouble; ww = ww - (fg44.ww).toDouble; this }
    def -~(dg44: GMat4D): this.type = { xx = xx - dg44.xx; xy = xy - dg44.xy; xz = xz - dg44.xz; xw = xw - dg44.xw; yx = yx - dg44.yx; yy = yy - dg44.yy; yz = yz - dg44.yz; yw = yw - dg44.yw; zx = zx - dg44.zx; zy = zy - dg44.zy; zz = zz - dg44.zz; zw = zw - dg44.zw; wx = wx - dg44.wx; wy = wy - dg44.wy; wz = wz - dg44.wz; ww = ww - dg44.ww; this }
    def -~(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): this.type = { xx = xx - xx0; xy = xy - xy0; xz = xz - xz0; xw = xw - xw0; yx = yx - yx0; yy = yy - yy0; yz = yz - yz0; yw = yw - yw0; zx = zx - zx0; zy = zy - zy0; zz = zz - zz0; zw = zw - zw0; wx = wx - wx0; wy = wy - wy0; wz = wz - wz0; ww = ww - ww0; this }
    def *~(x0: Double): this.type = { xx = xx * x0; xy = xy * x0; xz = xz * x0; xw = xw * x0; yx = yx * x0; yy = yy * x0; yz = yz * x0; yw = yw * x0; zx = zx * x0; zy = zy * x0; zz = zz * x0; zw = zw * x0; wx = wx * x0; wy = wy * x0; wz = wz * x0; ww = ww * x0; this }
    def *~(sg44: GMat4S): this.type = { xx = xx * (sg44.xx).toDouble; xy = xy * (sg44.xy).toDouble; xz = xz * (sg44.xz).toDouble; xw = xw * (sg44.xw).toDouble; yx = yx * (sg44.yx).toDouble; yy = yy * (sg44.yy).toDouble; yz = yz * (sg44.yz).toDouble; yw = yw * (sg44.yw).toDouble; zx = zx * (sg44.zx).toDouble; zy = zy * (sg44.zy).toDouble; zz = zz * (sg44.zz).toDouble; zw = zw * (sg44.zw).toDouble; wx = wx * (sg44.wx).toDouble; wy = wy * (sg44.wy).toDouble; wz = wz * (sg44.wz).toDouble; ww = ww * (sg44.ww).toDouble; this }
    def *~(ig44: GMat4I): this.type = { xx = xx * (ig44.xx).toDouble; xy = xy * (ig44.xy).toDouble; xz = xz * (ig44.xz).toDouble; xw = xw * (ig44.xw).toDouble; yx = yx * (ig44.yx).toDouble; yy = yy * (ig44.yy).toDouble; yz = yz * (ig44.yz).toDouble; yw = yw * (ig44.yw).toDouble; zx = zx * (ig44.zx).toDouble; zy = zy * (ig44.zy).toDouble; zz = zz * (ig44.zz).toDouble; zw = zw * (ig44.zw).toDouble; wx = wx * (ig44.wx).toDouble; wy = wy * (ig44.wy).toDouble; wz = wz * (ig44.wz).toDouble; ww = ww * (ig44.ww).toDouble; this }
    def *~(lg44: GMat4L): this.type = { xx = xx * (lg44.xx).toDouble; xy = xy * (lg44.xy).toDouble; xz = xz * (lg44.xz).toDouble; xw = xw * (lg44.xw).toDouble; yx = yx * (lg44.yx).toDouble; yy = yy * (lg44.yy).toDouble; yz = yz * (lg44.yz).toDouble; yw = yw * (lg44.yw).toDouble; zx = zx * (lg44.zx).toDouble; zy = zy * (lg44.zy).toDouble; zz = zz * (lg44.zz).toDouble; zw = zw * (lg44.zw).toDouble; wx = wx * (lg44.wx).toDouble; wy = wy * (lg44.wy).toDouble; wz = wz * (lg44.wz).toDouble; ww = ww * (lg44.ww).toDouble; this }
    def *~(fg44: GMat4F): this.type = { xx = xx * (fg44.xx).toDouble; xy = xy * (fg44.xy).toDouble; xz = xz * (fg44.xz).toDouble; xw = xw * (fg44.xw).toDouble; yx = yx * (fg44.yx).toDouble; yy = yy * (fg44.yy).toDouble; yz = yz * (fg44.yz).toDouble; yw = yw * (fg44.yw).toDouble; zx = zx * (fg44.zx).toDouble; zy = zy * (fg44.zy).toDouble; zz = zz * (fg44.zz).toDouble; zw = zw * (fg44.zw).toDouble; wx = wx * (fg44.wx).toDouble; wy = wy * (fg44.wy).toDouble; wz = wz * (fg44.wz).toDouble; ww = ww * (fg44.ww).toDouble; this }
    def *~(dg44: GMat4D): this.type = { xx = xx * dg44.xx; xy = xy * dg44.xy; xz = xz * dg44.xz; xw = xw * dg44.xw; yx = yx * dg44.yx; yy = yy * dg44.yy; yz = yz * dg44.yz; yw = yw * dg44.yw; zx = zx * dg44.zx; zy = zy * dg44.zy; zz = zz * dg44.zz; zw = zw * dg44.zw; wx = wx * dg44.wx; wy = wy * dg44.wy; wz = wz * dg44.wz; ww = ww * dg44.ww; this }
    def *~(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): this.type = { xx = xx * xx0; xy = xy * xy0; xz = xz * xz0; xw = xw * xw0; yx = yx * yx0; yy = yy * yy0; yz = yz * yz0; yw = yw * yw0; zx = zx * zx0; zy = zy * zy0; zz = zz * zz0; zw = zw * zw0; wx = wx * wx0; wy = wy * wy0; wz = wz * wz0; ww = ww * ww0; this }
    def /~(x0: Double): this.type = { xx = xx / x0; xy = xy / x0; xz = xz / x0; xw = xw / x0; yx = yx / x0; yy = yy / x0; yz = yz / x0; yw = yw / x0; zx = zx / x0; zy = zy / x0; zz = zz / x0; zw = zw / x0; wx = wx / x0; wy = wy / x0; wz = wz / x0; ww = ww / x0; this }
    def /~(sg44: GMat4S): this.type = { xx = xx / (sg44.xx).toDouble; xy = xy / (sg44.xy).toDouble; xz = xz / (sg44.xz).toDouble; xw = xw / (sg44.xw).toDouble; yx = yx / (sg44.yx).toDouble; yy = yy / (sg44.yy).toDouble; yz = yz / (sg44.yz).toDouble; yw = yw / (sg44.yw).toDouble; zx = zx / (sg44.zx).toDouble; zy = zy / (sg44.zy).toDouble; zz = zz / (sg44.zz).toDouble; zw = zw / (sg44.zw).toDouble; wx = wx / (sg44.wx).toDouble; wy = wy / (sg44.wy).toDouble; wz = wz / (sg44.wz).toDouble; ww = ww / (sg44.ww).toDouble; this }
    def /~(ig44: GMat4I): this.type = { xx = xx / (ig44.xx).toDouble; xy = xy / (ig44.xy).toDouble; xz = xz / (ig44.xz).toDouble; xw = xw / (ig44.xw).toDouble; yx = yx / (ig44.yx).toDouble; yy = yy / (ig44.yy).toDouble; yz = yz / (ig44.yz).toDouble; yw = yw / (ig44.yw).toDouble; zx = zx / (ig44.zx).toDouble; zy = zy / (ig44.zy).toDouble; zz = zz / (ig44.zz).toDouble; zw = zw / (ig44.zw).toDouble; wx = wx / (ig44.wx).toDouble; wy = wy / (ig44.wy).toDouble; wz = wz / (ig44.wz).toDouble; ww = ww / (ig44.ww).toDouble; this }
    def /~(lg44: GMat4L): this.type = { xx = xx / (lg44.xx).toDouble; xy = xy / (lg44.xy).toDouble; xz = xz / (lg44.xz).toDouble; xw = xw / (lg44.xw).toDouble; yx = yx / (lg44.yx).toDouble; yy = yy / (lg44.yy).toDouble; yz = yz / (lg44.yz).toDouble; yw = yw / (lg44.yw).toDouble; zx = zx / (lg44.zx).toDouble; zy = zy / (lg44.zy).toDouble; zz = zz / (lg44.zz).toDouble; zw = zw / (lg44.zw).toDouble; wx = wx / (lg44.wx).toDouble; wy = wy / (lg44.wy).toDouble; wz = wz / (lg44.wz).toDouble; ww = ww / (lg44.ww).toDouble; this }
    def /~(fg44: GMat4F): this.type = { xx = xx / (fg44.xx).toDouble; xy = xy / (fg44.xy).toDouble; xz = xz / (fg44.xz).toDouble; xw = xw / (fg44.xw).toDouble; yx = yx / (fg44.yx).toDouble; yy = yy / (fg44.yy).toDouble; yz = yz / (fg44.yz).toDouble; yw = yw / (fg44.yw).toDouble; zx = zx / (fg44.zx).toDouble; zy = zy / (fg44.zy).toDouble; zz = zz / (fg44.zz).toDouble; zw = zw / (fg44.zw).toDouble; wx = wx / (fg44.wx).toDouble; wy = wy / (fg44.wy).toDouble; wz = wz / (fg44.wz).toDouble; ww = ww / (fg44.ww).toDouble; this }
    def /~(dg44: GMat4D): this.type = { xx = xx / dg44.xx; xy = xy / dg44.xy; xz = xz / dg44.xz; xw = xw / dg44.xw; yx = yx / dg44.yx; yy = yy / dg44.yy; yz = yz / dg44.yz; yw = yw / dg44.yw; zx = zx / dg44.zx; zy = zy / dg44.zy; zz = zz / dg44.zz; zw = zw / dg44.zw; wx = wx / dg44.wx; wy = wy / dg44.wy; wz = wz / dg44.wz; ww = ww / dg44.ww; this }
    def /~(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): this.type = { xx = xx / xx0; xy = xy / xy0; xz = xz / xz0; xw = xw / xw0; yx = yx / yx0; yy = yy / yy0; yz = yz / yz0; yw = yw / yw0; zx = zx / zx0; zy = zy / zy0; zz = zz / zz0; zw = zw / zw0; wx = wx / wx0; wy = wy / wy0; wz = wz / wz0; ww = ww / ww0; this }
    def maxEq(x0: Double): this.type = { xx = math.max(xx,x0); xy = math.max(xy,x0); xz = math.max(xz,x0); xw = math.max(xw,x0); yx = math.max(yx,x0); yy = math.max(yy,x0); yz = math.max(yz,x0); yw = math.max(yw,x0); zx = math.max(zx,x0); zy = math.max(zy,x0); zz = math.max(zz,x0); zw = math.max(zw,x0); wx = math.max(wx,x0); wy = math.max(wy,x0); wz = math.max(wz,x0); ww = math.max(ww,x0); this }
    def maxEq(sg44: GMat4S): this.type = { xx = math.max(xx,(sg44.xx).toDouble); xy = math.max(xy,(sg44.xy).toDouble); xz = math.max(xz,(sg44.xz).toDouble); xw = math.max(xw,(sg44.xw).toDouble); yx = math.max(yx,(sg44.yx).toDouble); yy = math.max(yy,(sg44.yy).toDouble); yz = math.max(yz,(sg44.yz).toDouble); yw = math.max(yw,(sg44.yw).toDouble); zx = math.max(zx,(sg44.zx).toDouble); zy = math.max(zy,(sg44.zy).toDouble); zz = math.max(zz,(sg44.zz).toDouble); zw = math.max(zw,(sg44.zw).toDouble); wx = math.max(wx,(sg44.wx).toDouble); wy = math.max(wy,(sg44.wy).toDouble); wz = math.max(wz,(sg44.wz).toDouble); ww = math.max(ww,(sg44.ww).toDouble); this }
    def maxEq(ig44: GMat4I): this.type = { xx = math.max(xx,(ig44.xx).toDouble); xy = math.max(xy,(ig44.xy).toDouble); xz = math.max(xz,(ig44.xz).toDouble); xw = math.max(xw,(ig44.xw).toDouble); yx = math.max(yx,(ig44.yx).toDouble); yy = math.max(yy,(ig44.yy).toDouble); yz = math.max(yz,(ig44.yz).toDouble); yw = math.max(yw,(ig44.yw).toDouble); zx = math.max(zx,(ig44.zx).toDouble); zy = math.max(zy,(ig44.zy).toDouble); zz = math.max(zz,(ig44.zz).toDouble); zw = math.max(zw,(ig44.zw).toDouble); wx = math.max(wx,(ig44.wx).toDouble); wy = math.max(wy,(ig44.wy).toDouble); wz = math.max(wz,(ig44.wz).toDouble); ww = math.max(ww,(ig44.ww).toDouble); this }
    def maxEq(lg44: GMat4L): this.type = { xx = math.max(xx,(lg44.xx).toDouble); xy = math.max(xy,(lg44.xy).toDouble); xz = math.max(xz,(lg44.xz).toDouble); xw = math.max(xw,(lg44.xw).toDouble); yx = math.max(yx,(lg44.yx).toDouble); yy = math.max(yy,(lg44.yy).toDouble); yz = math.max(yz,(lg44.yz).toDouble); yw = math.max(yw,(lg44.yw).toDouble); zx = math.max(zx,(lg44.zx).toDouble); zy = math.max(zy,(lg44.zy).toDouble); zz = math.max(zz,(lg44.zz).toDouble); zw = math.max(zw,(lg44.zw).toDouble); wx = math.max(wx,(lg44.wx).toDouble); wy = math.max(wy,(lg44.wy).toDouble); wz = math.max(wz,(lg44.wz).toDouble); ww = math.max(ww,(lg44.ww).toDouble); this }
    def maxEq(fg44: GMat4F): this.type = { xx = math.max(xx,(fg44.xx).toDouble); xy = math.max(xy,(fg44.xy).toDouble); xz = math.max(xz,(fg44.xz).toDouble); xw = math.max(xw,(fg44.xw).toDouble); yx = math.max(yx,(fg44.yx).toDouble); yy = math.max(yy,(fg44.yy).toDouble); yz = math.max(yz,(fg44.yz).toDouble); yw = math.max(yw,(fg44.yw).toDouble); zx = math.max(zx,(fg44.zx).toDouble); zy = math.max(zy,(fg44.zy).toDouble); zz = math.max(zz,(fg44.zz).toDouble); zw = math.max(zw,(fg44.zw).toDouble); wx = math.max(wx,(fg44.wx).toDouble); wy = math.max(wy,(fg44.wy).toDouble); wz = math.max(wz,(fg44.wz).toDouble); ww = math.max(ww,(fg44.ww).toDouble); this }
    def maxEq(dg44: GMat4D): this.type = { xx = math.max(xx,dg44.xx); xy = math.max(xy,dg44.xy); xz = math.max(xz,dg44.xz); xw = math.max(xw,dg44.xw); yx = math.max(yx,dg44.yx); yy = math.max(yy,dg44.yy); yz = math.max(yz,dg44.yz); yw = math.max(yw,dg44.yw); zx = math.max(zx,dg44.zx); zy = math.max(zy,dg44.zy); zz = math.max(zz,dg44.zz); zw = math.max(zw,dg44.zw); wx = math.max(wx,dg44.wx); wy = math.max(wy,dg44.wy); wz = math.max(wz,dg44.wz); ww = math.max(ww,dg44.ww); this }
    def maxEq(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): this.type = { xx = math.max(xx,xx0); xy = math.max(xy,xy0); xz = math.max(xz,xz0); xw = math.max(xw,xw0); yx = math.max(yx,yx0); yy = math.max(yy,yy0); yz = math.max(yz,yz0); yw = math.max(yw,yw0); zx = math.max(zx,zx0); zy = math.max(zy,zy0); zz = math.max(zz,zz0); zw = math.max(zw,zw0); wx = math.max(wx,wx0); wy = math.max(wy,wy0); wz = math.max(wz,wz0); ww = math.max(ww,ww0); this }
    def minEq(x0: Double): this.type = { xx = math.min(xx,x0); xy = math.min(xy,x0); xz = math.min(xz,x0); xw = math.min(xw,x0); yx = math.min(yx,x0); yy = math.min(yy,x0); yz = math.min(yz,x0); yw = math.min(yw,x0); zx = math.min(zx,x0); zy = math.min(zy,x0); zz = math.min(zz,x0); zw = math.min(zw,x0); wx = math.min(wx,x0); wy = math.min(wy,x0); wz = math.min(wz,x0); ww = math.min(ww,x0); this }
    def minEq(sg44: GMat4S): this.type = { xx = math.min(xx,(sg44.xx).toDouble); xy = math.min(xy,(sg44.xy).toDouble); xz = math.min(xz,(sg44.xz).toDouble); xw = math.min(xw,(sg44.xw).toDouble); yx = math.min(yx,(sg44.yx).toDouble); yy = math.min(yy,(sg44.yy).toDouble); yz = math.min(yz,(sg44.yz).toDouble); yw = math.min(yw,(sg44.yw).toDouble); zx = math.min(zx,(sg44.zx).toDouble); zy = math.min(zy,(sg44.zy).toDouble); zz = math.min(zz,(sg44.zz).toDouble); zw = math.min(zw,(sg44.zw).toDouble); wx = math.min(wx,(sg44.wx).toDouble); wy = math.min(wy,(sg44.wy).toDouble); wz = math.min(wz,(sg44.wz).toDouble); ww = math.min(ww,(sg44.ww).toDouble); this }
    def minEq(ig44: GMat4I): this.type = { xx = math.min(xx,(ig44.xx).toDouble); xy = math.min(xy,(ig44.xy).toDouble); xz = math.min(xz,(ig44.xz).toDouble); xw = math.min(xw,(ig44.xw).toDouble); yx = math.min(yx,(ig44.yx).toDouble); yy = math.min(yy,(ig44.yy).toDouble); yz = math.min(yz,(ig44.yz).toDouble); yw = math.min(yw,(ig44.yw).toDouble); zx = math.min(zx,(ig44.zx).toDouble); zy = math.min(zy,(ig44.zy).toDouble); zz = math.min(zz,(ig44.zz).toDouble); zw = math.min(zw,(ig44.zw).toDouble); wx = math.min(wx,(ig44.wx).toDouble); wy = math.min(wy,(ig44.wy).toDouble); wz = math.min(wz,(ig44.wz).toDouble); ww = math.min(ww,(ig44.ww).toDouble); this }
    def minEq(lg44: GMat4L): this.type = { xx = math.min(xx,(lg44.xx).toDouble); xy = math.min(xy,(lg44.xy).toDouble); xz = math.min(xz,(lg44.xz).toDouble); xw = math.min(xw,(lg44.xw).toDouble); yx = math.min(yx,(lg44.yx).toDouble); yy = math.min(yy,(lg44.yy).toDouble); yz = math.min(yz,(lg44.yz).toDouble); yw = math.min(yw,(lg44.yw).toDouble); zx = math.min(zx,(lg44.zx).toDouble); zy = math.min(zy,(lg44.zy).toDouble); zz = math.min(zz,(lg44.zz).toDouble); zw = math.min(zw,(lg44.zw).toDouble); wx = math.min(wx,(lg44.wx).toDouble); wy = math.min(wy,(lg44.wy).toDouble); wz = math.min(wz,(lg44.wz).toDouble); ww = math.min(ww,(lg44.ww).toDouble); this }
    def minEq(fg44: GMat4F): this.type = { xx = math.min(xx,(fg44.xx).toDouble); xy = math.min(xy,(fg44.xy).toDouble); xz = math.min(xz,(fg44.xz).toDouble); xw = math.min(xw,(fg44.xw).toDouble); yx = math.min(yx,(fg44.yx).toDouble); yy = math.min(yy,(fg44.yy).toDouble); yz = math.min(yz,(fg44.yz).toDouble); yw = math.min(yw,(fg44.yw).toDouble); zx = math.min(zx,(fg44.zx).toDouble); zy = math.min(zy,(fg44.zy).toDouble); zz = math.min(zz,(fg44.zz).toDouble); zw = math.min(zw,(fg44.zw).toDouble); wx = math.min(wx,(fg44.wx).toDouble); wy = math.min(wy,(fg44.wy).toDouble); wz = math.min(wz,(fg44.wz).toDouble); ww = math.min(ww,(fg44.ww).toDouble); this }
    def minEq(dg44: GMat4D): this.type = { xx = math.min(xx,dg44.xx); xy = math.min(xy,dg44.xy); xz = math.min(xz,dg44.xz); xw = math.min(xw,dg44.xw); yx = math.min(yx,dg44.yx); yy = math.min(yy,dg44.yy); yz = math.min(yz,dg44.yz); yw = math.min(yw,dg44.yw); zx = math.min(zx,dg44.zx); zy = math.min(zy,dg44.zy); zz = math.min(zz,dg44.zz); zw = math.min(zw,dg44.zw); wx = math.min(wx,dg44.wx); wy = math.min(wy,dg44.wy); wz = math.min(wz,dg44.wz); ww = math.min(ww,dg44.ww); this }
    def minEq(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): this.type = { xx = math.min(xx,xx0); xy = math.min(xy,xy0); xz = math.min(xz,xz0); xw = math.min(xw,xw0); yx = math.min(yx,yx0); yy = math.min(yy,yy0); yz = math.min(yz,yz0); yw = math.min(yw,yw0); zx = math.min(zx,zx0); zy = math.min(zy,zy0); zz = math.min(zz,zz0); zw = math.min(zw,zw0); wx = math.min(wx,wx0); wy = math.min(wy,wy0); wz = math.min(wz,wz0); ww = math.min(ww,ww0); this }
    def operateEq(sg44: GMat4S)(fun: (Double,Double)=>Double) = { xx = fun(xx,(sg44.xx).toDouble); xy = fun(xy,(sg44.xy).toDouble); xz = fun(xz,(sg44.xz).toDouble); xw = fun(xw,(sg44.xw).toDouble); yx = fun(yx,(sg44.yx).toDouble); yy = fun(yy,(sg44.yy).toDouble); yz = fun(yz,(sg44.yz).toDouble); yw = fun(yw,(sg44.yw).toDouble); zx = fun(zx,(sg44.zx).toDouble); zy = fun(zy,(sg44.zy).toDouble); zz = fun(zz,(sg44.zz).toDouble); zw = fun(zw,(sg44.zw).toDouble); wx = fun(wx,(sg44.wx).toDouble); wy = fun(wy,(sg44.wy).toDouble); wz = fun(wz,(sg44.wz).toDouble); ww = fun(ww,(sg44.ww).toDouble); this }
    def operateEq(ig44: GMat4I)(fun: (Double,Double)=>Double) = { xx = fun(xx,(ig44.xx).toDouble); xy = fun(xy,(ig44.xy).toDouble); xz = fun(xz,(ig44.xz).toDouble); xw = fun(xw,(ig44.xw).toDouble); yx = fun(yx,(ig44.yx).toDouble); yy = fun(yy,(ig44.yy).toDouble); yz = fun(yz,(ig44.yz).toDouble); yw = fun(yw,(ig44.yw).toDouble); zx = fun(zx,(ig44.zx).toDouble); zy = fun(zy,(ig44.zy).toDouble); zz = fun(zz,(ig44.zz).toDouble); zw = fun(zw,(ig44.zw).toDouble); wx = fun(wx,(ig44.wx).toDouble); wy = fun(wy,(ig44.wy).toDouble); wz = fun(wz,(ig44.wz).toDouble); ww = fun(ww,(ig44.ww).toDouble); this }
    def operateEq(lg44: GMat4L)(fun: (Double,Double)=>Double) = { xx = fun(xx,(lg44.xx).toDouble); xy = fun(xy,(lg44.xy).toDouble); xz = fun(xz,(lg44.xz).toDouble); xw = fun(xw,(lg44.xw).toDouble); yx = fun(yx,(lg44.yx).toDouble); yy = fun(yy,(lg44.yy).toDouble); yz = fun(yz,(lg44.yz).toDouble); yw = fun(yw,(lg44.yw).toDouble); zx = fun(zx,(lg44.zx).toDouble); zy = fun(zy,(lg44.zy).toDouble); zz = fun(zz,(lg44.zz).toDouble); zw = fun(zw,(lg44.zw).toDouble); wx = fun(wx,(lg44.wx).toDouble); wy = fun(wy,(lg44.wy).toDouble); wz = fun(wz,(lg44.wz).toDouble); ww = fun(ww,(lg44.ww).toDouble); this }
    def operateEq(fg44: GMat4F)(fun: (Double,Double)=>Double) = { xx = fun(xx,(fg44.xx).toDouble); xy = fun(xy,(fg44.xy).toDouble); xz = fun(xz,(fg44.xz).toDouble); xw = fun(xw,(fg44.xw).toDouble); yx = fun(yx,(fg44.yx).toDouble); yy = fun(yy,(fg44.yy).toDouble); yz = fun(yz,(fg44.yz).toDouble); yw = fun(yw,(fg44.yw).toDouble); zx = fun(zx,(fg44.zx).toDouble); zy = fun(zy,(fg44.zy).toDouble); zz = fun(zz,(fg44.zz).toDouble); zw = fun(zw,(fg44.zw).toDouble); wx = fun(wx,(fg44.wx).toDouble); wy = fun(wy,(fg44.wy).toDouble); wz = fun(wz,(fg44.wz).toDouble); ww = fun(ww,(fg44.ww).toDouble); this }
    def operateEq(dg44: GMat4D)(fun: (Double,Double)=>Double) = { xx = fun(xx,dg44.xx); xy = fun(xy,dg44.xy); xz = fun(xz,dg44.xz); xw = fun(xw,dg44.xw); yx = fun(yx,dg44.yx); yy = fun(yy,dg44.yy); yz = fun(yz,dg44.yz); yw = fun(yw,dg44.yw); zx = fun(zx,dg44.zx); zy = fun(zy,dg44.zy); zz = fun(zz,dg44.zz); zw = fun(zw,dg44.zw); wx = fun(wx,dg44.wx); wy = fun(wy,dg44.wy); wz = fun(wz,dg44.wz); ww = fun(ww,dg44.ww); this }
    def :|~(sg4: GVec4S) = { xx = (sg4.x).toDouble; xy = (sg4.x).toDouble; xz = (sg4.x).toDouble; xw = (sg4.x).toDouble; yx = (sg4.y).toDouble; yy = (sg4.y).toDouble; yz = (sg4.y).toDouble; yw = (sg4.y).toDouble; zx = (sg4.z).toDouble; zy = (sg4.z).toDouble; zz = (sg4.z).toDouble; zw = (sg4.z).toDouble; wx = (sg4.w).toDouble; wy = (sg4.w).toDouble; wz = (sg4.w).toDouble; ww = (sg4.w).toDouble; this }
    def :-~(sg4: GVec4S) = { xx = (sg4.x).toDouble; xy = (sg4.y).toDouble; xz = (sg4.z).toDouble; xw = (sg4.w).toDouble; yx = (sg4.x).toDouble; yy = (sg4.y).toDouble; yz = (sg4.z).toDouble; yw = (sg4.w).toDouble; zx = (sg4.x).toDouble; zy = (sg4.y).toDouble; zz = (sg4.z).toDouble; zw = (sg4.w).toDouble; wx = (sg4.x).toDouble; wy = (sg4.y).toDouble; wz = (sg4.z).toDouble; ww = (sg4.w).toDouble; this }
    def :|~(ig4: GVec4I) = { xx = (ig4.x).toDouble; xy = (ig4.x).toDouble; xz = (ig4.x).toDouble; xw = (ig4.x).toDouble; yx = (ig4.y).toDouble; yy = (ig4.y).toDouble; yz = (ig4.y).toDouble; yw = (ig4.y).toDouble; zx = (ig4.z).toDouble; zy = (ig4.z).toDouble; zz = (ig4.z).toDouble; zw = (ig4.z).toDouble; wx = (ig4.w).toDouble; wy = (ig4.w).toDouble; wz = (ig4.w).toDouble; ww = (ig4.w).toDouble; this }
    def :-~(ig4: GVec4I) = { xx = (ig4.x).toDouble; xy = (ig4.y).toDouble; xz = (ig4.z).toDouble; xw = (ig4.w).toDouble; yx = (ig4.x).toDouble; yy = (ig4.y).toDouble; yz = (ig4.z).toDouble; yw = (ig4.w).toDouble; zx = (ig4.x).toDouble; zy = (ig4.y).toDouble; zz = (ig4.z).toDouble; zw = (ig4.w).toDouble; wx = (ig4.x).toDouble; wy = (ig4.y).toDouble; wz = (ig4.z).toDouble; ww = (ig4.w).toDouble; this }
    def :|~(lg4: GVec4L) = { xx = (lg4.x).toDouble; xy = (lg4.x).toDouble; xz = (lg4.x).toDouble; xw = (lg4.x).toDouble; yx = (lg4.y).toDouble; yy = (lg4.y).toDouble; yz = (lg4.y).toDouble; yw = (lg4.y).toDouble; zx = (lg4.z).toDouble; zy = (lg4.z).toDouble; zz = (lg4.z).toDouble; zw = (lg4.z).toDouble; wx = (lg4.w).toDouble; wy = (lg4.w).toDouble; wz = (lg4.w).toDouble; ww = (lg4.w).toDouble; this }
    def :-~(lg4: GVec4L) = { xx = (lg4.x).toDouble; xy = (lg4.y).toDouble; xz = (lg4.z).toDouble; xw = (lg4.w).toDouble; yx = (lg4.x).toDouble; yy = (lg4.y).toDouble; yz = (lg4.z).toDouble; yw = (lg4.w).toDouble; zx = (lg4.x).toDouble; zy = (lg4.y).toDouble; zz = (lg4.z).toDouble; zw = (lg4.w).toDouble; wx = (lg4.x).toDouble; wy = (lg4.y).toDouble; wz = (lg4.z).toDouble; ww = (lg4.w).toDouble; this }
    def :|~(fg4: GVec4F) = { xx = (fg4.x).toDouble; xy = (fg4.x).toDouble; xz = (fg4.x).toDouble; xw = (fg4.x).toDouble; yx = (fg4.y).toDouble; yy = (fg4.y).toDouble; yz = (fg4.y).toDouble; yw = (fg4.y).toDouble; zx = (fg4.z).toDouble; zy = (fg4.z).toDouble; zz = (fg4.z).toDouble; zw = (fg4.z).toDouble; wx = (fg4.w).toDouble; wy = (fg4.w).toDouble; wz = (fg4.w).toDouble; ww = (fg4.w).toDouble; this }
    def :-~(fg4: GVec4F) = { xx = (fg4.x).toDouble; xy = (fg4.y).toDouble; xz = (fg4.z).toDouble; xw = (fg4.w).toDouble; yx = (fg4.x).toDouble; yy = (fg4.y).toDouble; yz = (fg4.z).toDouble; yw = (fg4.w).toDouble; zx = (fg4.x).toDouble; zy = (fg4.y).toDouble; zz = (fg4.z).toDouble; zw = (fg4.w).toDouble; wx = (fg4.x).toDouble; wy = (fg4.y).toDouble; wz = (fg4.z).toDouble; ww = (fg4.w).toDouble; this }
    def :|~(dg4: GVec4D) = { xx = dg4.x; xy = dg4.x; xz = dg4.x; xw = dg4.x; yx = dg4.y; yy = dg4.y; yz = dg4.y; yw = dg4.y; zx = dg4.z; zy = dg4.z; zz = dg4.z; zw = dg4.z; wx = dg4.w; wy = dg4.w; wz = dg4.w; ww = dg4.w; this }
    def :-~(dg4: GVec4D) = { xx = dg4.x; xy = dg4.y; xz = dg4.z; xw = dg4.w; yx = dg4.x; yy = dg4.y; yz = dg4.z; yw = dg4.w; zx = dg4.x; zy = dg4.y; zz = dg4.z; zw = dg4.w; wx = dg4.x; wy = dg4.y; wz = dg4.z; ww = dg4.w; this }
    def **~(sg44: GMat4S) = {val xx0 = xx*(sg44.xx).toDouble+xy*(sg44.yx).toDouble+xz*(sg44.zx).toDouble+xw*(sg44.wx).toDouble; val xy0 = xx*(sg44.xy).toDouble+xy*(sg44.yy).toDouble+xz*(sg44.zy).toDouble+xw*(sg44.wy).toDouble; val xz0 = xx*(sg44.xz).toDouble+xy*(sg44.yz).toDouble+xz*(sg44.zz).toDouble+xw*(sg44.wz).toDouble; val xw0 = xx*(sg44.xw).toDouble+xy*(sg44.yw).toDouble+xz*(sg44.zw).toDouble+xw*(sg44.ww).toDouble; val yx0 = yx*(sg44.xx).toDouble+yy*(sg44.yx).toDouble+yz*(sg44.zx).toDouble+yw*(sg44.wx).toDouble; val yy0 = yx*(sg44.xy).toDouble+yy*(sg44.yy).toDouble+yz*(sg44.zy).toDouble+yw*(sg44.wy).toDouble; val yz0 = yx*(sg44.xz).toDouble+yy*(sg44.yz).toDouble+yz*(sg44.zz).toDouble+yw*(sg44.wz).toDouble; val yw0 = yx*(sg44.xw).toDouble+yy*(sg44.yw).toDouble+yz*(sg44.zw).toDouble+yw*(sg44.ww).toDouble; val zx0 = zx*(sg44.xx).toDouble+zy*(sg44.yx).toDouble+zz*(sg44.zx).toDouble+zw*(sg44.wx).toDouble; val zy0 = zx*(sg44.xy).toDouble+zy*(sg44.yy).toDouble+zz*(sg44.zy).toDouble+zw*(sg44.wy).toDouble; val zz0 = zx*(sg44.xz).toDouble+zy*(sg44.yz).toDouble+zz*(sg44.zz).toDouble+zw*(sg44.wz).toDouble; val zw0 = zx*(sg44.xw).toDouble+zy*(sg44.yw).toDouble+zz*(sg44.zw).toDouble+zw*(sg44.ww).toDouble; val wx0 = wx*(sg44.xx).toDouble+wy*(sg44.yx).toDouble+wz*(sg44.zx).toDouble+ww*(sg44.wx).toDouble; val wy0 = wx*(sg44.xy).toDouble+wy*(sg44.yy).toDouble+wz*(sg44.zy).toDouble+ww*(sg44.wy).toDouble; val wz0 = wx*(sg44.xz).toDouble+wy*(sg44.yz).toDouble+wz*(sg44.zz).toDouble+ww*(sg44.wz).toDouble; val ww0 = wx*(sg44.xw).toDouble+wy*(sg44.yw).toDouble+wz*(sg44.zw).toDouble+ww*(sg44.ww).toDouble; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(ig44: GMat4I) = {val xx0 = xx*(ig44.xx).toDouble+xy*(ig44.yx).toDouble+xz*(ig44.zx).toDouble+xw*(ig44.wx).toDouble; val xy0 = xx*(ig44.xy).toDouble+xy*(ig44.yy).toDouble+xz*(ig44.zy).toDouble+xw*(ig44.wy).toDouble; val xz0 = xx*(ig44.xz).toDouble+xy*(ig44.yz).toDouble+xz*(ig44.zz).toDouble+xw*(ig44.wz).toDouble; val xw0 = xx*(ig44.xw).toDouble+xy*(ig44.yw).toDouble+xz*(ig44.zw).toDouble+xw*(ig44.ww).toDouble; val yx0 = yx*(ig44.xx).toDouble+yy*(ig44.yx).toDouble+yz*(ig44.zx).toDouble+yw*(ig44.wx).toDouble; val yy0 = yx*(ig44.xy).toDouble+yy*(ig44.yy).toDouble+yz*(ig44.zy).toDouble+yw*(ig44.wy).toDouble; val yz0 = yx*(ig44.xz).toDouble+yy*(ig44.yz).toDouble+yz*(ig44.zz).toDouble+yw*(ig44.wz).toDouble; val yw0 = yx*(ig44.xw).toDouble+yy*(ig44.yw).toDouble+yz*(ig44.zw).toDouble+yw*(ig44.ww).toDouble; val zx0 = zx*(ig44.xx).toDouble+zy*(ig44.yx).toDouble+zz*(ig44.zx).toDouble+zw*(ig44.wx).toDouble; val zy0 = zx*(ig44.xy).toDouble+zy*(ig44.yy).toDouble+zz*(ig44.zy).toDouble+zw*(ig44.wy).toDouble; val zz0 = zx*(ig44.xz).toDouble+zy*(ig44.yz).toDouble+zz*(ig44.zz).toDouble+zw*(ig44.wz).toDouble; val zw0 = zx*(ig44.xw).toDouble+zy*(ig44.yw).toDouble+zz*(ig44.zw).toDouble+zw*(ig44.ww).toDouble; val wx0 = wx*(ig44.xx).toDouble+wy*(ig44.yx).toDouble+wz*(ig44.zx).toDouble+ww*(ig44.wx).toDouble; val wy0 = wx*(ig44.xy).toDouble+wy*(ig44.yy).toDouble+wz*(ig44.zy).toDouble+ww*(ig44.wy).toDouble; val wz0 = wx*(ig44.xz).toDouble+wy*(ig44.yz).toDouble+wz*(ig44.zz).toDouble+ww*(ig44.wz).toDouble; val ww0 = wx*(ig44.xw).toDouble+wy*(ig44.yw).toDouble+wz*(ig44.zw).toDouble+ww*(ig44.ww).toDouble; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(lg44: GMat4L) = {val xx0 = xx*(lg44.xx).toDouble+xy*(lg44.yx).toDouble+xz*(lg44.zx).toDouble+xw*(lg44.wx).toDouble; val xy0 = xx*(lg44.xy).toDouble+xy*(lg44.yy).toDouble+xz*(lg44.zy).toDouble+xw*(lg44.wy).toDouble; val xz0 = xx*(lg44.xz).toDouble+xy*(lg44.yz).toDouble+xz*(lg44.zz).toDouble+xw*(lg44.wz).toDouble; val xw0 = xx*(lg44.xw).toDouble+xy*(lg44.yw).toDouble+xz*(lg44.zw).toDouble+xw*(lg44.ww).toDouble; val yx0 = yx*(lg44.xx).toDouble+yy*(lg44.yx).toDouble+yz*(lg44.zx).toDouble+yw*(lg44.wx).toDouble; val yy0 = yx*(lg44.xy).toDouble+yy*(lg44.yy).toDouble+yz*(lg44.zy).toDouble+yw*(lg44.wy).toDouble; val yz0 = yx*(lg44.xz).toDouble+yy*(lg44.yz).toDouble+yz*(lg44.zz).toDouble+yw*(lg44.wz).toDouble; val yw0 = yx*(lg44.xw).toDouble+yy*(lg44.yw).toDouble+yz*(lg44.zw).toDouble+yw*(lg44.ww).toDouble; val zx0 = zx*(lg44.xx).toDouble+zy*(lg44.yx).toDouble+zz*(lg44.zx).toDouble+zw*(lg44.wx).toDouble; val zy0 = zx*(lg44.xy).toDouble+zy*(lg44.yy).toDouble+zz*(lg44.zy).toDouble+zw*(lg44.wy).toDouble; val zz0 = zx*(lg44.xz).toDouble+zy*(lg44.yz).toDouble+zz*(lg44.zz).toDouble+zw*(lg44.wz).toDouble; val zw0 = zx*(lg44.xw).toDouble+zy*(lg44.yw).toDouble+zz*(lg44.zw).toDouble+zw*(lg44.ww).toDouble; val wx0 = wx*(lg44.xx).toDouble+wy*(lg44.yx).toDouble+wz*(lg44.zx).toDouble+ww*(lg44.wx).toDouble; val wy0 = wx*(lg44.xy).toDouble+wy*(lg44.yy).toDouble+wz*(lg44.zy).toDouble+ww*(lg44.wy).toDouble; val wz0 = wx*(lg44.xz).toDouble+wy*(lg44.yz).toDouble+wz*(lg44.zz).toDouble+ww*(lg44.wz).toDouble; val ww0 = wx*(lg44.xw).toDouble+wy*(lg44.yw).toDouble+wz*(lg44.zw).toDouble+ww*(lg44.ww).toDouble; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(fg44: GMat4F) = {val xx0 = xx*(fg44.xx).toDouble+xy*(fg44.yx).toDouble+xz*(fg44.zx).toDouble+xw*(fg44.wx).toDouble; val xy0 = xx*(fg44.xy).toDouble+xy*(fg44.yy).toDouble+xz*(fg44.zy).toDouble+xw*(fg44.wy).toDouble; val xz0 = xx*(fg44.xz).toDouble+xy*(fg44.yz).toDouble+xz*(fg44.zz).toDouble+xw*(fg44.wz).toDouble; val xw0 = xx*(fg44.xw).toDouble+xy*(fg44.yw).toDouble+xz*(fg44.zw).toDouble+xw*(fg44.ww).toDouble; val yx0 = yx*(fg44.xx).toDouble+yy*(fg44.yx).toDouble+yz*(fg44.zx).toDouble+yw*(fg44.wx).toDouble; val yy0 = yx*(fg44.xy).toDouble+yy*(fg44.yy).toDouble+yz*(fg44.zy).toDouble+yw*(fg44.wy).toDouble; val yz0 = yx*(fg44.xz).toDouble+yy*(fg44.yz).toDouble+yz*(fg44.zz).toDouble+yw*(fg44.wz).toDouble; val yw0 = yx*(fg44.xw).toDouble+yy*(fg44.yw).toDouble+yz*(fg44.zw).toDouble+yw*(fg44.ww).toDouble; val zx0 = zx*(fg44.xx).toDouble+zy*(fg44.yx).toDouble+zz*(fg44.zx).toDouble+zw*(fg44.wx).toDouble; val zy0 = zx*(fg44.xy).toDouble+zy*(fg44.yy).toDouble+zz*(fg44.zy).toDouble+zw*(fg44.wy).toDouble; val zz0 = zx*(fg44.xz).toDouble+zy*(fg44.yz).toDouble+zz*(fg44.zz).toDouble+zw*(fg44.wz).toDouble; val zw0 = zx*(fg44.xw).toDouble+zy*(fg44.yw).toDouble+zz*(fg44.zw).toDouble+zw*(fg44.ww).toDouble; val wx0 = wx*(fg44.xx).toDouble+wy*(fg44.yx).toDouble+wz*(fg44.zx).toDouble+ww*(fg44.wx).toDouble; val wy0 = wx*(fg44.xy).toDouble+wy*(fg44.yy).toDouble+wz*(fg44.zy).toDouble+ww*(fg44.wy).toDouble; val wz0 = wx*(fg44.xz).toDouble+wy*(fg44.yz).toDouble+wz*(fg44.zz).toDouble+ww*(fg44.wz).toDouble; val ww0 = wx*(fg44.xw).toDouble+wy*(fg44.yw).toDouble+wz*(fg44.zw).toDouble+ww*(fg44.ww).toDouble; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def **~(dg44: GMat4D) = {val xx0 = xx*dg44.xx+xy*dg44.yx+xz*dg44.zx+xw*dg44.wx; val xy0 = xx*dg44.xy+xy*dg44.yy+xz*dg44.zy+xw*dg44.wy; val xz0 = xx*dg44.xz+xy*dg44.yz+xz*dg44.zz+xw*dg44.wz; val xw0 = xx*dg44.xw+xy*dg44.yw+xz*dg44.zw+xw*dg44.ww; val yx0 = yx*dg44.xx+yy*dg44.yx+yz*dg44.zx+yw*dg44.wx; val yy0 = yx*dg44.xy+yy*dg44.yy+yz*dg44.zy+yw*dg44.wy; val yz0 = yx*dg44.xz+yy*dg44.yz+yz*dg44.zz+yw*dg44.wz; val yw0 = yx*dg44.xw+yy*dg44.yw+yz*dg44.zw+yw*dg44.ww; val zx0 = zx*dg44.xx+zy*dg44.yx+zz*dg44.zx+zw*dg44.wx; val zy0 = zx*dg44.xy+zy*dg44.yy+zz*dg44.zy+zw*dg44.wy; val zz0 = zx*dg44.xz+zy*dg44.yz+zz*dg44.zz+zw*dg44.wz; val zw0 = zx*dg44.xw+zy*dg44.yw+zz*dg44.zw+zw*dg44.ww; val wx0 = wx*dg44.xx+wy*dg44.yx+wz*dg44.zx+ww*dg44.wx; val wy0 = wx*dg44.xy+wy*dg44.yy+wz*dg44.zy+ww*dg44.wy; val wz0 = wx*dg44.xz+wy*dg44.yz+wz*dg44.zz+ww*dg44.wz; val ww0 = wx*dg44.xw+wy*dg44.yw+wz*dg44.zw+ww*dg44.ww; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    def gaussJordanEq(dg44: GMat4D): this.type = {var xx0 = dg44.xx; var xy0 = dg44.xy; var xz0 = dg44.xz; var xw0 = dg44.xw; var yx0 = dg44.yx; var yy0 = dg44.yy; var yz0 = dg44.yz; var yw0 = dg44.yw; var zx0 = dg44.zx; var zy0 = dg44.zy; var zz0 = dg44.zz; var zw0 = dg44.zw; var wx0 = dg44.wx; var wy0 = dg44.wy; var wz0 = dg44.wz; var ww0 = dg44.ww; if (math.abs(xx) < math.abs(yx)) {if (math.abs(yx) < math.abs(zx)) {if (math.abs(zx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i43=1/zx; zx=xx; xx=1; var t43=xy; xy=zy*i43; zy=t43; t43=xz; xz=zz*i43; zz=t43; t43=xw; xw=zw*i43; zw=t43; t43=xx0; xx0=zx0*i43; zx0=t43; t43=xy0; xy0=zy0*i43; zy0=t43; t43=xz0; xz0=zz0*i43; zz0=t43; t43=xw0; xw0=zw0*i43; zw0=t43}} else {if (math.abs(yx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i42=1/yx; yx=xx; xx=1; var t42=xy; xy=yy*i42; yy=t42; t42=xz; xz=yz*i42; yz=t42; t42=xw; xw=yw*i42; yw=t42; t42=xx0; xx0=yx0*i42; yx0=t42; t42=xy0; xy0=yy0*i42; yy0=t42; t42=xz0; xz0=yz0*i42; yz0=t42; t42=xw0; xw0=yw0*i42; yw0=t42}}} else {if (math.abs(xx) < math.abs(zx)) {if (math.abs(zx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i43=1/zx; zx=xx; xx=1; var t43=xy; xy=zy*i43; zy=t43; t43=xz; xz=zz*i43; zz=t43; t43=xw; xw=zw*i43; zw=t43; t43=xx0; xx0=zx0*i43; zx0=t43; t43=xy0; xy0=zy0*i43; zy0=t43; t43=xz0; xz0=zz0*i43; zz0=t43; t43=xw0; xw0=zw0*i43; zw0=t43}} else {if (math.abs(xx) < math.abs(wx)) {val i44=1/wx; wx=xx; xx=1; var t44=xy; xy=wy*i44; wy=t44; t44=xz; xz=wz*i44; wz=t44; t44=xw; xw=ww*i44; ww=t44; t44=xx0; xx0=wx0*i44; wx0=t44; t44=xy0; xy0=wy0*i44; wy0=t44; t44=xz0; xz0=wz0*i44; wz0=t44; t44=xw0; xw0=ww0*i44; ww0=t44} else {val i41=1/xx; xx=1; xy=xy*i41; xz=xz*i41; xw=xw*i41; xx0*=i41; xy0*=i41; xz0*=i41; xw0*=i41}}}; { { val j42=yx/xx; yx=0; yy=yy-xy*j42; yz=yz-xz*j42; yw=yw-xw*j42; yx0-=xx0*j42; yy0-=xy0*j42; yz0-=xz0*j42; yw0-=xw0*j42}; { val j43=zx/xx; zx=0; zy=zy-xy*j43; zz=zz-xz*j43; zw=zw-xw*j43; zx0-=xx0*j43; zy0-=xy0*j43; zz0-=xz0*j43; zw0-=xw0*j43}; { val j44=wx/xx; wx=0; wy=wy-xy*j44; wz=wz-xz*j44; ww=ww-xw*j44; wx0-=xx0*j44; wy0-=xy0*j44; wz0-=xz0*j44; ww0-=xw0*j44} }; if (math.abs(yy) < math.abs(zy)) {if (math.abs(zy) < math.abs(wy)) {val i33=1/wy; wy=yy; yy=1; var t33=yz; yz=wz*i33; wz=t33; t33=yw; yw=ww*i33; ww=t33; t33=yx0; yx0=wx0*i33; wx0=t33; t33=yy0; yy0=wy0*i33; wy0=t33; t33=yz0; yz0=wz0*i33; wz0=t33; t33=yw0; yw0=ww0*i33; ww0=t33} else {val i32=1/zy; zy=yy; yy=1; var t32=yz; yz=zz*i32; zz=t32; t32=yw; yw=zw*i32; zw=t32; t32=yx0; yx0=zx0*i32; zx0=t32; t32=yy0; yy0=zy0*i32; zy0=t32; t32=yz0; yz0=zz0*i32; zz0=t32; t32=yw0; yw0=zw0*i32; zw0=t32}} else {if (math.abs(yy) < math.abs(wy)) {val i33=1/wy; wy=yy; yy=1; var t33=yz; yz=wz*i33; wz=t33; t33=yw; yw=ww*i33; ww=t33; t33=yx0; yx0=wx0*i33; wx0=t33; t33=yy0; yy0=wy0*i33; wy0=t33; t33=yz0; yz0=wz0*i33; wz0=t33; t33=yw0; yw0=ww0*i33; ww0=t33} else {val i31=1/yy; yy=1; yz=yz*i31; yw=yw*i31; yx0*=i31; yy0*=i31; yz0*=i31; yw0*=i31}}; { { val j32=zy/yy; zy=0; zz=zz-yz*j32; zw=zw-yw*j32; zx0-=yx0*j32; zy0-=yy0*j32; zz0-=yz0*j32; zw0-=yw0*j32}; { val j33=wy/yy; wy=0; wz=wz-yz*j33; ww=ww-yw*j33; wx0-=yx0*j33; wy0-=yy0*j33; wz0-=yz0*j33; ww0-=yw0*j33} }; if (math.abs(zz) < math.abs(wz)) {val i22=1/wz; wz=zz; zz=1; var t22=zw; zw=ww*i22; ww=t22; t22=zx0; zx0=wx0*i22; wx0=t22; t22=zy0; zy0=wy0*i22; wy0=t22; t22=zz0; zz0=wz0*i22; wz0=t22; t22=zw0; zw0=ww0*i22; ww0=t22} else {val i21=1/zz; zz=1; zw=zw*i21; zx0*=i21; zy0*=i21; zz0*=i21; zw0*=i21}; { val j22=wz/zz; wz=0; ww=ww-zw*j22; wx0-=zx0*j22; wy0-=zy0*j22; wz0-=zz0*j22; ww0-=zw0*j22}; { val i10=1/ww; ww=1; wx0*=i10; wy0*=i10; wz0*=i10; ww0*=i10 }; zx0-=zw*wx0; zy0-=zw*wy0; zz0-=zw*wz0; zw0-=zw*ww0; yx0-=yw*wx0; yy0-=yw*wy0; yz0-=yw*wz0; yw0-=yw*ww0; xx0-=xw*wx0; xy0-=xw*wy0; xz0-=xw*wz0; xw0-=xw*ww0; yx0-=yz*zx0; yy0-=yz*zy0; yz0-=yz*zz0; yw0-=yz*zw0; xx0-=xz*zx0; xy0-=xz*zy0; xz0-=xz*zz0; xw0-=xz*zw0; xx0-=xy*yx0; xy0-=xy*yy0; xz0-=xy*yz0; xw0-=xy*yw0; xx = xx0; xy = xy0; xz = xz0; xw = xw0; yx = yx0; yy = yy0; yz = yz0; yw = yw0; zx = zx0; zy = zy0; zz = zz0; zw = zw0; wx = wx0; wy = wy0; wz = wz0; ww = ww0; this }
    class RowViewX extends AVec4D { def x = xx; def x_=(x0: Double) { xx = x0 }; def y = xy; def y_=(x0: Double) { xy = x0 }; def z = xz; def z_=(x0: Double) { xz = x0 }; def w = xw; def w_=(x0: Double) { xw = x0 } }
    class ColViewX extends AVec4D { def x = xx; def x_=(x0: Double) { xx = x0 }; def y = yx; def y_=(x0: Double) { yx = x0 }; def z = zx; def z_=(x0: Double) { zx = x0 }; def w = wx; def w_=(x0: Double) { wx = x0 } }
    def xRowView = new RowViewX
    def xColView = new ColViewX
    class RowViewY extends AVec4D { def x = yx; def x_=(x0: Double) { yx = x0 }; def y = yy; def y_=(x0: Double) { yy = x0 }; def z = yz; def z_=(x0: Double) { yz = x0 }; def w = yw; def w_=(x0: Double) { yw = x0 } }
    class ColViewY extends AVec4D { def x = xy; def x_=(x0: Double) { xy = x0 }; def y = yy; def y_=(x0: Double) { yy = x0 }; def z = zy; def z_=(x0: Double) { zy = x0 }; def w = wy; def w_=(x0: Double) { wy = x0 } }
    def yRowView = new RowViewY
    def yColView = new ColViewY
    class RowViewZ extends AVec4D { def x = zx; def x_=(x0: Double) { zx = x0 }; def y = zy; def y_=(x0: Double) { zy = x0 }; def z = zz; def z_=(x0: Double) { zz = x0 }; def w = zw; def w_=(x0: Double) { zw = x0 } }
    class ColViewZ extends AVec4D { def x = xz; def x_=(x0: Double) { xz = x0 }; def y = yz; def y_=(x0: Double) { yz = x0 }; def z = zz; def z_=(x0: Double) { zz = x0 }; def w = wz; def w_=(x0: Double) { wz = x0 } }
    def zRowView = new RowViewZ
    def zColView = new ColViewZ
    class RowViewW extends AVec4D { def x = wx; def x_=(x0: Double) { wx = x0 }; def y = wy; def y_=(x0: Double) { wy = x0 }; def z = wz; def z_=(x0: Double) { wz = x0 }; def w = ww; def w_=(x0: Double) { ww = x0 } }
    class ColViewW extends AVec4D { def x = xw; def x_=(x0: Double) { xw = x0 }; def y = yw; def y_=(x0: Double) { yw = x0 }; def z = zw; def z_=(x0: Double) { zw = x0 }; def w = ww; def w_=(x0: Double) { ww = x0 } }
    def wRowView = new RowViewW
    def wColView = new ColViewW
    def tEq: this.type = { var temp = xy; xy = yx; yx = temp; temp = xz; xz = zx; zx = temp; temp = xw; xw = wx; wx = temp; temp = yz; yz = zy; zy = temp; temp = yw; yw = wy; wy = temp; temp = zw; zw = wz; wz = temp; this }
    def invEq: this.type = gaussJordanEq(IMat4D.identity)
  } // class AMat4D

  object AMat4D {
    def apply(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): AMat4D = new MMat4D(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): AMat4D = IMat4D.parse(str).mut
    def identity: AMat4D = MMat4D.identity
    def zero: AMat4D = MMat4D.zero
    def traced(dg4: GVec4D) = new MMat4D(dg4.x, 0, 0, 0, 0, dg4.y, 0, 0, 0, 0, dg4.z, 0, 0, 0, 0, dg4.w)
  } // object AMat4D


  final class MMat4S(var xx: Short, var xy: Short, var xz: Short, var xw: Short, var yx: Short, var yy: Short, var yz: Short, var yw: Short, var zx: Short, var zy: Short, var zz: Short, var zw: Short, var wx: Short, var wy: Short, var wz: Short, var ww: Short) extends AMat4S {
    override def clone(): MMat4S = new MMat4S(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def copy(xx0: Short = xx, xy0: Short = xy, xz0: Short = xz, xw0: Short = xw, yx0: Short = yx, yy0: Short = yy, yz0: Short = yz, yw0: Short = yw, zx0: Short = zx, zy0: Short = zy, zz0: Short = zz, zw0: Short = zw, wx0: Short = wx, wy0: Short = wy, wz0: Short = wz, ww0: Short = ww): MMat4S = new MMat4S(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: MMat3S = new MMat3S(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toI: MMat4I = new MMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def toL: MMat4L = new MMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class MMat4S

  object MMat4S {
    def apply(xx0: Short, xy0: Short, xz0: Short, xw0: Short, yx0: Short, yy0: Short, yz0: Short, yw0: Short, zx0: Short, zy0: Short, zz0: Short, zw0: Short, wx0: Short, wy0: Short, wz0: Short, ww0: Short): MMat4S = new MMat4S(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): MMat4S = IMat4S.parse(str).mut
    def identity = new MMat4S(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    def zero = new MMat4S(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(sg4: GVec4S) = new MMat4S(sg4.x, 0, 0, 0, 0, sg4.y, 0, 0, 0, 0, sg4.z, 0, 0, 0, 0, sg4.w)
  } // object MMat4S


  final class MMat4I(var xx: Int, var xy: Int, var xz: Int, var xw: Int, var yx: Int, var yy: Int, var yz: Int, var yw: Int, var zx: Int, var zy: Int, var zz: Int, var zw: Int, var wx: Int, var wy: Int, var wz: Int, var ww: Int) extends AMat4I {
    override def clone(): MMat4I = new MMat4I(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: MMat4S = new MMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def copy(xx0: Int = xx, xy0: Int = xy, xz0: Int = xz, xw0: Int = xw, yx0: Int = yx, yy0: Int = yy, yz0: Int = yz, yw0: Int = yw, zx0: Int = zx, zy0: Int = zy, zz0: Int = zz, zw0: Int = zw, wx0: Int = wx, wy0: Int = wy, wz0: Int = wz, ww0: Int = ww): MMat4I = new MMat4I(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: MMat3I = new MMat3I(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toL: MMat4L = new MMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class MMat4I

  object MMat4I {
    def apply(xx0: Int, xy0: Int, xz0: Int, xw0: Int, yx0: Int, yy0: Int, yz0: Int, yw0: Int, zx0: Int, zy0: Int, zz0: Int, zw0: Int, wx0: Int, wy0: Int, wz0: Int, ww0: Int): MMat4I = new MMat4I(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): MMat4I = IMat4I.parse(str).mut
    def identity = new MMat4I(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    def zero = new MMat4I(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(ig4: GVec4I) = new MMat4I(ig4.x, 0, 0, 0, 0, ig4.y, 0, 0, 0, 0, ig4.z, 0, 0, 0, 0, ig4.w)
  } // object MMat4I


  final class MMat4L(var xx: Long, var xy: Long, var xz: Long, var xw: Long, var yx: Long, var yy: Long, var yz: Long, var yw: Long, var zx: Long, var zy: Long, var zz: Long, var zw: Long, var wx: Long, var wy: Long, var wz: Long, var ww: Long) extends AMat4L {
    override def clone(): MMat4L = new MMat4L(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: MMat4S = new MMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def toI: MMat4I = new MMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def copy(xx0: Long = xx, xy0: Long = xy, xz0: Long = xz, xw0: Long = xw, yx0: Long = yx, yy0: Long = yy, yz0: Long = yz, yw0: Long = yw, zx0: Long = zx, zy0: Long = zy, zz0: Long = zz, zw0: Long = zw, wx0: Long = wx, wy0: Long = wy, wz0: Long = wz, ww0: Long = ww): MMat4L = new MMat4L(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: MMat3L = new MMat3L(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class MMat4L

  object MMat4L {
    def apply(xx0: Long, xy0: Long, xz0: Long, xw0: Long, yx0: Long, yy0: Long, yz0: Long, yw0: Long, zx0: Long, zy0: Long, zz0: Long, zw0: Long, wx0: Long, wy0: Long, wz0: Long, ww0: Long): MMat4L = new MMat4L(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): MMat4L = IMat4L.parse(str).mut
    def identity = new MMat4L(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    def zero = new MMat4L(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(lg4: GVec4L) = new MMat4L(lg4.x, 0, 0, 0, 0, lg4.y, 0, 0, 0, 0, lg4.z, 0, 0, 0, 0, lg4.w)
  } // object MMat4L


  final class MMat4F(var xx: Float, var xy: Float, var xz: Float, var xw: Float, var yx: Float, var yy: Float, var yz: Float, var yw: Float, var zx: Float, var zy: Float, var zz: Float, var zw: Float, var wx: Float, var wy: Float, var wz: Float, var ww: Float) extends AMat4F {
    override def clone(): MMat4F = new MMat4F(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: MMat4S = new MMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: MMat4I = new MMat4I(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toL: MMat4L = new MMat4L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((xw).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((yw).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble), math.round((zw).toDouble), math.round((wx).toDouble), math.round((wy).toDouble), math.round((wz).toDouble), math.round((ww).toDouble))
    override def copy(xx0: Float = xx, xy0: Float = xy, xz0: Float = xz, xw0: Float = xw, yx0: Float = yx, yy0: Float = yy, yz0: Float = yz, yw0: Float = yw, zx0: Float = zx, zy0: Float = zy, zz0: Float = zz, zw0: Float = zw, wx0: Float = wx, wy0: Float = wy, wz0: Float = wz, ww0: Float = ww): MMat4F = new MMat4F(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: MMat3F = new MMat3F(xx, xy, xz, yx, yy, yz, zx, zy, zz)
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class MMat4F

  object MMat4F {
    def apply(xx0: Float, xy0: Float, xz0: Float, xw0: Float, yx0: Float, yy0: Float, yz0: Float, yw0: Float, zx0: Float, zy0: Float, zz0: Float, zw0: Float, wx0: Float, wy0: Float, wz0: Float, ww0: Float): MMat4F = new MMat4F(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): MMat4F = IMat4F.parse(str).mut
    def identity = new MMat4F(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    def zero = new MMat4F(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(fg4: GVec4F) = new MMat4F(fg4.x, 0, 0, 0, 0, fg4.y, 0, 0, 0, 0, fg4.z, 0, 0, 0, 0, fg4.w)
  } // object MMat4F


  final class MMat4D(var xx: Double, var xy: Double, var xz: Double, var xw: Double, var yx: Double, var yy: Double, var yz: Double, var yw: Double, var zx: Double, var zy: Double, var zz: Double, var zw: Double, var wx: Double, var wy: Double, var wz: Double, var ww: Double) extends AMat4D {
    override def clone(): MMat4D = new MMat4D(xx, xy, xz, xw, yx, yy, yz, yw, zx, zy, zz, zw, wx, wy, wz, ww)
    override def toS: MMat4S = new MMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: MMat4I = new MMat4I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(xw)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(yw)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt, (math.round(zw)).toInt, (math.round(wx)).toInt, (math.round(wy)).toInt, (math.round(wz)).toInt, (math.round(ww)).toInt)
    override def toL: MMat4L = new MMat4L(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def copy(xx0: Double = xx, xy0: Double = xy, xz0: Double = xz, xw0: Double = xw, yx0: Double = yx, yy0: Double = yy, yz0: Double = yz, yw0: Double = yw, zx0: Double = zx, zy0: Double = zy, zz0: Double = zz, zw0: Double = zw, wx0: Double = wx, wy0: Double = wy, wz0: Double = wz, ww0: Double = ww): MMat4D = new MMat4D(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    override def trim: MMat3D = new MMat3D(xx, xy, xz, yx, yy, yz, zx, zy, zz)
  } // class MMat4D

  object MMat4D {
    def apply(xx0: Double, xy0: Double, xz0: Double, xw0: Double, yx0: Double, yy0: Double, yz0: Double, yw0: Double, zx0: Double, zy0: Double, zz0: Double, zw0: Double, wx0: Double, wy0: Double, wz0: Double, ww0: Double): MMat4D = new MMat4D(xx0, xy0, xz0, xw0, yx0, yy0, yz0, yw0, zx0, zy0, zz0, zw0, wx0, wy0, wz0, ww0)
    def parse(str: String): MMat4D = IMat4D.parse(str).mut
    def identity = new MMat4D(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
    def zero = new MMat4D(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
    def traced(dg4: GVec4D) = new MMat4D(dg4.x, 0, 0, 0, 0, dg4.y, 0, 0, 0, 0, dg4.z, 0, 0, 0, 0, dg4.w)
  } // object MMat4D


  class BMat4S(data: Array[Short]) extends AMat4S with Iterator[BMat4S] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Short) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Short) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Short) { data(index+2) = xz0 }
    def xw = data(index+3)
    def xw_=(xw0: Short) { data(index+3) = xw0 }
    def yx = data(index+4)
    def yx_=(yx0: Short) { data(index+4) = yx0 }
    def yy = data(index+5)
    def yy_=(yy0: Short) { data(index+5) = yy0 }
    def yz = data(index+6)
    def yz_=(yz0: Short) { data(index+6) = yz0 }
    def yw = data(index+7)
    def yw_=(yw0: Short) { data(index+7) = yw0 }
    def zx = data(index+8)
    def zx_=(zx0: Short) { data(index+8) = zx0 }
    def zy = data(index+9)
    def zy_=(zy0: Short) { data(index+9) = zy0 }
    def zz = data(index+10)
    def zz_=(zz0: Short) { data(index+10) = zz0 }
    def zw = data(index+11)
    def zw_=(zw0: Short) { data(index+11) = zw0 }
    def wx = data(index+12)
    def wx_=(wx0: Short) { data(index+12) = wx0 }
    def wy = data(index+13)
    def wy_=(wy0: Short) { data(index+13) = wy0 }
    def wz = data(index+14)
    def wz_=(wz0: Short) { data(index+14) = wz0 }
    def ww = data(index+15)
    def ww_=(ww0: Short) { data(index+15) = ww0 }
    override def toString = if (index < 0 || index+16 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]")
    def hasNext = (fresh && 16 <= data.length) || (index + 32 <= data.length)
    def next = { if (fresh) fresh = false else index += 16; this }
    def reset(idx: Int = 0) = { index = idx*16; fresh = true; this }
    def spawn = { val v = new BMat4S(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toI: MMat4I = new MMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def toL: MMat4L = new MMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class BMat4S

  object BMat4S {
    def apply(a0: Array[Short]) = new BMat4S(a0)
    def apply(i0: Int) = new BMat4S(new Array[Short](i0*16))
  } // object BMat4S


  class BMat4I(data: Array[Int]) extends AMat4I with Iterator[BMat4I] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Int) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Int) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Int) { data(index+2) = xz0 }
    def xw = data(index+3)
    def xw_=(xw0: Int) { data(index+3) = xw0 }
    def yx = data(index+4)
    def yx_=(yx0: Int) { data(index+4) = yx0 }
    def yy = data(index+5)
    def yy_=(yy0: Int) { data(index+5) = yy0 }
    def yz = data(index+6)
    def yz_=(yz0: Int) { data(index+6) = yz0 }
    def yw = data(index+7)
    def yw_=(yw0: Int) { data(index+7) = yw0 }
    def zx = data(index+8)
    def zx_=(zx0: Int) { data(index+8) = zx0 }
    def zy = data(index+9)
    def zy_=(zy0: Int) { data(index+9) = zy0 }
    def zz = data(index+10)
    def zz_=(zz0: Int) { data(index+10) = zz0 }
    def zw = data(index+11)
    def zw_=(zw0: Int) { data(index+11) = zw0 }
    def wx = data(index+12)
    def wx_=(wx0: Int) { data(index+12) = wx0 }
    def wy = data(index+13)
    def wy_=(wy0: Int) { data(index+13) = wy0 }
    def wz = data(index+14)
    def wz_=(wz0: Int) { data(index+14) = wz0 }
    def ww = data(index+15)
    def ww_=(ww0: Int) { data(index+15) = ww0 }
    override def toString = if (index < 0 || index+16 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]")
    def hasNext = (fresh && 16 <= data.length) || (index + 32 <= data.length)
    def next = { if (fresh) fresh = false else index += 16; this }
    def reset(idx: Int = 0) = { index = idx*16; fresh = true; this }
    def spawn = { val v = new BMat4I(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat4S = new MMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def toL: MMat4L = new MMat4L((xx).toLong, (xy).toLong, (xz).toLong, (xw).toLong, (yx).toLong, (yy).toLong, (yz).toLong, (yw).toLong, (zx).toLong, (zy).toLong, (zz).toLong, (zw).toLong, (wx).toLong, (wy).toLong, (wz).toLong, (ww).toLong)
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class BMat4I

  object BMat4I {
    def apply(a0: Array[Int]) = new BMat4I(a0)
    def apply(i0: Int) = new BMat4I(new Array[Int](i0*16))
  } // object BMat4I


  class BMat4L(data: Array[Long]) extends AMat4L with Iterator[BMat4L] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Long) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Long) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Long) { data(index+2) = xz0 }
    def xw = data(index+3)
    def xw_=(xw0: Long) { data(index+3) = xw0 }
    def yx = data(index+4)
    def yx_=(yx0: Long) { data(index+4) = yx0 }
    def yy = data(index+5)
    def yy_=(yy0: Long) { data(index+5) = yy0 }
    def yz = data(index+6)
    def yz_=(yz0: Long) { data(index+6) = yz0 }
    def yw = data(index+7)
    def yw_=(yw0: Long) { data(index+7) = yw0 }
    def zx = data(index+8)
    def zx_=(zx0: Long) { data(index+8) = zx0 }
    def zy = data(index+9)
    def zy_=(zy0: Long) { data(index+9) = zy0 }
    def zz = data(index+10)
    def zz_=(zz0: Long) { data(index+10) = zz0 }
    def zw = data(index+11)
    def zw_=(zw0: Long) { data(index+11) = zw0 }
    def wx = data(index+12)
    def wx_=(wx0: Long) { data(index+12) = wx0 }
    def wy = data(index+13)
    def wy_=(wy0: Long) { data(index+13) = wy0 }
    def wz = data(index+14)
    def wz_=(wz0: Long) { data(index+14) = wz0 }
    def ww = data(index+15)
    def ww_=(ww0: Long) { data(index+15) = ww0 }
    override def toString = if (index < 0 || index+16 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]")
    def hasNext = (fresh && 16 <= data.length) || (index + 32 <= data.length)
    def next = { if (fresh) fresh = false else index += 16; this }
    def reset(idx: Int = 0) = { index = idx*16; fresh = true; this }
    def spawn = { val v = new BMat4L(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat4S = new MMat4S((xx).toShort, (xy).toShort, (xz).toShort, (xw).toShort, (yx).toShort, (yy).toShort, (yz).toShort, (yw).toShort, (zx).toShort, (zy).toShort, (zz).toShort, (zw).toShort, (wx).toShort, (wy).toShort, (wz).toShort, (ww).toShort)
    override def toI: MMat4I = new MMat4I((xx).toInt, (xy).toInt, (xz).toInt, (xw).toInt, (yx).toInt, (yy).toInt, (yz).toInt, (yw).toInt, (zx).toInt, (zy).toInt, (zz).toInt, (zw).toInt, (wx).toInt, (wy).toInt, (wz).toInt, (ww).toInt)
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class BMat4L

  object BMat4L {
    def apply(a0: Array[Long]) = new BMat4L(a0)
    def apply(i0: Int) = new BMat4L(new Array[Long](i0*16))
  } // object BMat4L


  class BMat4F(data: Array[Float]) extends AMat4F with Iterator[BMat4F] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Float) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Float) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Float) { data(index+2) = xz0 }
    def xw = data(index+3)
    def xw_=(xw0: Float) { data(index+3) = xw0 }
    def yx = data(index+4)
    def yx_=(yx0: Float) { data(index+4) = yx0 }
    def yy = data(index+5)
    def yy_=(yy0: Float) { data(index+5) = yy0 }
    def yz = data(index+6)
    def yz_=(yz0: Float) { data(index+6) = yz0 }
    def yw = data(index+7)
    def yw_=(yw0: Float) { data(index+7) = yw0 }
    def zx = data(index+8)
    def zx_=(zx0: Float) { data(index+8) = zx0 }
    def zy = data(index+9)
    def zy_=(zy0: Float) { data(index+9) = zy0 }
    def zz = data(index+10)
    def zz_=(zz0: Float) { data(index+10) = zz0 }
    def zw = data(index+11)
    def zw_=(zw0: Float) { data(index+11) = zw0 }
    def wx = data(index+12)
    def wx_=(wx0: Float) { data(index+12) = wx0 }
    def wy = data(index+13)
    def wy_=(wy0: Float) { data(index+13) = wy0 }
    def wz = data(index+14)
    def wz_=(wz0: Float) { data(index+14) = wz0 }
    def ww = data(index+15)
    def ww_=(ww0: Float) { data(index+15) = ww0 }
    override def toString = if (index < 0 || index+16 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]")
    def hasNext = (fresh && 16 <= data.length) || (index + 32 <= data.length)
    def next = { if (fresh) fresh = false else index += 16; this }
    def reset(idx: Int = 0) = { index = idx*16; fresh = true; this }
    def spawn = { val v = new BMat4F(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat4S = new MMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: MMat4I = new MMat4I(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toL: MMat4L = new MMat4L(math.round((xx).toDouble), math.round((xy).toDouble), math.round((xz).toDouble), math.round((xw).toDouble), math.round((yx).toDouble), math.round((yy).toDouble), math.round((yz).toDouble), math.round((yw).toDouble), math.round((zx).toDouble), math.round((zy).toDouble), math.round((zz).toDouble), math.round((zw).toDouble), math.round((wx).toDouble), math.round((wy).toDouble), math.round((wz).toDouble), math.round((ww).toDouble))
    override def toD: MMat4D = new MMat4D((xx).toDouble, (xy).toDouble, (xz).toDouble, (xw).toDouble, (yx).toDouble, (yy).toDouble, (yz).toDouble, (yw).toDouble, (zx).toDouble, (zy).toDouble, (zz).toDouble, (zw).toDouble, (wx).toDouble, (wy).toDouble, (wz).toDouble, (ww).toDouble)
  } // class BMat4F

  object BMat4F {
    def apply(a0: Array[Float]) = new BMat4F(a0)
    def apply(i0: Int) = new BMat4F(new Array[Float](i0*16))
  } // object BMat4F


  class BMat4D(data: Array[Double]) extends AMat4D with Iterator[BMat4D] {
    var index = 0
    private var fresh = true
    def xx = data(index+0)
    def xx_=(xx0: Double) { data(index+0) = xx0 }
    def xy = data(index+1)
    def xy_=(xy0: Double) { data(index+1) = xy0 }
    def xz = data(index+2)
    def xz_=(xz0: Double) { data(index+2) = xz0 }
    def xw = data(index+3)
    def xw_=(xw0: Double) { data(index+3) = xw0 }
    def yx = data(index+4)
    def yx_=(yx0: Double) { data(index+4) = yx0 }
    def yy = data(index+5)
    def yy_=(yy0: Double) { data(index+5) = yy0 }
    def yz = data(index+6)
    def yz_=(yz0: Double) { data(index+6) = yz0 }
    def yw = data(index+7)
    def yw_=(yw0: Double) { data(index+7) = yw0 }
    def zx = data(index+8)
    def zx_=(zx0: Double) { data(index+8) = zx0 }
    def zy = data(index+9)
    def zy_=(zy0: Double) { data(index+9) = zy0 }
    def zz = data(index+10)
    def zz_=(zz0: Double) { data(index+10) = zz0 }
    def zw = data(index+11)
    def zw_=(zw0: Double) { data(index+11) = zw0 }
    def wx = data(index+12)
    def wx_=(wx0: Double) { data(index+12) = wx0 }
    def wy = data(index+13)
    def wy_=(wy0: Double) { data(index+13) = wy0 }
    def wz = data(index+14)
    def wz_=(wz0: Double) { data(index+14) = wz0 }
    def ww = data(index+15)
    def ww_=(ww0: Double) { data(index+15) = ww0 }
    override def toString = if (index < 0 || index+16 > data.length) ("(out of range)") else ("["+xx+", "+xy+", "+xz+", "+xw+" ; "+yx+", "+yy+", "+yz+", "+yw+" ; "+zx+", "+zy+", "+zz+", "+zw+" ; "+wx+", "+wy+", "+wz+", "+ww+"]")
    def hasNext = (fresh && 16 <= data.length) || (index + 32 <= data.length)
    def next = { if (fresh) fresh = false else index += 16; this }
    def reset(idx: Int = 0) = { index = idx*16; fresh = true; this }
    def spawn = { val v = new BMat4D(data); v.index = index; v.fresh = fresh; v }
    override def duplicate = (this,spawn)
    override def toS: MMat4S = new MMat4S((math.round(xx)).toShort, (math.round(xy)).toShort, (math.round(xz)).toShort, (math.round(xw)).toShort, (math.round(yx)).toShort, (math.round(yy)).toShort, (math.round(yz)).toShort, (math.round(yw)).toShort, (math.round(zx)).toShort, (math.round(zy)).toShort, (math.round(zz)).toShort, (math.round(zw)).toShort, (math.round(wx)).toShort, (math.round(wy)).toShort, (math.round(wz)).toShort, (math.round(ww)).toShort)
    override def toI: MMat4I = new MMat4I((math.round(xx)).toInt, (math.round(xy)).toInt, (math.round(xz)).toInt, (math.round(xw)).toInt, (math.round(yx)).toInt, (math.round(yy)).toInt, (math.round(yz)).toInt, (math.round(yw)).toInt, (math.round(zx)).toInt, (math.round(zy)).toInt, (math.round(zz)).toInt, (math.round(zw)).toInt, (math.round(wx)).toInt, (math.round(wy)).toInt, (math.round(wz)).toInt, (math.round(ww)).toInt)
    override def toL: MMat4L = new MMat4L(math.round(xx), math.round(xy), math.round(xz), math.round(xw), math.round(yx), math.round(yy), math.round(yz), math.round(yw), math.round(zx), math.round(zy), math.round(zz), math.round(zw), math.round(wx), math.round(wy), math.round(wz), math.round(ww))
    override def toF: MMat4F = new MMat4F((xx).toFloat, (xy).toFloat, (xz).toFloat, (xw).toFloat, (yx).toFloat, (yy).toFloat, (yz).toFloat, (yw).toFloat, (zx).toFloat, (zy).toFloat, (zz).toFloat, (zw).toFloat, (wx).toFloat, (wy).toFloat, (wz).toFloat, (ww).toFloat)
  } // class BMat4D

  object BMat4D {
    def apply(a0: Array[Double]) = new BMat4D(a0)
    def apply(i0: Int) = new BMat4D(new Array[Double](i0*16))
  } // object BMat4D


}



package scalar {
  import vector._
  import matrix._
  final class ScalarS(val x: Short) extends Cloneable {
    override def toString = "["+x+"]"
    override def hashCode = x
    override def equals(any: Any) = any match { case sg1: ScalarS => {x==sg1.x }; case ig1: ScalarI => {x==ig1.x }; case lg1: ScalarL => {x==lg1.x }; case fg1: ScalarF => {x==fg1.x }; case dg1: ScalarD => {x==dg1.x }; case _ => false }
    override def clone(): ScalarS = new ScalarS(x)
    def copy(x0: Short = x): ScalarS = new ScalarS(x0)
    def +(sg2: GVec2S) = new IVec2S((x + sg2.x).toShort, (x + sg2.y).toShort)
    def +(ig2: GVec2I) = new IVec2I((x).toInt + ig2.x, (x).toInt + ig2.y)
    def +(lg2: GVec2L) = new IVec2L((x).toLong + lg2.x, (x).toLong + lg2.y)
    def +(fg2: GVec2F) = new IVec2F((x).toFloat + fg2.x, (x).toFloat + fg2.y)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (x).toDouble + dg2.y)
    def +(sg22: GMat2S) = new IMat2S((x + sg22.xx).toShort, (x + sg22.xy).toShort, (x + sg22.yx).toShort, (x + sg22.yy).toShort)
    def +(ig22: GMat2I) = new IMat2I((x).toInt + ig22.xx, (x).toInt + ig22.xy, (x).toInt + ig22.yx, (x).toInt + ig22.yy)
    def +(lg22: GMat2L) = new IMat2L((x).toLong + lg22.xx, (x).toLong + lg22.xy, (x).toLong + lg22.yx, (x).toLong + lg22.yy)
    def +(fg22: GMat2F) = new IMat2F((x).toFloat + fg22.xx, (x).toFloat + fg22.xy, (x).toFloat + fg22.yx, (x).toFloat + fg22.yy)
    def +(dg22: GMat2D) = new IMat2D((x).toDouble + dg22.xx, (x).toDouble + dg22.xy, (x).toDouble + dg22.yx, (x).toDouble + dg22.yy)
    def +(sg3: GVec3S) = new IVec3S((x + sg3.x).toShort, (x + sg3.y).toShort, (x + sg3.z).toShort)
    def +(ig3: GVec3I) = new IVec3I((x).toInt + ig3.x, (x).toInt + ig3.y, (x).toInt + ig3.z)
    def +(lg3: GVec3L) = new IVec3L((x).toLong + lg3.x, (x).toLong + lg3.y, (x).toLong + lg3.z)
    def +(fg3: GVec3F) = new IVec3F((x).toFloat + fg3.x, (x).toFloat + fg3.y, (x).toFloat + fg3.z)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (x).toDouble + dg3.y, (x).toDouble + dg3.z)
    def +(sg33: GMat3S) = new IMat3S((x + sg33.xx).toShort, (x + sg33.xy).toShort, (x + sg33.xz).toShort, (x + sg33.yx).toShort, (x + sg33.yy).toShort, (x + sg33.yz).toShort, (x + sg33.zx).toShort, (x + sg33.zy).toShort, (x + sg33.zz).toShort)
    def +(ig33: GMat3I) = new IMat3I((x).toInt + ig33.xx, (x).toInt + ig33.xy, (x).toInt + ig33.xz, (x).toInt + ig33.yx, (x).toInt + ig33.yy, (x).toInt + ig33.yz, (x).toInt + ig33.zx, (x).toInt + ig33.zy, (x).toInt + ig33.zz)
    def +(lg33: GMat3L) = new IMat3L((x).toLong + lg33.xx, (x).toLong + lg33.xy, (x).toLong + lg33.xz, (x).toLong + lg33.yx, (x).toLong + lg33.yy, (x).toLong + lg33.yz, (x).toLong + lg33.zx, (x).toLong + lg33.zy, (x).toLong + lg33.zz)
    def +(fg33: GMat3F) = new IMat3F((x).toFloat + fg33.xx, (x).toFloat + fg33.xy, (x).toFloat + fg33.xz, (x).toFloat + fg33.yx, (x).toFloat + fg33.yy, (x).toFloat + fg33.yz, (x).toFloat + fg33.zx, (x).toFloat + fg33.zy, (x).toFloat + fg33.zz)
    def +(dg33: GMat3D) = new IMat3D((x).toDouble + dg33.xx, (x).toDouble + dg33.xy, (x).toDouble + dg33.xz, (x).toDouble + dg33.yx, (x).toDouble + dg33.yy, (x).toDouble + dg33.yz, (x).toDouble + dg33.zx, (x).toDouble + dg33.zy, (x).toDouble + dg33.zz)
    def +(sg4: GVec4S) = new IVec4S((x + sg4.x).toShort, (x + sg4.y).toShort, (x + sg4.z).toShort, (x + sg4.w).toShort)
    def +(ig4: GVec4I) = new IVec4I((x).toInt + ig4.x, (x).toInt + ig4.y, (x).toInt + ig4.z, (x).toInt + ig4.w)
    def +(lg4: GVec4L) = new IVec4L((x).toLong + lg4.x, (x).toLong + lg4.y, (x).toLong + lg4.z, (x).toLong + lg4.w)
    def +(fg4: GVec4F) = new IVec4F((x).toFloat + fg4.x, (x).toFloat + fg4.y, (x).toFloat + fg4.z, (x).toFloat + fg4.w)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (x).toDouble + dg4.y, (x).toDouble + dg4.z, (x).toDouble + dg4.w)
    def +(sg44: GMat4S) = new IMat4S((x + sg44.xx).toShort, (x + sg44.xy).toShort, (x + sg44.xz).toShort, (x + sg44.xw).toShort, (x + sg44.yx).toShort, (x + sg44.yy).toShort, (x + sg44.yz).toShort, (x + sg44.yw).toShort, (x + sg44.zx).toShort, (x + sg44.zy).toShort, (x + sg44.zz).toShort, (x + sg44.zw).toShort, (x + sg44.wx).toShort, (x + sg44.wy).toShort, (x + sg44.wz).toShort, (x + sg44.ww).toShort)
    def +(ig44: GMat4I) = new IMat4I((x).toInt + ig44.xx, (x).toInt + ig44.xy, (x).toInt + ig44.xz, (x).toInt + ig44.xw, (x).toInt + ig44.yx, (x).toInt + ig44.yy, (x).toInt + ig44.yz, (x).toInt + ig44.yw, (x).toInt + ig44.zx, (x).toInt + ig44.zy, (x).toInt + ig44.zz, (x).toInt + ig44.zw, (x).toInt + ig44.wx, (x).toInt + ig44.wy, (x).toInt + ig44.wz, (x).toInt + ig44.ww)
    def +(lg44: GMat4L) = new IMat4L((x).toLong + lg44.xx, (x).toLong + lg44.xy, (x).toLong + lg44.xz, (x).toLong + lg44.xw, (x).toLong + lg44.yx, (x).toLong + lg44.yy, (x).toLong + lg44.yz, (x).toLong + lg44.yw, (x).toLong + lg44.zx, (x).toLong + lg44.zy, (x).toLong + lg44.zz, (x).toLong + lg44.zw, (x).toLong + lg44.wx, (x).toLong + lg44.wy, (x).toLong + lg44.wz, (x).toLong + lg44.ww)
    def +(fg44: GMat4F) = new IMat4F((x).toFloat + fg44.xx, (x).toFloat + fg44.xy, (x).toFloat + fg44.xz, (x).toFloat + fg44.xw, (x).toFloat + fg44.yx, (x).toFloat + fg44.yy, (x).toFloat + fg44.yz, (x).toFloat + fg44.yw, (x).toFloat + fg44.zx, (x).toFloat + fg44.zy, (x).toFloat + fg44.zz, (x).toFloat + fg44.zw, (x).toFloat + fg44.wx, (x).toFloat + fg44.wy, (x).toFloat + fg44.wz, (x).toFloat + fg44.ww)
    def +(dg44: GMat4D) = new IMat4D((x).toDouble + dg44.xx, (x).toDouble + dg44.xy, (x).toDouble + dg44.xz, (x).toDouble + dg44.xw, (x).toDouble + dg44.yx, (x).toDouble + dg44.yy, (x).toDouble + dg44.yz, (x).toDouble + dg44.yw, (x).toDouble + dg44.zx, (x).toDouble + dg44.zy, (x).toDouble + dg44.zz, (x).toDouble + dg44.zw, (x).toDouble + dg44.wx, (x).toDouble + dg44.wy, (x).toDouble + dg44.wz, (x).toDouble + dg44.ww)
    def -(sg2: GVec2S) = new IVec2S((x - sg2.x).toShort, (x - sg2.y).toShort)
    def -(ig2: GVec2I) = new IVec2I((x).toInt - ig2.x, (x).toInt - ig2.y)
    def -(lg2: GVec2L) = new IVec2L((x).toLong - lg2.x, (x).toLong - lg2.y)
    def -(fg2: GVec2F) = new IVec2F((x).toFloat - fg2.x, (x).toFloat - fg2.y)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (x).toDouble - dg2.y)
    def -(sg22: GMat2S) = new IMat2S((x - sg22.xx).toShort, (x - sg22.xy).toShort, (x - sg22.yx).toShort, (x - sg22.yy).toShort)
    def -(ig22: GMat2I) = new IMat2I((x).toInt - ig22.xx, (x).toInt - ig22.xy, (x).toInt - ig22.yx, (x).toInt - ig22.yy)
    def -(lg22: GMat2L) = new IMat2L((x).toLong - lg22.xx, (x).toLong - lg22.xy, (x).toLong - lg22.yx, (x).toLong - lg22.yy)
    def -(fg22: GMat2F) = new IMat2F((x).toFloat - fg22.xx, (x).toFloat - fg22.xy, (x).toFloat - fg22.yx, (x).toFloat - fg22.yy)
    def -(dg22: GMat2D) = new IMat2D((x).toDouble - dg22.xx, (x).toDouble - dg22.xy, (x).toDouble - dg22.yx, (x).toDouble - dg22.yy)
    def -(sg3: GVec3S) = new IVec3S((x - sg3.x).toShort, (x - sg3.y).toShort, (x - sg3.z).toShort)
    def -(ig3: GVec3I) = new IVec3I((x).toInt - ig3.x, (x).toInt - ig3.y, (x).toInt - ig3.z)
    def -(lg3: GVec3L) = new IVec3L((x).toLong - lg3.x, (x).toLong - lg3.y, (x).toLong - lg3.z)
    def -(fg3: GVec3F) = new IVec3F((x).toFloat - fg3.x, (x).toFloat - fg3.y, (x).toFloat - fg3.z)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (x).toDouble - dg3.y, (x).toDouble - dg3.z)
    def -(sg33: GMat3S) = new IMat3S((x - sg33.xx).toShort, (x - sg33.xy).toShort, (x - sg33.xz).toShort, (x - sg33.yx).toShort, (x - sg33.yy).toShort, (x - sg33.yz).toShort, (x - sg33.zx).toShort, (x - sg33.zy).toShort, (x - sg33.zz).toShort)
    def -(ig33: GMat3I) = new IMat3I((x).toInt - ig33.xx, (x).toInt - ig33.xy, (x).toInt - ig33.xz, (x).toInt - ig33.yx, (x).toInt - ig33.yy, (x).toInt - ig33.yz, (x).toInt - ig33.zx, (x).toInt - ig33.zy, (x).toInt - ig33.zz)
    def -(lg33: GMat3L) = new IMat3L((x).toLong - lg33.xx, (x).toLong - lg33.xy, (x).toLong - lg33.xz, (x).toLong - lg33.yx, (x).toLong - lg33.yy, (x).toLong - lg33.yz, (x).toLong - lg33.zx, (x).toLong - lg33.zy, (x).toLong - lg33.zz)
    def -(fg33: GMat3F) = new IMat3F((x).toFloat - fg33.xx, (x).toFloat - fg33.xy, (x).toFloat - fg33.xz, (x).toFloat - fg33.yx, (x).toFloat - fg33.yy, (x).toFloat - fg33.yz, (x).toFloat - fg33.zx, (x).toFloat - fg33.zy, (x).toFloat - fg33.zz)
    def -(dg33: GMat3D) = new IMat3D((x).toDouble - dg33.xx, (x).toDouble - dg33.xy, (x).toDouble - dg33.xz, (x).toDouble - dg33.yx, (x).toDouble - dg33.yy, (x).toDouble - dg33.yz, (x).toDouble - dg33.zx, (x).toDouble - dg33.zy, (x).toDouble - dg33.zz)
    def -(sg4: GVec4S) = new IVec4S((x - sg4.x).toShort, (x - sg4.y).toShort, (x - sg4.z).toShort, (x - sg4.w).toShort)
    def -(ig4: GVec4I) = new IVec4I((x).toInt - ig4.x, (x).toInt - ig4.y, (x).toInt - ig4.z, (x).toInt - ig4.w)
    def -(lg4: GVec4L) = new IVec4L((x).toLong - lg4.x, (x).toLong - lg4.y, (x).toLong - lg4.z, (x).toLong - lg4.w)
    def -(fg4: GVec4F) = new IVec4F((x).toFloat - fg4.x, (x).toFloat - fg4.y, (x).toFloat - fg4.z, (x).toFloat - fg4.w)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (x).toDouble - dg4.y, (x).toDouble - dg4.z, (x).toDouble - dg4.w)
    def -(sg44: GMat4S) = new IMat4S((x - sg44.xx).toShort, (x - sg44.xy).toShort, (x - sg44.xz).toShort, (x - sg44.xw).toShort, (x - sg44.yx).toShort, (x - sg44.yy).toShort, (x - sg44.yz).toShort, (x - sg44.yw).toShort, (x - sg44.zx).toShort, (x - sg44.zy).toShort, (x - sg44.zz).toShort, (x - sg44.zw).toShort, (x - sg44.wx).toShort, (x - sg44.wy).toShort, (x - sg44.wz).toShort, (x - sg44.ww).toShort)
    def -(ig44: GMat4I) = new IMat4I((x).toInt - ig44.xx, (x).toInt - ig44.xy, (x).toInt - ig44.xz, (x).toInt - ig44.xw, (x).toInt - ig44.yx, (x).toInt - ig44.yy, (x).toInt - ig44.yz, (x).toInt - ig44.yw, (x).toInt - ig44.zx, (x).toInt - ig44.zy, (x).toInt - ig44.zz, (x).toInt - ig44.zw, (x).toInt - ig44.wx, (x).toInt - ig44.wy, (x).toInt - ig44.wz, (x).toInt - ig44.ww)
    def -(lg44: GMat4L) = new IMat4L((x).toLong - lg44.xx, (x).toLong - lg44.xy, (x).toLong - lg44.xz, (x).toLong - lg44.xw, (x).toLong - lg44.yx, (x).toLong - lg44.yy, (x).toLong - lg44.yz, (x).toLong - lg44.yw, (x).toLong - lg44.zx, (x).toLong - lg44.zy, (x).toLong - lg44.zz, (x).toLong - lg44.zw, (x).toLong - lg44.wx, (x).toLong - lg44.wy, (x).toLong - lg44.wz, (x).toLong - lg44.ww)
    def -(fg44: GMat4F) = new IMat4F((x).toFloat - fg44.xx, (x).toFloat - fg44.xy, (x).toFloat - fg44.xz, (x).toFloat - fg44.xw, (x).toFloat - fg44.yx, (x).toFloat - fg44.yy, (x).toFloat - fg44.yz, (x).toFloat - fg44.yw, (x).toFloat - fg44.zx, (x).toFloat - fg44.zy, (x).toFloat - fg44.zz, (x).toFloat - fg44.zw, (x).toFloat - fg44.wx, (x).toFloat - fg44.wy, (x).toFloat - fg44.wz, (x).toFloat - fg44.ww)
    def -(dg44: GMat4D) = new IMat4D((x).toDouble - dg44.xx, (x).toDouble - dg44.xy, (x).toDouble - dg44.xz, (x).toDouble - dg44.xw, (x).toDouble - dg44.yx, (x).toDouble - dg44.yy, (x).toDouble - dg44.yz, (x).toDouble - dg44.yw, (x).toDouble - dg44.zx, (x).toDouble - dg44.zy, (x).toDouble - dg44.zz, (x).toDouble - dg44.zw, (x).toDouble - dg44.wx, (x).toDouble - dg44.wy, (x).toDouble - dg44.wz, (x).toDouble - dg44.ww)
    def *(sg2: GVec2S) = new IVec2S((x * sg2.x).toShort, (x * sg2.y).toShort)
    def *(ig2: GVec2I) = new IVec2I((x).toInt * ig2.x, (x).toInt * ig2.y)
    def *(lg2: GVec2L) = new IVec2L((x).toLong * lg2.x, (x).toLong * lg2.y)
    def *(fg2: GVec2F) = new IVec2F((x).toFloat * fg2.x, (x).toFloat * fg2.y)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (x).toDouble * dg2.y)
    def *(sg22: GMat2S) = new IMat2S((x * sg22.xx).toShort, (x * sg22.xy).toShort, (x * sg22.yx).toShort, (x * sg22.yy).toShort)
    def *(ig22: GMat2I) = new IMat2I((x).toInt * ig22.xx, (x).toInt * ig22.xy, (x).toInt * ig22.yx, (x).toInt * ig22.yy)
    def *(lg22: GMat2L) = new IMat2L((x).toLong * lg22.xx, (x).toLong * lg22.xy, (x).toLong * lg22.yx, (x).toLong * lg22.yy)
    def *(fg22: GMat2F) = new IMat2F((x).toFloat * fg22.xx, (x).toFloat * fg22.xy, (x).toFloat * fg22.yx, (x).toFloat * fg22.yy)
    def *(dg22: GMat2D) = new IMat2D((x).toDouble * dg22.xx, (x).toDouble * dg22.xy, (x).toDouble * dg22.yx, (x).toDouble * dg22.yy)
    def *(sg3: GVec3S) = new IVec3S((x * sg3.x).toShort, (x * sg3.y).toShort, (x * sg3.z).toShort)
    def *(ig3: GVec3I) = new IVec3I((x).toInt * ig3.x, (x).toInt * ig3.y, (x).toInt * ig3.z)
    def *(lg3: GVec3L) = new IVec3L((x).toLong * lg3.x, (x).toLong * lg3.y, (x).toLong * lg3.z)
    def *(fg3: GVec3F) = new IVec3F((x).toFloat * fg3.x, (x).toFloat * fg3.y, (x).toFloat * fg3.z)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (x).toDouble * dg3.y, (x).toDouble * dg3.z)
    def *(sg33: GMat3S) = new IMat3S((x * sg33.xx).toShort, (x * sg33.xy).toShort, (x * sg33.xz).toShort, (x * sg33.yx).toShort, (x * sg33.yy).toShort, (x * sg33.yz).toShort, (x * sg33.zx).toShort, (x * sg33.zy).toShort, (x * sg33.zz).toShort)
    def *(ig33: GMat3I) = new IMat3I((x).toInt * ig33.xx, (x).toInt * ig33.xy, (x).toInt * ig33.xz, (x).toInt * ig33.yx, (x).toInt * ig33.yy, (x).toInt * ig33.yz, (x).toInt * ig33.zx, (x).toInt * ig33.zy, (x).toInt * ig33.zz)
    def *(lg33: GMat3L) = new IMat3L((x).toLong * lg33.xx, (x).toLong * lg33.xy, (x).toLong * lg33.xz, (x).toLong * lg33.yx, (x).toLong * lg33.yy, (x).toLong * lg33.yz, (x).toLong * lg33.zx, (x).toLong * lg33.zy, (x).toLong * lg33.zz)
    def *(fg33: GMat3F) = new IMat3F((x).toFloat * fg33.xx, (x).toFloat * fg33.xy, (x).toFloat * fg33.xz, (x).toFloat * fg33.yx, (x).toFloat * fg33.yy, (x).toFloat * fg33.yz, (x).toFloat * fg33.zx, (x).toFloat * fg33.zy, (x).toFloat * fg33.zz)
    def *(dg33: GMat3D) = new IMat3D((x).toDouble * dg33.xx, (x).toDouble * dg33.xy, (x).toDouble * dg33.xz, (x).toDouble * dg33.yx, (x).toDouble * dg33.yy, (x).toDouble * dg33.yz, (x).toDouble * dg33.zx, (x).toDouble * dg33.zy, (x).toDouble * dg33.zz)
    def *(sg4: GVec4S) = new IVec4S((x * sg4.x).toShort, (x * sg4.y).toShort, (x * sg4.z).toShort, (x * sg4.w).toShort)
    def *(ig4: GVec4I) = new IVec4I((x).toInt * ig4.x, (x).toInt * ig4.y, (x).toInt * ig4.z, (x).toInt * ig4.w)
    def *(lg4: GVec4L) = new IVec4L((x).toLong * lg4.x, (x).toLong * lg4.y, (x).toLong * lg4.z, (x).toLong * lg4.w)
    def *(fg4: GVec4F) = new IVec4F((x).toFloat * fg4.x, (x).toFloat * fg4.y, (x).toFloat * fg4.z, (x).toFloat * fg4.w)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (x).toDouble * dg4.y, (x).toDouble * dg4.z, (x).toDouble * dg4.w)
    def *(sg44: GMat4S) = new IMat4S((x * sg44.xx).toShort, (x * sg44.xy).toShort, (x * sg44.xz).toShort, (x * sg44.xw).toShort, (x * sg44.yx).toShort, (x * sg44.yy).toShort, (x * sg44.yz).toShort, (x * sg44.yw).toShort, (x * sg44.zx).toShort, (x * sg44.zy).toShort, (x * sg44.zz).toShort, (x * sg44.zw).toShort, (x * sg44.wx).toShort, (x * sg44.wy).toShort, (x * sg44.wz).toShort, (x * sg44.ww).toShort)
    def *(ig44: GMat4I) = new IMat4I((x).toInt * ig44.xx, (x).toInt * ig44.xy, (x).toInt * ig44.xz, (x).toInt * ig44.xw, (x).toInt * ig44.yx, (x).toInt * ig44.yy, (x).toInt * ig44.yz, (x).toInt * ig44.yw, (x).toInt * ig44.zx, (x).toInt * ig44.zy, (x).toInt * ig44.zz, (x).toInt * ig44.zw, (x).toInt * ig44.wx, (x).toInt * ig44.wy, (x).toInt * ig44.wz, (x).toInt * ig44.ww)
    def *(lg44: GMat4L) = new IMat4L((x).toLong * lg44.xx, (x).toLong * lg44.xy, (x).toLong * lg44.xz, (x).toLong * lg44.xw, (x).toLong * lg44.yx, (x).toLong * lg44.yy, (x).toLong * lg44.yz, (x).toLong * lg44.yw, (x).toLong * lg44.zx, (x).toLong * lg44.zy, (x).toLong * lg44.zz, (x).toLong * lg44.zw, (x).toLong * lg44.wx, (x).toLong * lg44.wy, (x).toLong * lg44.wz, (x).toLong * lg44.ww)
    def *(fg44: GMat4F) = new IMat4F((x).toFloat * fg44.xx, (x).toFloat * fg44.xy, (x).toFloat * fg44.xz, (x).toFloat * fg44.xw, (x).toFloat * fg44.yx, (x).toFloat * fg44.yy, (x).toFloat * fg44.yz, (x).toFloat * fg44.yw, (x).toFloat * fg44.zx, (x).toFloat * fg44.zy, (x).toFloat * fg44.zz, (x).toFloat * fg44.zw, (x).toFloat * fg44.wx, (x).toFloat * fg44.wy, (x).toFloat * fg44.wz, (x).toFloat * fg44.ww)
    def *(dg44: GMat4D) = new IMat4D((x).toDouble * dg44.xx, (x).toDouble * dg44.xy, (x).toDouble * dg44.xz, (x).toDouble * dg44.xw, (x).toDouble * dg44.yx, (x).toDouble * dg44.yy, (x).toDouble * dg44.yz, (x).toDouble * dg44.yw, (x).toDouble * dg44.zx, (x).toDouble * dg44.zy, (x).toDouble * dg44.zz, (x).toDouble * dg44.zw, (x).toDouble * dg44.wx, (x).toDouble * dg44.wy, (x).toDouble * dg44.wz, (x).toDouble * dg44.ww)
    def max(sg2: GVec2S) = new IVec2S((math.max(x,sg2.x)).toShort, (math.max(x,sg2.y)).toShort)
    def max(ig2: GVec2I) = new IVec2I(math.max((x).toInt,ig2.x), math.max((x).toInt,ig2.y))
    def max(lg2: GVec2L) = new IVec2L(math.max((x).toLong,lg2.x), math.max((x).toLong,lg2.y))
    def max(fg2: GVec2F) = new IVec2F(math.max((x).toFloat,fg2.x), math.max((x).toFloat,fg2.y))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((x).toDouble,dg2.y))
    def max(sg22: GMat2S) = new IMat2S((math.max(x,sg22.xx)).toShort, (math.max(x,sg22.xy)).toShort, (math.max(x,sg22.yx)).toShort, (math.max(x,sg22.yy)).toShort)
    def max(ig22: GMat2I) = new IMat2I(math.max((x).toInt,ig22.xx), math.max((x).toInt,ig22.xy), math.max((x).toInt,ig22.yx), math.max((x).toInt,ig22.yy))
    def max(lg22: GMat2L) = new IMat2L(math.max((x).toLong,lg22.xx), math.max((x).toLong,lg22.xy), math.max((x).toLong,lg22.yx), math.max((x).toLong,lg22.yy))
    def max(fg22: GMat2F) = new IMat2F(math.max((x).toFloat,fg22.xx), math.max((x).toFloat,fg22.xy), math.max((x).toFloat,fg22.yx), math.max((x).toFloat,fg22.yy))
    def max(dg22: GMat2D) = new IMat2D(math.max((x).toDouble,dg22.xx), math.max((x).toDouble,dg22.xy), math.max((x).toDouble,dg22.yx), math.max((x).toDouble,dg22.yy))
    def max(sg3: GVec3S) = new IVec3S((math.max(x,sg3.x)).toShort, (math.max(x,sg3.y)).toShort, (math.max(x,sg3.z)).toShort)
    def max(ig3: GVec3I) = new IVec3I(math.max((x).toInt,ig3.x), math.max((x).toInt,ig3.y), math.max((x).toInt,ig3.z))
    def max(lg3: GVec3L) = new IVec3L(math.max((x).toLong,lg3.x), math.max((x).toLong,lg3.y), math.max((x).toLong,lg3.z))
    def max(fg3: GVec3F) = new IVec3F(math.max((x).toFloat,fg3.x), math.max((x).toFloat,fg3.y), math.max((x).toFloat,fg3.z))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((x).toDouble,dg3.y), math.max((x).toDouble,dg3.z))
    def max(sg33: GMat3S) = new IMat3S((math.max(x,sg33.xx)).toShort, (math.max(x,sg33.xy)).toShort, (math.max(x,sg33.xz)).toShort, (math.max(x,sg33.yx)).toShort, (math.max(x,sg33.yy)).toShort, (math.max(x,sg33.yz)).toShort, (math.max(x,sg33.zx)).toShort, (math.max(x,sg33.zy)).toShort, (math.max(x,sg33.zz)).toShort)
    def max(ig33: GMat3I) = new IMat3I(math.max((x).toInt,ig33.xx), math.max((x).toInt,ig33.xy), math.max((x).toInt,ig33.xz), math.max((x).toInt,ig33.yx), math.max((x).toInt,ig33.yy), math.max((x).toInt,ig33.yz), math.max((x).toInt,ig33.zx), math.max((x).toInt,ig33.zy), math.max((x).toInt,ig33.zz))
    def max(lg33: GMat3L) = new IMat3L(math.max((x).toLong,lg33.xx), math.max((x).toLong,lg33.xy), math.max((x).toLong,lg33.xz), math.max((x).toLong,lg33.yx), math.max((x).toLong,lg33.yy), math.max((x).toLong,lg33.yz), math.max((x).toLong,lg33.zx), math.max((x).toLong,lg33.zy), math.max((x).toLong,lg33.zz))
    def max(fg33: GMat3F) = new IMat3F(math.max((x).toFloat,fg33.xx), math.max((x).toFloat,fg33.xy), math.max((x).toFloat,fg33.xz), math.max((x).toFloat,fg33.yx), math.max((x).toFloat,fg33.yy), math.max((x).toFloat,fg33.yz), math.max((x).toFloat,fg33.zx), math.max((x).toFloat,fg33.zy), math.max((x).toFloat,fg33.zz))
    def max(dg33: GMat3D) = new IMat3D(math.max((x).toDouble,dg33.xx), math.max((x).toDouble,dg33.xy), math.max((x).toDouble,dg33.xz), math.max((x).toDouble,dg33.yx), math.max((x).toDouble,dg33.yy), math.max((x).toDouble,dg33.yz), math.max((x).toDouble,dg33.zx), math.max((x).toDouble,dg33.zy), math.max((x).toDouble,dg33.zz))
    def max(sg4: GVec4S) = new IVec4S((math.max(x,sg4.x)).toShort, (math.max(x,sg4.y)).toShort, (math.max(x,sg4.z)).toShort, (math.max(x,sg4.w)).toShort)
    def max(ig4: GVec4I) = new IVec4I(math.max((x).toInt,ig4.x), math.max((x).toInt,ig4.y), math.max((x).toInt,ig4.z), math.max((x).toInt,ig4.w))
    def max(lg4: GVec4L) = new IVec4L(math.max((x).toLong,lg4.x), math.max((x).toLong,lg4.y), math.max((x).toLong,lg4.z), math.max((x).toLong,lg4.w))
    def max(fg4: GVec4F) = new IVec4F(math.max((x).toFloat,fg4.x), math.max((x).toFloat,fg4.y), math.max((x).toFloat,fg4.z), math.max((x).toFloat,fg4.w))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((x).toDouble,dg4.y), math.max((x).toDouble,dg4.z), math.max((x).toDouble,dg4.w))
    def max(sg44: GMat4S) = new IMat4S((math.max(x,sg44.xx)).toShort, (math.max(x,sg44.xy)).toShort, (math.max(x,sg44.xz)).toShort, (math.max(x,sg44.xw)).toShort, (math.max(x,sg44.yx)).toShort, (math.max(x,sg44.yy)).toShort, (math.max(x,sg44.yz)).toShort, (math.max(x,sg44.yw)).toShort, (math.max(x,sg44.zx)).toShort, (math.max(x,sg44.zy)).toShort, (math.max(x,sg44.zz)).toShort, (math.max(x,sg44.zw)).toShort, (math.max(x,sg44.wx)).toShort, (math.max(x,sg44.wy)).toShort, (math.max(x,sg44.wz)).toShort, (math.max(x,sg44.ww)).toShort)
    def max(ig44: GMat4I) = new IMat4I(math.max((x).toInt,ig44.xx), math.max((x).toInt,ig44.xy), math.max((x).toInt,ig44.xz), math.max((x).toInt,ig44.xw), math.max((x).toInt,ig44.yx), math.max((x).toInt,ig44.yy), math.max((x).toInt,ig44.yz), math.max((x).toInt,ig44.yw), math.max((x).toInt,ig44.zx), math.max((x).toInt,ig44.zy), math.max((x).toInt,ig44.zz), math.max((x).toInt,ig44.zw), math.max((x).toInt,ig44.wx), math.max((x).toInt,ig44.wy), math.max((x).toInt,ig44.wz), math.max((x).toInt,ig44.ww))
    def max(lg44: GMat4L) = new IMat4L(math.max((x).toLong,lg44.xx), math.max((x).toLong,lg44.xy), math.max((x).toLong,lg44.xz), math.max((x).toLong,lg44.xw), math.max((x).toLong,lg44.yx), math.max((x).toLong,lg44.yy), math.max((x).toLong,lg44.yz), math.max((x).toLong,lg44.yw), math.max((x).toLong,lg44.zx), math.max((x).toLong,lg44.zy), math.max((x).toLong,lg44.zz), math.max((x).toLong,lg44.zw), math.max((x).toLong,lg44.wx), math.max((x).toLong,lg44.wy), math.max((x).toLong,lg44.wz), math.max((x).toLong,lg44.ww))
    def max(fg44: GMat4F) = new IMat4F(math.max((x).toFloat,fg44.xx), math.max((x).toFloat,fg44.xy), math.max((x).toFloat,fg44.xz), math.max((x).toFloat,fg44.xw), math.max((x).toFloat,fg44.yx), math.max((x).toFloat,fg44.yy), math.max((x).toFloat,fg44.yz), math.max((x).toFloat,fg44.yw), math.max((x).toFloat,fg44.zx), math.max((x).toFloat,fg44.zy), math.max((x).toFloat,fg44.zz), math.max((x).toFloat,fg44.zw), math.max((x).toFloat,fg44.wx), math.max((x).toFloat,fg44.wy), math.max((x).toFloat,fg44.wz), math.max((x).toFloat,fg44.ww))
    def max(dg44: GMat4D) = new IMat4D(math.max((x).toDouble,dg44.xx), math.max((x).toDouble,dg44.xy), math.max((x).toDouble,dg44.xz), math.max((x).toDouble,dg44.xw), math.max((x).toDouble,dg44.yx), math.max((x).toDouble,dg44.yy), math.max((x).toDouble,dg44.yz), math.max((x).toDouble,dg44.yw), math.max((x).toDouble,dg44.zx), math.max((x).toDouble,dg44.zy), math.max((x).toDouble,dg44.zz), math.max((x).toDouble,dg44.zw), math.max((x).toDouble,dg44.wx), math.max((x).toDouble,dg44.wy), math.max((x).toDouble,dg44.wz), math.max((x).toDouble,dg44.ww))
    def min(sg2: GVec2S) = new IVec2S((math.min(x,sg2.x)).toShort, (math.min(x,sg2.y)).toShort)
    def min(ig2: GVec2I) = new IVec2I(math.min((x).toInt,ig2.x), math.min((x).toInt,ig2.y))
    def min(lg2: GVec2L) = new IVec2L(math.min((x).toLong,lg2.x), math.min((x).toLong,lg2.y))
    def min(fg2: GVec2F) = new IVec2F(math.min((x).toFloat,fg2.x), math.min((x).toFloat,fg2.y))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((x).toDouble,dg2.y))
    def min(sg22: GMat2S) = new IMat2S((math.min(x,sg22.xx)).toShort, (math.min(x,sg22.xy)).toShort, (math.min(x,sg22.yx)).toShort, (math.min(x,sg22.yy)).toShort)
    def min(ig22: GMat2I) = new IMat2I(math.min((x).toInt,ig22.xx), math.min((x).toInt,ig22.xy), math.min((x).toInt,ig22.yx), math.min((x).toInt,ig22.yy))
    def min(lg22: GMat2L) = new IMat2L(math.min((x).toLong,lg22.xx), math.min((x).toLong,lg22.xy), math.min((x).toLong,lg22.yx), math.min((x).toLong,lg22.yy))
    def min(fg22: GMat2F) = new IMat2F(math.min((x).toFloat,fg22.xx), math.min((x).toFloat,fg22.xy), math.min((x).toFloat,fg22.yx), math.min((x).toFloat,fg22.yy))
    def min(dg22: GMat2D) = new IMat2D(math.min((x).toDouble,dg22.xx), math.min((x).toDouble,dg22.xy), math.min((x).toDouble,dg22.yx), math.min((x).toDouble,dg22.yy))
    def min(sg3: GVec3S) = new IVec3S((math.min(x,sg3.x)).toShort, (math.min(x,sg3.y)).toShort, (math.min(x,sg3.z)).toShort)
    def min(ig3: GVec3I) = new IVec3I(math.min((x).toInt,ig3.x), math.min((x).toInt,ig3.y), math.min((x).toInt,ig3.z))
    def min(lg3: GVec3L) = new IVec3L(math.min((x).toLong,lg3.x), math.min((x).toLong,lg3.y), math.min((x).toLong,lg3.z))
    def min(fg3: GVec3F) = new IVec3F(math.min((x).toFloat,fg3.x), math.min((x).toFloat,fg3.y), math.min((x).toFloat,fg3.z))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((x).toDouble,dg3.y), math.min((x).toDouble,dg3.z))
    def min(sg33: GMat3S) = new IMat3S((math.min(x,sg33.xx)).toShort, (math.min(x,sg33.xy)).toShort, (math.min(x,sg33.xz)).toShort, (math.min(x,sg33.yx)).toShort, (math.min(x,sg33.yy)).toShort, (math.min(x,sg33.yz)).toShort, (math.min(x,sg33.zx)).toShort, (math.min(x,sg33.zy)).toShort, (math.min(x,sg33.zz)).toShort)
    def min(ig33: GMat3I) = new IMat3I(math.min((x).toInt,ig33.xx), math.min((x).toInt,ig33.xy), math.min((x).toInt,ig33.xz), math.min((x).toInt,ig33.yx), math.min((x).toInt,ig33.yy), math.min((x).toInt,ig33.yz), math.min((x).toInt,ig33.zx), math.min((x).toInt,ig33.zy), math.min((x).toInt,ig33.zz))
    def min(lg33: GMat3L) = new IMat3L(math.min((x).toLong,lg33.xx), math.min((x).toLong,lg33.xy), math.min((x).toLong,lg33.xz), math.min((x).toLong,lg33.yx), math.min((x).toLong,lg33.yy), math.min((x).toLong,lg33.yz), math.min((x).toLong,lg33.zx), math.min((x).toLong,lg33.zy), math.min((x).toLong,lg33.zz))
    def min(fg33: GMat3F) = new IMat3F(math.min((x).toFloat,fg33.xx), math.min((x).toFloat,fg33.xy), math.min((x).toFloat,fg33.xz), math.min((x).toFloat,fg33.yx), math.min((x).toFloat,fg33.yy), math.min((x).toFloat,fg33.yz), math.min((x).toFloat,fg33.zx), math.min((x).toFloat,fg33.zy), math.min((x).toFloat,fg33.zz))
    def min(dg33: GMat3D) = new IMat3D(math.min((x).toDouble,dg33.xx), math.min((x).toDouble,dg33.xy), math.min((x).toDouble,dg33.xz), math.min((x).toDouble,dg33.yx), math.min((x).toDouble,dg33.yy), math.min((x).toDouble,dg33.yz), math.min((x).toDouble,dg33.zx), math.min((x).toDouble,dg33.zy), math.min((x).toDouble,dg33.zz))
    def min(sg4: GVec4S) = new IVec4S((math.min(x,sg4.x)).toShort, (math.min(x,sg4.y)).toShort, (math.min(x,sg4.z)).toShort, (math.min(x,sg4.w)).toShort)
    def min(ig4: GVec4I) = new IVec4I(math.min((x).toInt,ig4.x), math.min((x).toInt,ig4.y), math.min((x).toInt,ig4.z), math.min((x).toInt,ig4.w))
    def min(lg4: GVec4L) = new IVec4L(math.min((x).toLong,lg4.x), math.min((x).toLong,lg4.y), math.min((x).toLong,lg4.z), math.min((x).toLong,lg4.w))
    def min(fg4: GVec4F) = new IVec4F(math.min((x).toFloat,fg4.x), math.min((x).toFloat,fg4.y), math.min((x).toFloat,fg4.z), math.min((x).toFloat,fg4.w))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((x).toDouble,dg4.y), math.min((x).toDouble,dg4.z), math.min((x).toDouble,dg4.w))
    def min(sg44: GMat4S) = new IMat4S((math.min(x,sg44.xx)).toShort, (math.min(x,sg44.xy)).toShort, (math.min(x,sg44.xz)).toShort, (math.min(x,sg44.xw)).toShort, (math.min(x,sg44.yx)).toShort, (math.min(x,sg44.yy)).toShort, (math.min(x,sg44.yz)).toShort, (math.min(x,sg44.yw)).toShort, (math.min(x,sg44.zx)).toShort, (math.min(x,sg44.zy)).toShort, (math.min(x,sg44.zz)).toShort, (math.min(x,sg44.zw)).toShort, (math.min(x,sg44.wx)).toShort, (math.min(x,sg44.wy)).toShort, (math.min(x,sg44.wz)).toShort, (math.min(x,sg44.ww)).toShort)
    def min(ig44: GMat4I) = new IMat4I(math.min((x).toInt,ig44.xx), math.min((x).toInt,ig44.xy), math.min((x).toInt,ig44.xz), math.min((x).toInt,ig44.xw), math.min((x).toInt,ig44.yx), math.min((x).toInt,ig44.yy), math.min((x).toInt,ig44.yz), math.min((x).toInt,ig44.yw), math.min((x).toInt,ig44.zx), math.min((x).toInt,ig44.zy), math.min((x).toInt,ig44.zz), math.min((x).toInt,ig44.zw), math.min((x).toInt,ig44.wx), math.min((x).toInt,ig44.wy), math.min((x).toInt,ig44.wz), math.min((x).toInt,ig44.ww))
    def min(lg44: GMat4L) = new IMat4L(math.min((x).toLong,lg44.xx), math.min((x).toLong,lg44.xy), math.min((x).toLong,lg44.xz), math.min((x).toLong,lg44.xw), math.min((x).toLong,lg44.yx), math.min((x).toLong,lg44.yy), math.min((x).toLong,lg44.yz), math.min((x).toLong,lg44.yw), math.min((x).toLong,lg44.zx), math.min((x).toLong,lg44.zy), math.min((x).toLong,lg44.zz), math.min((x).toLong,lg44.zw), math.min((x).toLong,lg44.wx), math.min((x).toLong,lg44.wy), math.min((x).toLong,lg44.wz), math.min((x).toLong,lg44.ww))
    def min(fg44: GMat4F) = new IMat4F(math.min((x).toFloat,fg44.xx), math.min((x).toFloat,fg44.xy), math.min((x).toFloat,fg44.xz), math.min((x).toFloat,fg44.xw), math.min((x).toFloat,fg44.yx), math.min((x).toFloat,fg44.yy), math.min((x).toFloat,fg44.yz), math.min((x).toFloat,fg44.yw), math.min((x).toFloat,fg44.zx), math.min((x).toFloat,fg44.zy), math.min((x).toFloat,fg44.zz), math.min((x).toFloat,fg44.zw), math.min((x).toFloat,fg44.wx), math.min((x).toFloat,fg44.wy), math.min((x).toFloat,fg44.wz), math.min((x).toFloat,fg44.ww))
    def min(dg44: GMat4D) = new IMat4D(math.min((x).toDouble,dg44.xx), math.min((x).toDouble,dg44.xy), math.min((x).toDouble,dg44.xz), math.min((x).toDouble,dg44.xw), math.min((x).toDouble,dg44.yx), math.min((x).toDouble,dg44.yy), math.min((x).toDouble,dg44.yz), math.min((x).toDouble,dg44.yw), math.min((x).toDouble,dg44.zx), math.min((x).toDouble,dg44.zy), math.min((x).toDouble,dg44.zz), math.min((x).toDouble,dg44.zw), math.min((x).toDouble,dg44.wx), math.min((x).toDouble,dg44.wy), math.min((x).toDouble,dg44.wz), math.min((x).toDouble,dg44.ww))
  } // class ScalarS



  final class ScalarI(val x: Int) extends Cloneable {
    override def toString = "["+x+"]"
    override def hashCode = x
    override def equals(any: Any) = any match { case sg1: ScalarS => {x==sg1.x }; case ig1: ScalarI => {x==ig1.x }; case lg1: ScalarL => {x==lg1.x }; case fg1: ScalarF => {x==fg1.x }; case dg1: ScalarD => {x==dg1.x }; case _ => false }
    override def clone(): ScalarI = new ScalarI(x)
    def copy(x0: Int = x): ScalarI = new ScalarI(x0)
    def +(sg2: GVec2S) = new IVec2I(x + (sg2.x).toInt, x + (sg2.y).toInt)
    def +(ig2: GVec2I) = new IVec2I(x + ig2.x, x + ig2.y)
    def +(lg2: GVec2L) = new IVec2L((x).toLong + lg2.x, (x).toLong + lg2.y)
    def +(fg2: GVec2F) = new IVec2F((x).toFloat + fg2.x, (x).toFloat + fg2.y)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (x).toDouble + dg2.y)
    def +(sg22: GMat2S) = new IMat2I(x + (sg22.xx).toInt, x + (sg22.xy).toInt, x + (sg22.yx).toInt, x + (sg22.yy).toInt)
    def +(ig22: GMat2I) = new IMat2I(x + ig22.xx, x + ig22.xy, x + ig22.yx, x + ig22.yy)
    def +(lg22: GMat2L) = new IMat2L((x).toLong + lg22.xx, (x).toLong + lg22.xy, (x).toLong + lg22.yx, (x).toLong + lg22.yy)
    def +(fg22: GMat2F) = new IMat2F((x).toFloat + fg22.xx, (x).toFloat + fg22.xy, (x).toFloat + fg22.yx, (x).toFloat + fg22.yy)
    def +(dg22: GMat2D) = new IMat2D((x).toDouble + dg22.xx, (x).toDouble + dg22.xy, (x).toDouble + dg22.yx, (x).toDouble + dg22.yy)
    def +(sg3: GVec3S) = new IVec3I(x + (sg3.x).toInt, x + (sg3.y).toInt, x + (sg3.z).toInt)
    def +(ig3: GVec3I) = new IVec3I(x + ig3.x, x + ig3.y, x + ig3.z)
    def +(lg3: GVec3L) = new IVec3L((x).toLong + lg3.x, (x).toLong + lg3.y, (x).toLong + lg3.z)
    def +(fg3: GVec3F) = new IVec3F((x).toFloat + fg3.x, (x).toFloat + fg3.y, (x).toFloat + fg3.z)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (x).toDouble + dg3.y, (x).toDouble + dg3.z)
    def +(sg33: GMat3S) = new IMat3I(x + (sg33.xx).toInt, x + (sg33.xy).toInt, x + (sg33.xz).toInt, x + (sg33.yx).toInt, x + (sg33.yy).toInt, x + (sg33.yz).toInt, x + (sg33.zx).toInt, x + (sg33.zy).toInt, x + (sg33.zz).toInt)
    def +(ig33: GMat3I) = new IMat3I(x + ig33.xx, x + ig33.xy, x + ig33.xz, x + ig33.yx, x + ig33.yy, x + ig33.yz, x + ig33.zx, x + ig33.zy, x + ig33.zz)
    def +(lg33: GMat3L) = new IMat3L((x).toLong + lg33.xx, (x).toLong + lg33.xy, (x).toLong + lg33.xz, (x).toLong + lg33.yx, (x).toLong + lg33.yy, (x).toLong + lg33.yz, (x).toLong + lg33.zx, (x).toLong + lg33.zy, (x).toLong + lg33.zz)
    def +(fg33: GMat3F) = new IMat3F((x).toFloat + fg33.xx, (x).toFloat + fg33.xy, (x).toFloat + fg33.xz, (x).toFloat + fg33.yx, (x).toFloat + fg33.yy, (x).toFloat + fg33.yz, (x).toFloat + fg33.zx, (x).toFloat + fg33.zy, (x).toFloat + fg33.zz)
    def +(dg33: GMat3D) = new IMat3D((x).toDouble + dg33.xx, (x).toDouble + dg33.xy, (x).toDouble + dg33.xz, (x).toDouble + dg33.yx, (x).toDouble + dg33.yy, (x).toDouble + dg33.yz, (x).toDouble + dg33.zx, (x).toDouble + dg33.zy, (x).toDouble + dg33.zz)
    def +(sg4: GVec4S) = new IVec4I(x + (sg4.x).toInt, x + (sg4.y).toInt, x + (sg4.z).toInt, x + (sg4.w).toInt)
    def +(ig4: GVec4I) = new IVec4I(x + ig4.x, x + ig4.y, x + ig4.z, x + ig4.w)
    def +(lg4: GVec4L) = new IVec4L((x).toLong + lg4.x, (x).toLong + lg4.y, (x).toLong + lg4.z, (x).toLong + lg4.w)
    def +(fg4: GVec4F) = new IVec4F((x).toFloat + fg4.x, (x).toFloat + fg4.y, (x).toFloat + fg4.z, (x).toFloat + fg4.w)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (x).toDouble + dg4.y, (x).toDouble + dg4.z, (x).toDouble + dg4.w)
    def +(sg44: GMat4S) = new IMat4I(x + (sg44.xx).toInt, x + (sg44.xy).toInt, x + (sg44.xz).toInt, x + (sg44.xw).toInt, x + (sg44.yx).toInt, x + (sg44.yy).toInt, x + (sg44.yz).toInt, x + (sg44.yw).toInt, x + (sg44.zx).toInt, x + (sg44.zy).toInt, x + (sg44.zz).toInt, x + (sg44.zw).toInt, x + (sg44.wx).toInt, x + (sg44.wy).toInt, x + (sg44.wz).toInt, x + (sg44.ww).toInt)
    def +(ig44: GMat4I) = new IMat4I(x + ig44.xx, x + ig44.xy, x + ig44.xz, x + ig44.xw, x + ig44.yx, x + ig44.yy, x + ig44.yz, x + ig44.yw, x + ig44.zx, x + ig44.zy, x + ig44.zz, x + ig44.zw, x + ig44.wx, x + ig44.wy, x + ig44.wz, x + ig44.ww)
    def +(lg44: GMat4L) = new IMat4L((x).toLong + lg44.xx, (x).toLong + lg44.xy, (x).toLong + lg44.xz, (x).toLong + lg44.xw, (x).toLong + lg44.yx, (x).toLong + lg44.yy, (x).toLong + lg44.yz, (x).toLong + lg44.yw, (x).toLong + lg44.zx, (x).toLong + lg44.zy, (x).toLong + lg44.zz, (x).toLong + lg44.zw, (x).toLong + lg44.wx, (x).toLong + lg44.wy, (x).toLong + lg44.wz, (x).toLong + lg44.ww)
    def +(fg44: GMat4F) = new IMat4F((x).toFloat + fg44.xx, (x).toFloat + fg44.xy, (x).toFloat + fg44.xz, (x).toFloat + fg44.xw, (x).toFloat + fg44.yx, (x).toFloat + fg44.yy, (x).toFloat + fg44.yz, (x).toFloat + fg44.yw, (x).toFloat + fg44.zx, (x).toFloat + fg44.zy, (x).toFloat + fg44.zz, (x).toFloat + fg44.zw, (x).toFloat + fg44.wx, (x).toFloat + fg44.wy, (x).toFloat + fg44.wz, (x).toFloat + fg44.ww)
    def +(dg44: GMat4D) = new IMat4D((x).toDouble + dg44.xx, (x).toDouble + dg44.xy, (x).toDouble + dg44.xz, (x).toDouble + dg44.xw, (x).toDouble + dg44.yx, (x).toDouble + dg44.yy, (x).toDouble + dg44.yz, (x).toDouble + dg44.yw, (x).toDouble + dg44.zx, (x).toDouble + dg44.zy, (x).toDouble + dg44.zz, (x).toDouble + dg44.zw, (x).toDouble + dg44.wx, (x).toDouble + dg44.wy, (x).toDouble + dg44.wz, (x).toDouble + dg44.ww)
    def -(sg2: GVec2S) = new IVec2I(x - (sg2.x).toInt, x - (sg2.y).toInt)
    def -(ig2: GVec2I) = new IVec2I(x - ig2.x, x - ig2.y)
    def -(lg2: GVec2L) = new IVec2L((x).toLong - lg2.x, (x).toLong - lg2.y)
    def -(fg2: GVec2F) = new IVec2F((x).toFloat - fg2.x, (x).toFloat - fg2.y)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (x).toDouble - dg2.y)
    def -(sg22: GMat2S) = new IMat2I(x - (sg22.xx).toInt, x - (sg22.xy).toInt, x - (sg22.yx).toInt, x - (sg22.yy).toInt)
    def -(ig22: GMat2I) = new IMat2I(x - ig22.xx, x - ig22.xy, x - ig22.yx, x - ig22.yy)
    def -(lg22: GMat2L) = new IMat2L((x).toLong - lg22.xx, (x).toLong - lg22.xy, (x).toLong - lg22.yx, (x).toLong - lg22.yy)
    def -(fg22: GMat2F) = new IMat2F((x).toFloat - fg22.xx, (x).toFloat - fg22.xy, (x).toFloat - fg22.yx, (x).toFloat - fg22.yy)
    def -(dg22: GMat2D) = new IMat2D((x).toDouble - dg22.xx, (x).toDouble - dg22.xy, (x).toDouble - dg22.yx, (x).toDouble - dg22.yy)
    def -(sg3: GVec3S) = new IVec3I(x - (sg3.x).toInt, x - (sg3.y).toInt, x - (sg3.z).toInt)
    def -(ig3: GVec3I) = new IVec3I(x - ig3.x, x - ig3.y, x - ig3.z)
    def -(lg3: GVec3L) = new IVec3L((x).toLong - lg3.x, (x).toLong - lg3.y, (x).toLong - lg3.z)
    def -(fg3: GVec3F) = new IVec3F((x).toFloat - fg3.x, (x).toFloat - fg3.y, (x).toFloat - fg3.z)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (x).toDouble - dg3.y, (x).toDouble - dg3.z)
    def -(sg33: GMat3S) = new IMat3I(x - (sg33.xx).toInt, x - (sg33.xy).toInt, x - (sg33.xz).toInt, x - (sg33.yx).toInt, x - (sg33.yy).toInt, x - (sg33.yz).toInt, x - (sg33.zx).toInt, x - (sg33.zy).toInt, x - (sg33.zz).toInt)
    def -(ig33: GMat3I) = new IMat3I(x - ig33.xx, x - ig33.xy, x - ig33.xz, x - ig33.yx, x - ig33.yy, x - ig33.yz, x - ig33.zx, x - ig33.zy, x - ig33.zz)
    def -(lg33: GMat3L) = new IMat3L((x).toLong - lg33.xx, (x).toLong - lg33.xy, (x).toLong - lg33.xz, (x).toLong - lg33.yx, (x).toLong - lg33.yy, (x).toLong - lg33.yz, (x).toLong - lg33.zx, (x).toLong - lg33.zy, (x).toLong - lg33.zz)
    def -(fg33: GMat3F) = new IMat3F((x).toFloat - fg33.xx, (x).toFloat - fg33.xy, (x).toFloat - fg33.xz, (x).toFloat - fg33.yx, (x).toFloat - fg33.yy, (x).toFloat - fg33.yz, (x).toFloat - fg33.zx, (x).toFloat - fg33.zy, (x).toFloat - fg33.zz)
    def -(dg33: GMat3D) = new IMat3D((x).toDouble - dg33.xx, (x).toDouble - dg33.xy, (x).toDouble - dg33.xz, (x).toDouble - dg33.yx, (x).toDouble - dg33.yy, (x).toDouble - dg33.yz, (x).toDouble - dg33.zx, (x).toDouble - dg33.zy, (x).toDouble - dg33.zz)
    def -(sg4: GVec4S) = new IVec4I(x - (sg4.x).toInt, x - (sg4.y).toInt, x - (sg4.z).toInt, x - (sg4.w).toInt)
    def -(ig4: GVec4I) = new IVec4I(x - ig4.x, x - ig4.y, x - ig4.z, x - ig4.w)
    def -(lg4: GVec4L) = new IVec4L((x).toLong - lg4.x, (x).toLong - lg4.y, (x).toLong - lg4.z, (x).toLong - lg4.w)
    def -(fg4: GVec4F) = new IVec4F((x).toFloat - fg4.x, (x).toFloat - fg4.y, (x).toFloat - fg4.z, (x).toFloat - fg4.w)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (x).toDouble - dg4.y, (x).toDouble - dg4.z, (x).toDouble - dg4.w)
    def -(sg44: GMat4S) = new IMat4I(x - (sg44.xx).toInt, x - (sg44.xy).toInt, x - (sg44.xz).toInt, x - (sg44.xw).toInt, x - (sg44.yx).toInt, x - (sg44.yy).toInt, x - (sg44.yz).toInt, x - (sg44.yw).toInt, x - (sg44.zx).toInt, x - (sg44.zy).toInt, x - (sg44.zz).toInt, x - (sg44.zw).toInt, x - (sg44.wx).toInt, x - (sg44.wy).toInt, x - (sg44.wz).toInt, x - (sg44.ww).toInt)
    def -(ig44: GMat4I) = new IMat4I(x - ig44.xx, x - ig44.xy, x - ig44.xz, x - ig44.xw, x - ig44.yx, x - ig44.yy, x - ig44.yz, x - ig44.yw, x - ig44.zx, x - ig44.zy, x - ig44.zz, x - ig44.zw, x - ig44.wx, x - ig44.wy, x - ig44.wz, x - ig44.ww)
    def -(lg44: GMat4L) = new IMat4L((x).toLong - lg44.xx, (x).toLong - lg44.xy, (x).toLong - lg44.xz, (x).toLong - lg44.xw, (x).toLong - lg44.yx, (x).toLong - lg44.yy, (x).toLong - lg44.yz, (x).toLong - lg44.yw, (x).toLong - lg44.zx, (x).toLong - lg44.zy, (x).toLong - lg44.zz, (x).toLong - lg44.zw, (x).toLong - lg44.wx, (x).toLong - lg44.wy, (x).toLong - lg44.wz, (x).toLong - lg44.ww)
    def -(fg44: GMat4F) = new IMat4F((x).toFloat - fg44.xx, (x).toFloat - fg44.xy, (x).toFloat - fg44.xz, (x).toFloat - fg44.xw, (x).toFloat - fg44.yx, (x).toFloat - fg44.yy, (x).toFloat - fg44.yz, (x).toFloat - fg44.yw, (x).toFloat - fg44.zx, (x).toFloat - fg44.zy, (x).toFloat - fg44.zz, (x).toFloat - fg44.zw, (x).toFloat - fg44.wx, (x).toFloat - fg44.wy, (x).toFloat - fg44.wz, (x).toFloat - fg44.ww)
    def -(dg44: GMat4D) = new IMat4D((x).toDouble - dg44.xx, (x).toDouble - dg44.xy, (x).toDouble - dg44.xz, (x).toDouble - dg44.xw, (x).toDouble - dg44.yx, (x).toDouble - dg44.yy, (x).toDouble - dg44.yz, (x).toDouble - dg44.yw, (x).toDouble - dg44.zx, (x).toDouble - dg44.zy, (x).toDouble - dg44.zz, (x).toDouble - dg44.zw, (x).toDouble - dg44.wx, (x).toDouble - dg44.wy, (x).toDouble - dg44.wz, (x).toDouble - dg44.ww)
    def *(sg2: GVec2S) = new IVec2I(x * (sg2.x).toInt, x * (sg2.y).toInt)
    def *(ig2: GVec2I) = new IVec2I(x * ig2.x, x * ig2.y)
    def *(lg2: GVec2L) = new IVec2L((x).toLong * lg2.x, (x).toLong * lg2.y)
    def *(fg2: GVec2F) = new IVec2F((x).toFloat * fg2.x, (x).toFloat * fg2.y)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (x).toDouble * dg2.y)
    def *(sg22: GMat2S) = new IMat2I(x * (sg22.xx).toInt, x * (sg22.xy).toInt, x * (sg22.yx).toInt, x * (sg22.yy).toInt)
    def *(ig22: GMat2I) = new IMat2I(x * ig22.xx, x * ig22.xy, x * ig22.yx, x * ig22.yy)
    def *(lg22: GMat2L) = new IMat2L((x).toLong * lg22.xx, (x).toLong * lg22.xy, (x).toLong * lg22.yx, (x).toLong * lg22.yy)
    def *(fg22: GMat2F) = new IMat2F((x).toFloat * fg22.xx, (x).toFloat * fg22.xy, (x).toFloat * fg22.yx, (x).toFloat * fg22.yy)
    def *(dg22: GMat2D) = new IMat2D((x).toDouble * dg22.xx, (x).toDouble * dg22.xy, (x).toDouble * dg22.yx, (x).toDouble * dg22.yy)
    def *(sg3: GVec3S) = new IVec3I(x * (sg3.x).toInt, x * (sg3.y).toInt, x * (sg3.z).toInt)
    def *(ig3: GVec3I) = new IVec3I(x * ig3.x, x * ig3.y, x * ig3.z)
    def *(lg3: GVec3L) = new IVec3L((x).toLong * lg3.x, (x).toLong * lg3.y, (x).toLong * lg3.z)
    def *(fg3: GVec3F) = new IVec3F((x).toFloat * fg3.x, (x).toFloat * fg3.y, (x).toFloat * fg3.z)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (x).toDouble * dg3.y, (x).toDouble * dg3.z)
    def *(sg33: GMat3S) = new IMat3I(x * (sg33.xx).toInt, x * (sg33.xy).toInt, x * (sg33.xz).toInt, x * (sg33.yx).toInt, x * (sg33.yy).toInt, x * (sg33.yz).toInt, x * (sg33.zx).toInt, x * (sg33.zy).toInt, x * (sg33.zz).toInt)
    def *(ig33: GMat3I) = new IMat3I(x * ig33.xx, x * ig33.xy, x * ig33.xz, x * ig33.yx, x * ig33.yy, x * ig33.yz, x * ig33.zx, x * ig33.zy, x * ig33.zz)
    def *(lg33: GMat3L) = new IMat3L((x).toLong * lg33.xx, (x).toLong * lg33.xy, (x).toLong * lg33.xz, (x).toLong * lg33.yx, (x).toLong * lg33.yy, (x).toLong * lg33.yz, (x).toLong * lg33.zx, (x).toLong * lg33.zy, (x).toLong * lg33.zz)
    def *(fg33: GMat3F) = new IMat3F((x).toFloat * fg33.xx, (x).toFloat * fg33.xy, (x).toFloat * fg33.xz, (x).toFloat * fg33.yx, (x).toFloat * fg33.yy, (x).toFloat * fg33.yz, (x).toFloat * fg33.zx, (x).toFloat * fg33.zy, (x).toFloat * fg33.zz)
    def *(dg33: GMat3D) = new IMat3D((x).toDouble * dg33.xx, (x).toDouble * dg33.xy, (x).toDouble * dg33.xz, (x).toDouble * dg33.yx, (x).toDouble * dg33.yy, (x).toDouble * dg33.yz, (x).toDouble * dg33.zx, (x).toDouble * dg33.zy, (x).toDouble * dg33.zz)
    def *(sg4: GVec4S) = new IVec4I(x * (sg4.x).toInt, x * (sg4.y).toInt, x * (sg4.z).toInt, x * (sg4.w).toInt)
    def *(ig4: GVec4I) = new IVec4I(x * ig4.x, x * ig4.y, x * ig4.z, x * ig4.w)
    def *(lg4: GVec4L) = new IVec4L((x).toLong * lg4.x, (x).toLong * lg4.y, (x).toLong * lg4.z, (x).toLong * lg4.w)
    def *(fg4: GVec4F) = new IVec4F((x).toFloat * fg4.x, (x).toFloat * fg4.y, (x).toFloat * fg4.z, (x).toFloat * fg4.w)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (x).toDouble * dg4.y, (x).toDouble * dg4.z, (x).toDouble * dg4.w)
    def *(sg44: GMat4S) = new IMat4I(x * (sg44.xx).toInt, x * (sg44.xy).toInt, x * (sg44.xz).toInt, x * (sg44.xw).toInt, x * (sg44.yx).toInt, x * (sg44.yy).toInt, x * (sg44.yz).toInt, x * (sg44.yw).toInt, x * (sg44.zx).toInt, x * (sg44.zy).toInt, x * (sg44.zz).toInt, x * (sg44.zw).toInt, x * (sg44.wx).toInt, x * (sg44.wy).toInt, x * (sg44.wz).toInt, x * (sg44.ww).toInt)
    def *(ig44: GMat4I) = new IMat4I(x * ig44.xx, x * ig44.xy, x * ig44.xz, x * ig44.xw, x * ig44.yx, x * ig44.yy, x * ig44.yz, x * ig44.yw, x * ig44.zx, x * ig44.zy, x * ig44.zz, x * ig44.zw, x * ig44.wx, x * ig44.wy, x * ig44.wz, x * ig44.ww)
    def *(lg44: GMat4L) = new IMat4L((x).toLong * lg44.xx, (x).toLong * lg44.xy, (x).toLong * lg44.xz, (x).toLong * lg44.xw, (x).toLong * lg44.yx, (x).toLong * lg44.yy, (x).toLong * lg44.yz, (x).toLong * lg44.yw, (x).toLong * lg44.zx, (x).toLong * lg44.zy, (x).toLong * lg44.zz, (x).toLong * lg44.zw, (x).toLong * lg44.wx, (x).toLong * lg44.wy, (x).toLong * lg44.wz, (x).toLong * lg44.ww)
    def *(fg44: GMat4F) = new IMat4F((x).toFloat * fg44.xx, (x).toFloat * fg44.xy, (x).toFloat * fg44.xz, (x).toFloat * fg44.xw, (x).toFloat * fg44.yx, (x).toFloat * fg44.yy, (x).toFloat * fg44.yz, (x).toFloat * fg44.yw, (x).toFloat * fg44.zx, (x).toFloat * fg44.zy, (x).toFloat * fg44.zz, (x).toFloat * fg44.zw, (x).toFloat * fg44.wx, (x).toFloat * fg44.wy, (x).toFloat * fg44.wz, (x).toFloat * fg44.ww)
    def *(dg44: GMat4D) = new IMat4D((x).toDouble * dg44.xx, (x).toDouble * dg44.xy, (x).toDouble * dg44.xz, (x).toDouble * dg44.xw, (x).toDouble * dg44.yx, (x).toDouble * dg44.yy, (x).toDouble * dg44.yz, (x).toDouble * dg44.yw, (x).toDouble * dg44.zx, (x).toDouble * dg44.zy, (x).toDouble * dg44.zz, (x).toDouble * dg44.zw, (x).toDouble * dg44.wx, (x).toDouble * dg44.wy, (x).toDouble * dg44.wz, (x).toDouble * dg44.ww)
    def max(sg2: GVec2S) = new IVec2I(math.max(x,(sg2.x).toInt), math.max(x,(sg2.y).toInt))
    def max(ig2: GVec2I) = new IVec2I(math.max(x,ig2.x), math.max(x,ig2.y))
    def max(lg2: GVec2L) = new IVec2L(math.max((x).toLong,lg2.x), math.max((x).toLong,lg2.y))
    def max(fg2: GVec2F) = new IVec2F(math.max((x).toFloat,fg2.x), math.max((x).toFloat,fg2.y))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((x).toDouble,dg2.y))
    def max(sg22: GMat2S) = new IMat2I(math.max(x,(sg22.xx).toInt), math.max(x,(sg22.xy).toInt), math.max(x,(sg22.yx).toInt), math.max(x,(sg22.yy).toInt))
    def max(ig22: GMat2I) = new IMat2I(math.max(x,ig22.xx), math.max(x,ig22.xy), math.max(x,ig22.yx), math.max(x,ig22.yy))
    def max(lg22: GMat2L) = new IMat2L(math.max((x).toLong,lg22.xx), math.max((x).toLong,lg22.xy), math.max((x).toLong,lg22.yx), math.max((x).toLong,lg22.yy))
    def max(fg22: GMat2F) = new IMat2F(math.max((x).toFloat,fg22.xx), math.max((x).toFloat,fg22.xy), math.max((x).toFloat,fg22.yx), math.max((x).toFloat,fg22.yy))
    def max(dg22: GMat2D) = new IMat2D(math.max((x).toDouble,dg22.xx), math.max((x).toDouble,dg22.xy), math.max((x).toDouble,dg22.yx), math.max((x).toDouble,dg22.yy))
    def max(sg3: GVec3S) = new IVec3I(math.max(x,(sg3.x).toInt), math.max(x,(sg3.y).toInt), math.max(x,(sg3.z).toInt))
    def max(ig3: GVec3I) = new IVec3I(math.max(x,ig3.x), math.max(x,ig3.y), math.max(x,ig3.z))
    def max(lg3: GVec3L) = new IVec3L(math.max((x).toLong,lg3.x), math.max((x).toLong,lg3.y), math.max((x).toLong,lg3.z))
    def max(fg3: GVec3F) = new IVec3F(math.max((x).toFloat,fg3.x), math.max((x).toFloat,fg3.y), math.max((x).toFloat,fg3.z))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((x).toDouble,dg3.y), math.max((x).toDouble,dg3.z))
    def max(sg33: GMat3S) = new IMat3I(math.max(x,(sg33.xx).toInt), math.max(x,(sg33.xy).toInt), math.max(x,(sg33.xz).toInt), math.max(x,(sg33.yx).toInt), math.max(x,(sg33.yy).toInt), math.max(x,(sg33.yz).toInt), math.max(x,(sg33.zx).toInt), math.max(x,(sg33.zy).toInt), math.max(x,(sg33.zz).toInt))
    def max(ig33: GMat3I) = new IMat3I(math.max(x,ig33.xx), math.max(x,ig33.xy), math.max(x,ig33.xz), math.max(x,ig33.yx), math.max(x,ig33.yy), math.max(x,ig33.yz), math.max(x,ig33.zx), math.max(x,ig33.zy), math.max(x,ig33.zz))
    def max(lg33: GMat3L) = new IMat3L(math.max((x).toLong,lg33.xx), math.max((x).toLong,lg33.xy), math.max((x).toLong,lg33.xz), math.max((x).toLong,lg33.yx), math.max((x).toLong,lg33.yy), math.max((x).toLong,lg33.yz), math.max((x).toLong,lg33.zx), math.max((x).toLong,lg33.zy), math.max((x).toLong,lg33.zz))
    def max(fg33: GMat3F) = new IMat3F(math.max((x).toFloat,fg33.xx), math.max((x).toFloat,fg33.xy), math.max((x).toFloat,fg33.xz), math.max((x).toFloat,fg33.yx), math.max((x).toFloat,fg33.yy), math.max((x).toFloat,fg33.yz), math.max((x).toFloat,fg33.zx), math.max((x).toFloat,fg33.zy), math.max((x).toFloat,fg33.zz))
    def max(dg33: GMat3D) = new IMat3D(math.max((x).toDouble,dg33.xx), math.max((x).toDouble,dg33.xy), math.max((x).toDouble,dg33.xz), math.max((x).toDouble,dg33.yx), math.max((x).toDouble,dg33.yy), math.max((x).toDouble,dg33.yz), math.max((x).toDouble,dg33.zx), math.max((x).toDouble,dg33.zy), math.max((x).toDouble,dg33.zz))
    def max(sg4: GVec4S) = new IVec4I(math.max(x,(sg4.x).toInt), math.max(x,(sg4.y).toInt), math.max(x,(sg4.z).toInt), math.max(x,(sg4.w).toInt))
    def max(ig4: GVec4I) = new IVec4I(math.max(x,ig4.x), math.max(x,ig4.y), math.max(x,ig4.z), math.max(x,ig4.w))
    def max(lg4: GVec4L) = new IVec4L(math.max((x).toLong,lg4.x), math.max((x).toLong,lg4.y), math.max((x).toLong,lg4.z), math.max((x).toLong,lg4.w))
    def max(fg4: GVec4F) = new IVec4F(math.max((x).toFloat,fg4.x), math.max((x).toFloat,fg4.y), math.max((x).toFloat,fg4.z), math.max((x).toFloat,fg4.w))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((x).toDouble,dg4.y), math.max((x).toDouble,dg4.z), math.max((x).toDouble,dg4.w))
    def max(sg44: GMat4S) = new IMat4I(math.max(x,(sg44.xx).toInt), math.max(x,(sg44.xy).toInt), math.max(x,(sg44.xz).toInt), math.max(x,(sg44.xw).toInt), math.max(x,(sg44.yx).toInt), math.max(x,(sg44.yy).toInt), math.max(x,(sg44.yz).toInt), math.max(x,(sg44.yw).toInt), math.max(x,(sg44.zx).toInt), math.max(x,(sg44.zy).toInt), math.max(x,(sg44.zz).toInt), math.max(x,(sg44.zw).toInt), math.max(x,(sg44.wx).toInt), math.max(x,(sg44.wy).toInt), math.max(x,(sg44.wz).toInt), math.max(x,(sg44.ww).toInt))
    def max(ig44: GMat4I) = new IMat4I(math.max(x,ig44.xx), math.max(x,ig44.xy), math.max(x,ig44.xz), math.max(x,ig44.xw), math.max(x,ig44.yx), math.max(x,ig44.yy), math.max(x,ig44.yz), math.max(x,ig44.yw), math.max(x,ig44.zx), math.max(x,ig44.zy), math.max(x,ig44.zz), math.max(x,ig44.zw), math.max(x,ig44.wx), math.max(x,ig44.wy), math.max(x,ig44.wz), math.max(x,ig44.ww))
    def max(lg44: GMat4L) = new IMat4L(math.max((x).toLong,lg44.xx), math.max((x).toLong,lg44.xy), math.max((x).toLong,lg44.xz), math.max((x).toLong,lg44.xw), math.max((x).toLong,lg44.yx), math.max((x).toLong,lg44.yy), math.max((x).toLong,lg44.yz), math.max((x).toLong,lg44.yw), math.max((x).toLong,lg44.zx), math.max((x).toLong,lg44.zy), math.max((x).toLong,lg44.zz), math.max((x).toLong,lg44.zw), math.max((x).toLong,lg44.wx), math.max((x).toLong,lg44.wy), math.max((x).toLong,lg44.wz), math.max((x).toLong,lg44.ww))
    def max(fg44: GMat4F) = new IMat4F(math.max((x).toFloat,fg44.xx), math.max((x).toFloat,fg44.xy), math.max((x).toFloat,fg44.xz), math.max((x).toFloat,fg44.xw), math.max((x).toFloat,fg44.yx), math.max((x).toFloat,fg44.yy), math.max((x).toFloat,fg44.yz), math.max((x).toFloat,fg44.yw), math.max((x).toFloat,fg44.zx), math.max((x).toFloat,fg44.zy), math.max((x).toFloat,fg44.zz), math.max((x).toFloat,fg44.zw), math.max((x).toFloat,fg44.wx), math.max((x).toFloat,fg44.wy), math.max((x).toFloat,fg44.wz), math.max((x).toFloat,fg44.ww))
    def max(dg44: GMat4D) = new IMat4D(math.max((x).toDouble,dg44.xx), math.max((x).toDouble,dg44.xy), math.max((x).toDouble,dg44.xz), math.max((x).toDouble,dg44.xw), math.max((x).toDouble,dg44.yx), math.max((x).toDouble,dg44.yy), math.max((x).toDouble,dg44.yz), math.max((x).toDouble,dg44.yw), math.max((x).toDouble,dg44.zx), math.max((x).toDouble,dg44.zy), math.max((x).toDouble,dg44.zz), math.max((x).toDouble,dg44.zw), math.max((x).toDouble,dg44.wx), math.max((x).toDouble,dg44.wy), math.max((x).toDouble,dg44.wz), math.max((x).toDouble,dg44.ww))
    def min(sg2: GVec2S) = new IVec2I(math.min(x,(sg2.x).toInt), math.min(x,(sg2.y).toInt))
    def min(ig2: GVec2I) = new IVec2I(math.min(x,ig2.x), math.min(x,ig2.y))
    def min(lg2: GVec2L) = new IVec2L(math.min((x).toLong,lg2.x), math.min((x).toLong,lg2.y))
    def min(fg2: GVec2F) = new IVec2F(math.min((x).toFloat,fg2.x), math.min((x).toFloat,fg2.y))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((x).toDouble,dg2.y))
    def min(sg22: GMat2S) = new IMat2I(math.min(x,(sg22.xx).toInt), math.min(x,(sg22.xy).toInt), math.min(x,(sg22.yx).toInt), math.min(x,(sg22.yy).toInt))
    def min(ig22: GMat2I) = new IMat2I(math.min(x,ig22.xx), math.min(x,ig22.xy), math.min(x,ig22.yx), math.min(x,ig22.yy))
    def min(lg22: GMat2L) = new IMat2L(math.min((x).toLong,lg22.xx), math.min((x).toLong,lg22.xy), math.min((x).toLong,lg22.yx), math.min((x).toLong,lg22.yy))
    def min(fg22: GMat2F) = new IMat2F(math.min((x).toFloat,fg22.xx), math.min((x).toFloat,fg22.xy), math.min((x).toFloat,fg22.yx), math.min((x).toFloat,fg22.yy))
    def min(dg22: GMat2D) = new IMat2D(math.min((x).toDouble,dg22.xx), math.min((x).toDouble,dg22.xy), math.min((x).toDouble,dg22.yx), math.min((x).toDouble,dg22.yy))
    def min(sg3: GVec3S) = new IVec3I(math.min(x,(sg3.x).toInt), math.min(x,(sg3.y).toInt), math.min(x,(sg3.z).toInt))
    def min(ig3: GVec3I) = new IVec3I(math.min(x,ig3.x), math.min(x,ig3.y), math.min(x,ig3.z))
    def min(lg3: GVec3L) = new IVec3L(math.min((x).toLong,lg3.x), math.min((x).toLong,lg3.y), math.min((x).toLong,lg3.z))
    def min(fg3: GVec3F) = new IVec3F(math.min((x).toFloat,fg3.x), math.min((x).toFloat,fg3.y), math.min((x).toFloat,fg3.z))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((x).toDouble,dg3.y), math.min((x).toDouble,dg3.z))
    def min(sg33: GMat3S) = new IMat3I(math.min(x,(sg33.xx).toInt), math.min(x,(sg33.xy).toInt), math.min(x,(sg33.xz).toInt), math.min(x,(sg33.yx).toInt), math.min(x,(sg33.yy).toInt), math.min(x,(sg33.yz).toInt), math.min(x,(sg33.zx).toInt), math.min(x,(sg33.zy).toInt), math.min(x,(sg33.zz).toInt))
    def min(ig33: GMat3I) = new IMat3I(math.min(x,ig33.xx), math.min(x,ig33.xy), math.min(x,ig33.xz), math.min(x,ig33.yx), math.min(x,ig33.yy), math.min(x,ig33.yz), math.min(x,ig33.zx), math.min(x,ig33.zy), math.min(x,ig33.zz))
    def min(lg33: GMat3L) = new IMat3L(math.min((x).toLong,lg33.xx), math.min((x).toLong,lg33.xy), math.min((x).toLong,lg33.xz), math.min((x).toLong,lg33.yx), math.min((x).toLong,lg33.yy), math.min((x).toLong,lg33.yz), math.min((x).toLong,lg33.zx), math.min((x).toLong,lg33.zy), math.min((x).toLong,lg33.zz))
    def min(fg33: GMat3F) = new IMat3F(math.min((x).toFloat,fg33.xx), math.min((x).toFloat,fg33.xy), math.min((x).toFloat,fg33.xz), math.min((x).toFloat,fg33.yx), math.min((x).toFloat,fg33.yy), math.min((x).toFloat,fg33.yz), math.min((x).toFloat,fg33.zx), math.min((x).toFloat,fg33.zy), math.min((x).toFloat,fg33.zz))
    def min(dg33: GMat3D) = new IMat3D(math.min((x).toDouble,dg33.xx), math.min((x).toDouble,dg33.xy), math.min((x).toDouble,dg33.xz), math.min((x).toDouble,dg33.yx), math.min((x).toDouble,dg33.yy), math.min((x).toDouble,dg33.yz), math.min((x).toDouble,dg33.zx), math.min((x).toDouble,dg33.zy), math.min((x).toDouble,dg33.zz))
    def min(sg4: GVec4S) = new IVec4I(math.min(x,(sg4.x).toInt), math.min(x,(sg4.y).toInt), math.min(x,(sg4.z).toInt), math.min(x,(sg4.w).toInt))
    def min(ig4: GVec4I) = new IVec4I(math.min(x,ig4.x), math.min(x,ig4.y), math.min(x,ig4.z), math.min(x,ig4.w))
    def min(lg4: GVec4L) = new IVec4L(math.min((x).toLong,lg4.x), math.min((x).toLong,lg4.y), math.min((x).toLong,lg4.z), math.min((x).toLong,lg4.w))
    def min(fg4: GVec4F) = new IVec4F(math.min((x).toFloat,fg4.x), math.min((x).toFloat,fg4.y), math.min((x).toFloat,fg4.z), math.min((x).toFloat,fg4.w))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((x).toDouble,dg4.y), math.min((x).toDouble,dg4.z), math.min((x).toDouble,dg4.w))
    def min(sg44: GMat4S) = new IMat4I(math.min(x,(sg44.xx).toInt), math.min(x,(sg44.xy).toInt), math.min(x,(sg44.xz).toInt), math.min(x,(sg44.xw).toInt), math.min(x,(sg44.yx).toInt), math.min(x,(sg44.yy).toInt), math.min(x,(sg44.yz).toInt), math.min(x,(sg44.yw).toInt), math.min(x,(sg44.zx).toInt), math.min(x,(sg44.zy).toInt), math.min(x,(sg44.zz).toInt), math.min(x,(sg44.zw).toInt), math.min(x,(sg44.wx).toInt), math.min(x,(sg44.wy).toInt), math.min(x,(sg44.wz).toInt), math.min(x,(sg44.ww).toInt))
    def min(ig44: GMat4I) = new IMat4I(math.min(x,ig44.xx), math.min(x,ig44.xy), math.min(x,ig44.xz), math.min(x,ig44.xw), math.min(x,ig44.yx), math.min(x,ig44.yy), math.min(x,ig44.yz), math.min(x,ig44.yw), math.min(x,ig44.zx), math.min(x,ig44.zy), math.min(x,ig44.zz), math.min(x,ig44.zw), math.min(x,ig44.wx), math.min(x,ig44.wy), math.min(x,ig44.wz), math.min(x,ig44.ww))
    def min(lg44: GMat4L) = new IMat4L(math.min((x).toLong,lg44.xx), math.min((x).toLong,lg44.xy), math.min((x).toLong,lg44.xz), math.min((x).toLong,lg44.xw), math.min((x).toLong,lg44.yx), math.min((x).toLong,lg44.yy), math.min((x).toLong,lg44.yz), math.min((x).toLong,lg44.yw), math.min((x).toLong,lg44.zx), math.min((x).toLong,lg44.zy), math.min((x).toLong,lg44.zz), math.min((x).toLong,lg44.zw), math.min((x).toLong,lg44.wx), math.min((x).toLong,lg44.wy), math.min((x).toLong,lg44.wz), math.min((x).toLong,lg44.ww))
    def min(fg44: GMat4F) = new IMat4F(math.min((x).toFloat,fg44.xx), math.min((x).toFloat,fg44.xy), math.min((x).toFloat,fg44.xz), math.min((x).toFloat,fg44.xw), math.min((x).toFloat,fg44.yx), math.min((x).toFloat,fg44.yy), math.min((x).toFloat,fg44.yz), math.min((x).toFloat,fg44.yw), math.min((x).toFloat,fg44.zx), math.min((x).toFloat,fg44.zy), math.min((x).toFloat,fg44.zz), math.min((x).toFloat,fg44.zw), math.min((x).toFloat,fg44.wx), math.min((x).toFloat,fg44.wy), math.min((x).toFloat,fg44.wz), math.min((x).toFloat,fg44.ww))
    def min(dg44: GMat4D) = new IMat4D(math.min((x).toDouble,dg44.xx), math.min((x).toDouble,dg44.xy), math.min((x).toDouble,dg44.xz), math.min((x).toDouble,dg44.xw), math.min((x).toDouble,dg44.yx), math.min((x).toDouble,dg44.yy), math.min((x).toDouble,dg44.yz), math.min((x).toDouble,dg44.yw), math.min((x).toDouble,dg44.zx), math.min((x).toDouble,dg44.zy), math.min((x).toDouble,dg44.zz), math.min((x).toDouble,dg44.zw), math.min((x).toDouble,dg44.wx), math.min((x).toDouble,dg44.wy), math.min((x).toDouble,dg44.wz), math.min((x).toDouble,dg44.ww))
  } // class ScalarI



  final class ScalarL(val x: Long) extends Cloneable {
    override def toString = "["+x+"]"
    override def hashCode = x.##
    override def equals(any: Any) = any match { case sg1: ScalarS => {x==sg1.x }; case ig1: ScalarI => {x==ig1.x }; case lg1: ScalarL => {x==lg1.x }; case fg1: ScalarF => {x==fg1.x }; case dg1: ScalarD => {x==dg1.x }; case _ => false }
    override def clone(): ScalarL = new ScalarL(x)
    def copy(x0: Long = x): ScalarL = new ScalarL(x0)
    def +(sg2: GVec2S) = new IVec2L(x + (sg2.x).toLong, x + (sg2.y).toLong)
    def +(ig2: GVec2I) = new IVec2L(x + (ig2.x).toLong, x + (ig2.y).toLong)
    def +(lg2: GVec2L) = new IVec2L(x + lg2.x, x + lg2.y)
    def +(fg2: GVec2F) = new IVec2D((x).toDouble + (fg2.x).toDouble, (x).toDouble + (fg2.y).toDouble)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (x).toDouble + dg2.y)
    def +(sg22: GMat2S) = new IMat2L(x + (sg22.xx).toLong, x + (sg22.xy).toLong, x + (sg22.yx).toLong, x + (sg22.yy).toLong)
    def +(ig22: GMat2I) = new IMat2L(x + (ig22.xx).toLong, x + (ig22.xy).toLong, x + (ig22.yx).toLong, x + (ig22.yy).toLong)
    def +(lg22: GMat2L) = new IMat2L(x + lg22.xx, x + lg22.xy, x + lg22.yx, x + lg22.yy)
    def +(fg22: GMat2F) = new IMat2D((x).toDouble + (fg22.xx).toDouble, (x).toDouble + (fg22.xy).toDouble, (x).toDouble + (fg22.yx).toDouble, (x).toDouble + (fg22.yy).toDouble)
    def +(dg22: GMat2D) = new IMat2D((x).toDouble + dg22.xx, (x).toDouble + dg22.xy, (x).toDouble + dg22.yx, (x).toDouble + dg22.yy)
    def +(sg3: GVec3S) = new IVec3L(x + (sg3.x).toLong, x + (sg3.y).toLong, x + (sg3.z).toLong)
    def +(ig3: GVec3I) = new IVec3L(x + (ig3.x).toLong, x + (ig3.y).toLong, x + (ig3.z).toLong)
    def +(lg3: GVec3L) = new IVec3L(x + lg3.x, x + lg3.y, x + lg3.z)
    def +(fg3: GVec3F) = new IVec3D((x).toDouble + (fg3.x).toDouble, (x).toDouble + (fg3.y).toDouble, (x).toDouble + (fg3.z).toDouble)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (x).toDouble + dg3.y, (x).toDouble + dg3.z)
    def +(sg33: GMat3S) = new IMat3L(x + (sg33.xx).toLong, x + (sg33.xy).toLong, x + (sg33.xz).toLong, x + (sg33.yx).toLong, x + (sg33.yy).toLong, x + (sg33.yz).toLong, x + (sg33.zx).toLong, x + (sg33.zy).toLong, x + (sg33.zz).toLong)
    def +(ig33: GMat3I) = new IMat3L(x + (ig33.xx).toLong, x + (ig33.xy).toLong, x + (ig33.xz).toLong, x + (ig33.yx).toLong, x + (ig33.yy).toLong, x + (ig33.yz).toLong, x + (ig33.zx).toLong, x + (ig33.zy).toLong, x + (ig33.zz).toLong)
    def +(lg33: GMat3L) = new IMat3L(x + lg33.xx, x + lg33.xy, x + lg33.xz, x + lg33.yx, x + lg33.yy, x + lg33.yz, x + lg33.zx, x + lg33.zy, x + lg33.zz)
    def +(fg33: GMat3F) = new IMat3D((x).toDouble + (fg33.xx).toDouble, (x).toDouble + (fg33.xy).toDouble, (x).toDouble + (fg33.xz).toDouble, (x).toDouble + (fg33.yx).toDouble, (x).toDouble + (fg33.yy).toDouble, (x).toDouble + (fg33.yz).toDouble, (x).toDouble + (fg33.zx).toDouble, (x).toDouble + (fg33.zy).toDouble, (x).toDouble + (fg33.zz).toDouble)
    def +(dg33: GMat3D) = new IMat3D((x).toDouble + dg33.xx, (x).toDouble + dg33.xy, (x).toDouble + dg33.xz, (x).toDouble + dg33.yx, (x).toDouble + dg33.yy, (x).toDouble + dg33.yz, (x).toDouble + dg33.zx, (x).toDouble + dg33.zy, (x).toDouble + dg33.zz)
    def +(sg4: GVec4S) = new IVec4L(x + (sg4.x).toLong, x + (sg4.y).toLong, x + (sg4.z).toLong, x + (sg4.w).toLong)
    def +(ig4: GVec4I) = new IVec4L(x + (ig4.x).toLong, x + (ig4.y).toLong, x + (ig4.z).toLong, x + (ig4.w).toLong)
    def +(lg4: GVec4L) = new IVec4L(x + lg4.x, x + lg4.y, x + lg4.z, x + lg4.w)
    def +(fg4: GVec4F) = new IVec4D((x).toDouble + (fg4.x).toDouble, (x).toDouble + (fg4.y).toDouble, (x).toDouble + (fg4.z).toDouble, (x).toDouble + (fg4.w).toDouble)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (x).toDouble + dg4.y, (x).toDouble + dg4.z, (x).toDouble + dg4.w)
    def +(sg44: GMat4S) = new IMat4L(x + (sg44.xx).toLong, x + (sg44.xy).toLong, x + (sg44.xz).toLong, x + (sg44.xw).toLong, x + (sg44.yx).toLong, x + (sg44.yy).toLong, x + (sg44.yz).toLong, x + (sg44.yw).toLong, x + (sg44.zx).toLong, x + (sg44.zy).toLong, x + (sg44.zz).toLong, x + (sg44.zw).toLong, x + (sg44.wx).toLong, x + (sg44.wy).toLong, x + (sg44.wz).toLong, x + (sg44.ww).toLong)
    def +(ig44: GMat4I) = new IMat4L(x + (ig44.xx).toLong, x + (ig44.xy).toLong, x + (ig44.xz).toLong, x + (ig44.xw).toLong, x + (ig44.yx).toLong, x + (ig44.yy).toLong, x + (ig44.yz).toLong, x + (ig44.yw).toLong, x + (ig44.zx).toLong, x + (ig44.zy).toLong, x + (ig44.zz).toLong, x + (ig44.zw).toLong, x + (ig44.wx).toLong, x + (ig44.wy).toLong, x + (ig44.wz).toLong, x + (ig44.ww).toLong)
    def +(lg44: GMat4L) = new IMat4L(x + lg44.xx, x + lg44.xy, x + lg44.xz, x + lg44.xw, x + lg44.yx, x + lg44.yy, x + lg44.yz, x + lg44.yw, x + lg44.zx, x + lg44.zy, x + lg44.zz, x + lg44.zw, x + lg44.wx, x + lg44.wy, x + lg44.wz, x + lg44.ww)
    def +(fg44: GMat4F) = new IMat4D((x).toDouble + (fg44.xx).toDouble, (x).toDouble + (fg44.xy).toDouble, (x).toDouble + (fg44.xz).toDouble, (x).toDouble + (fg44.xw).toDouble, (x).toDouble + (fg44.yx).toDouble, (x).toDouble + (fg44.yy).toDouble, (x).toDouble + (fg44.yz).toDouble, (x).toDouble + (fg44.yw).toDouble, (x).toDouble + (fg44.zx).toDouble, (x).toDouble + (fg44.zy).toDouble, (x).toDouble + (fg44.zz).toDouble, (x).toDouble + (fg44.zw).toDouble, (x).toDouble + (fg44.wx).toDouble, (x).toDouble + (fg44.wy).toDouble, (x).toDouble + (fg44.wz).toDouble, (x).toDouble + (fg44.ww).toDouble)
    def +(dg44: GMat4D) = new IMat4D((x).toDouble + dg44.xx, (x).toDouble + dg44.xy, (x).toDouble + dg44.xz, (x).toDouble + dg44.xw, (x).toDouble + dg44.yx, (x).toDouble + dg44.yy, (x).toDouble + dg44.yz, (x).toDouble + dg44.yw, (x).toDouble + dg44.zx, (x).toDouble + dg44.zy, (x).toDouble + dg44.zz, (x).toDouble + dg44.zw, (x).toDouble + dg44.wx, (x).toDouble + dg44.wy, (x).toDouble + dg44.wz, (x).toDouble + dg44.ww)
    def -(sg2: GVec2S) = new IVec2L(x - (sg2.x).toLong, x - (sg2.y).toLong)
    def -(ig2: GVec2I) = new IVec2L(x - (ig2.x).toLong, x - (ig2.y).toLong)
    def -(lg2: GVec2L) = new IVec2L(x - lg2.x, x - lg2.y)
    def -(fg2: GVec2F) = new IVec2D((x).toDouble - (fg2.x).toDouble, (x).toDouble - (fg2.y).toDouble)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (x).toDouble - dg2.y)
    def -(sg22: GMat2S) = new IMat2L(x - (sg22.xx).toLong, x - (sg22.xy).toLong, x - (sg22.yx).toLong, x - (sg22.yy).toLong)
    def -(ig22: GMat2I) = new IMat2L(x - (ig22.xx).toLong, x - (ig22.xy).toLong, x - (ig22.yx).toLong, x - (ig22.yy).toLong)
    def -(lg22: GMat2L) = new IMat2L(x - lg22.xx, x - lg22.xy, x - lg22.yx, x - lg22.yy)
    def -(fg22: GMat2F) = new IMat2D((x).toDouble - (fg22.xx).toDouble, (x).toDouble - (fg22.xy).toDouble, (x).toDouble - (fg22.yx).toDouble, (x).toDouble - (fg22.yy).toDouble)
    def -(dg22: GMat2D) = new IMat2D((x).toDouble - dg22.xx, (x).toDouble - dg22.xy, (x).toDouble - dg22.yx, (x).toDouble - dg22.yy)
    def -(sg3: GVec3S) = new IVec3L(x - (sg3.x).toLong, x - (sg3.y).toLong, x - (sg3.z).toLong)
    def -(ig3: GVec3I) = new IVec3L(x - (ig3.x).toLong, x - (ig3.y).toLong, x - (ig3.z).toLong)
    def -(lg3: GVec3L) = new IVec3L(x - lg3.x, x - lg3.y, x - lg3.z)
    def -(fg3: GVec3F) = new IVec3D((x).toDouble - (fg3.x).toDouble, (x).toDouble - (fg3.y).toDouble, (x).toDouble - (fg3.z).toDouble)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (x).toDouble - dg3.y, (x).toDouble - dg3.z)
    def -(sg33: GMat3S) = new IMat3L(x - (sg33.xx).toLong, x - (sg33.xy).toLong, x - (sg33.xz).toLong, x - (sg33.yx).toLong, x - (sg33.yy).toLong, x - (sg33.yz).toLong, x - (sg33.zx).toLong, x - (sg33.zy).toLong, x - (sg33.zz).toLong)
    def -(ig33: GMat3I) = new IMat3L(x - (ig33.xx).toLong, x - (ig33.xy).toLong, x - (ig33.xz).toLong, x - (ig33.yx).toLong, x - (ig33.yy).toLong, x - (ig33.yz).toLong, x - (ig33.zx).toLong, x - (ig33.zy).toLong, x - (ig33.zz).toLong)
    def -(lg33: GMat3L) = new IMat3L(x - lg33.xx, x - lg33.xy, x - lg33.xz, x - lg33.yx, x - lg33.yy, x - lg33.yz, x - lg33.zx, x - lg33.zy, x - lg33.zz)
    def -(fg33: GMat3F) = new IMat3D((x).toDouble - (fg33.xx).toDouble, (x).toDouble - (fg33.xy).toDouble, (x).toDouble - (fg33.xz).toDouble, (x).toDouble - (fg33.yx).toDouble, (x).toDouble - (fg33.yy).toDouble, (x).toDouble - (fg33.yz).toDouble, (x).toDouble - (fg33.zx).toDouble, (x).toDouble - (fg33.zy).toDouble, (x).toDouble - (fg33.zz).toDouble)
    def -(dg33: GMat3D) = new IMat3D((x).toDouble - dg33.xx, (x).toDouble - dg33.xy, (x).toDouble - dg33.xz, (x).toDouble - dg33.yx, (x).toDouble - dg33.yy, (x).toDouble - dg33.yz, (x).toDouble - dg33.zx, (x).toDouble - dg33.zy, (x).toDouble - dg33.zz)
    def -(sg4: GVec4S) = new IVec4L(x - (sg4.x).toLong, x - (sg4.y).toLong, x - (sg4.z).toLong, x - (sg4.w).toLong)
    def -(ig4: GVec4I) = new IVec4L(x - (ig4.x).toLong, x - (ig4.y).toLong, x - (ig4.z).toLong, x - (ig4.w).toLong)
    def -(lg4: GVec4L) = new IVec4L(x - lg4.x, x - lg4.y, x - lg4.z, x - lg4.w)
    def -(fg4: GVec4F) = new IVec4D((x).toDouble - (fg4.x).toDouble, (x).toDouble - (fg4.y).toDouble, (x).toDouble - (fg4.z).toDouble, (x).toDouble - (fg4.w).toDouble)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (x).toDouble - dg4.y, (x).toDouble - dg4.z, (x).toDouble - dg4.w)
    def -(sg44: GMat4S) = new IMat4L(x - (sg44.xx).toLong, x - (sg44.xy).toLong, x - (sg44.xz).toLong, x - (sg44.xw).toLong, x - (sg44.yx).toLong, x - (sg44.yy).toLong, x - (sg44.yz).toLong, x - (sg44.yw).toLong, x - (sg44.zx).toLong, x - (sg44.zy).toLong, x - (sg44.zz).toLong, x - (sg44.zw).toLong, x - (sg44.wx).toLong, x - (sg44.wy).toLong, x - (sg44.wz).toLong, x - (sg44.ww).toLong)
    def -(ig44: GMat4I) = new IMat4L(x - (ig44.xx).toLong, x - (ig44.xy).toLong, x - (ig44.xz).toLong, x - (ig44.xw).toLong, x - (ig44.yx).toLong, x - (ig44.yy).toLong, x - (ig44.yz).toLong, x - (ig44.yw).toLong, x - (ig44.zx).toLong, x - (ig44.zy).toLong, x - (ig44.zz).toLong, x - (ig44.zw).toLong, x - (ig44.wx).toLong, x - (ig44.wy).toLong, x - (ig44.wz).toLong, x - (ig44.ww).toLong)
    def -(lg44: GMat4L) = new IMat4L(x - lg44.xx, x - lg44.xy, x - lg44.xz, x - lg44.xw, x - lg44.yx, x - lg44.yy, x - lg44.yz, x - lg44.yw, x - lg44.zx, x - lg44.zy, x - lg44.zz, x - lg44.zw, x - lg44.wx, x - lg44.wy, x - lg44.wz, x - lg44.ww)
    def -(fg44: GMat4F) = new IMat4D((x).toDouble - (fg44.xx).toDouble, (x).toDouble - (fg44.xy).toDouble, (x).toDouble - (fg44.xz).toDouble, (x).toDouble - (fg44.xw).toDouble, (x).toDouble - (fg44.yx).toDouble, (x).toDouble - (fg44.yy).toDouble, (x).toDouble - (fg44.yz).toDouble, (x).toDouble - (fg44.yw).toDouble, (x).toDouble - (fg44.zx).toDouble, (x).toDouble - (fg44.zy).toDouble, (x).toDouble - (fg44.zz).toDouble, (x).toDouble - (fg44.zw).toDouble, (x).toDouble - (fg44.wx).toDouble, (x).toDouble - (fg44.wy).toDouble, (x).toDouble - (fg44.wz).toDouble, (x).toDouble - (fg44.ww).toDouble)
    def -(dg44: GMat4D) = new IMat4D((x).toDouble - dg44.xx, (x).toDouble - dg44.xy, (x).toDouble - dg44.xz, (x).toDouble - dg44.xw, (x).toDouble - dg44.yx, (x).toDouble - dg44.yy, (x).toDouble - dg44.yz, (x).toDouble - dg44.yw, (x).toDouble - dg44.zx, (x).toDouble - dg44.zy, (x).toDouble - dg44.zz, (x).toDouble - dg44.zw, (x).toDouble - dg44.wx, (x).toDouble - dg44.wy, (x).toDouble - dg44.wz, (x).toDouble - dg44.ww)
    def *(sg2: GVec2S) = new IVec2L(x * (sg2.x).toLong, x * (sg2.y).toLong)
    def *(ig2: GVec2I) = new IVec2L(x * (ig2.x).toLong, x * (ig2.y).toLong)
    def *(lg2: GVec2L) = new IVec2L(x * lg2.x, x * lg2.y)
    def *(fg2: GVec2F) = new IVec2D((x).toDouble * (fg2.x).toDouble, (x).toDouble * (fg2.y).toDouble)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (x).toDouble * dg2.y)
    def *(sg22: GMat2S) = new IMat2L(x * (sg22.xx).toLong, x * (sg22.xy).toLong, x * (sg22.yx).toLong, x * (sg22.yy).toLong)
    def *(ig22: GMat2I) = new IMat2L(x * (ig22.xx).toLong, x * (ig22.xy).toLong, x * (ig22.yx).toLong, x * (ig22.yy).toLong)
    def *(lg22: GMat2L) = new IMat2L(x * lg22.xx, x * lg22.xy, x * lg22.yx, x * lg22.yy)
    def *(fg22: GMat2F) = new IMat2D((x).toDouble * (fg22.xx).toDouble, (x).toDouble * (fg22.xy).toDouble, (x).toDouble * (fg22.yx).toDouble, (x).toDouble * (fg22.yy).toDouble)
    def *(dg22: GMat2D) = new IMat2D((x).toDouble * dg22.xx, (x).toDouble * dg22.xy, (x).toDouble * dg22.yx, (x).toDouble * dg22.yy)
    def *(sg3: GVec3S) = new IVec3L(x * (sg3.x).toLong, x * (sg3.y).toLong, x * (sg3.z).toLong)
    def *(ig3: GVec3I) = new IVec3L(x * (ig3.x).toLong, x * (ig3.y).toLong, x * (ig3.z).toLong)
    def *(lg3: GVec3L) = new IVec3L(x * lg3.x, x * lg3.y, x * lg3.z)
    def *(fg3: GVec3F) = new IVec3D((x).toDouble * (fg3.x).toDouble, (x).toDouble * (fg3.y).toDouble, (x).toDouble * (fg3.z).toDouble)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (x).toDouble * dg3.y, (x).toDouble * dg3.z)
    def *(sg33: GMat3S) = new IMat3L(x * (sg33.xx).toLong, x * (sg33.xy).toLong, x * (sg33.xz).toLong, x * (sg33.yx).toLong, x * (sg33.yy).toLong, x * (sg33.yz).toLong, x * (sg33.zx).toLong, x * (sg33.zy).toLong, x * (sg33.zz).toLong)
    def *(ig33: GMat3I) = new IMat3L(x * (ig33.xx).toLong, x * (ig33.xy).toLong, x * (ig33.xz).toLong, x * (ig33.yx).toLong, x * (ig33.yy).toLong, x * (ig33.yz).toLong, x * (ig33.zx).toLong, x * (ig33.zy).toLong, x * (ig33.zz).toLong)
    def *(lg33: GMat3L) = new IMat3L(x * lg33.xx, x * lg33.xy, x * lg33.xz, x * lg33.yx, x * lg33.yy, x * lg33.yz, x * lg33.zx, x * lg33.zy, x * lg33.zz)
    def *(fg33: GMat3F) = new IMat3D((x).toDouble * (fg33.xx).toDouble, (x).toDouble * (fg33.xy).toDouble, (x).toDouble * (fg33.xz).toDouble, (x).toDouble * (fg33.yx).toDouble, (x).toDouble * (fg33.yy).toDouble, (x).toDouble * (fg33.yz).toDouble, (x).toDouble * (fg33.zx).toDouble, (x).toDouble * (fg33.zy).toDouble, (x).toDouble * (fg33.zz).toDouble)
    def *(dg33: GMat3D) = new IMat3D((x).toDouble * dg33.xx, (x).toDouble * dg33.xy, (x).toDouble * dg33.xz, (x).toDouble * dg33.yx, (x).toDouble * dg33.yy, (x).toDouble * dg33.yz, (x).toDouble * dg33.zx, (x).toDouble * dg33.zy, (x).toDouble * dg33.zz)
    def *(sg4: GVec4S) = new IVec4L(x * (sg4.x).toLong, x * (sg4.y).toLong, x * (sg4.z).toLong, x * (sg4.w).toLong)
    def *(ig4: GVec4I) = new IVec4L(x * (ig4.x).toLong, x * (ig4.y).toLong, x * (ig4.z).toLong, x * (ig4.w).toLong)
    def *(lg4: GVec4L) = new IVec4L(x * lg4.x, x * lg4.y, x * lg4.z, x * lg4.w)
    def *(fg4: GVec4F) = new IVec4D((x).toDouble * (fg4.x).toDouble, (x).toDouble * (fg4.y).toDouble, (x).toDouble * (fg4.z).toDouble, (x).toDouble * (fg4.w).toDouble)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (x).toDouble * dg4.y, (x).toDouble * dg4.z, (x).toDouble * dg4.w)
    def *(sg44: GMat4S) = new IMat4L(x * (sg44.xx).toLong, x * (sg44.xy).toLong, x * (sg44.xz).toLong, x * (sg44.xw).toLong, x * (sg44.yx).toLong, x * (sg44.yy).toLong, x * (sg44.yz).toLong, x * (sg44.yw).toLong, x * (sg44.zx).toLong, x * (sg44.zy).toLong, x * (sg44.zz).toLong, x * (sg44.zw).toLong, x * (sg44.wx).toLong, x * (sg44.wy).toLong, x * (sg44.wz).toLong, x * (sg44.ww).toLong)
    def *(ig44: GMat4I) = new IMat4L(x * (ig44.xx).toLong, x * (ig44.xy).toLong, x * (ig44.xz).toLong, x * (ig44.xw).toLong, x * (ig44.yx).toLong, x * (ig44.yy).toLong, x * (ig44.yz).toLong, x * (ig44.yw).toLong, x * (ig44.zx).toLong, x * (ig44.zy).toLong, x * (ig44.zz).toLong, x * (ig44.zw).toLong, x * (ig44.wx).toLong, x * (ig44.wy).toLong, x * (ig44.wz).toLong, x * (ig44.ww).toLong)
    def *(lg44: GMat4L) = new IMat4L(x * lg44.xx, x * lg44.xy, x * lg44.xz, x * lg44.xw, x * lg44.yx, x * lg44.yy, x * lg44.yz, x * lg44.yw, x * lg44.zx, x * lg44.zy, x * lg44.zz, x * lg44.zw, x * lg44.wx, x * lg44.wy, x * lg44.wz, x * lg44.ww)
    def *(fg44: GMat4F) = new IMat4D((x).toDouble * (fg44.xx).toDouble, (x).toDouble * (fg44.xy).toDouble, (x).toDouble * (fg44.xz).toDouble, (x).toDouble * (fg44.xw).toDouble, (x).toDouble * (fg44.yx).toDouble, (x).toDouble * (fg44.yy).toDouble, (x).toDouble * (fg44.yz).toDouble, (x).toDouble * (fg44.yw).toDouble, (x).toDouble * (fg44.zx).toDouble, (x).toDouble * (fg44.zy).toDouble, (x).toDouble * (fg44.zz).toDouble, (x).toDouble * (fg44.zw).toDouble, (x).toDouble * (fg44.wx).toDouble, (x).toDouble * (fg44.wy).toDouble, (x).toDouble * (fg44.wz).toDouble, (x).toDouble * (fg44.ww).toDouble)
    def *(dg44: GMat4D) = new IMat4D((x).toDouble * dg44.xx, (x).toDouble * dg44.xy, (x).toDouble * dg44.xz, (x).toDouble * dg44.xw, (x).toDouble * dg44.yx, (x).toDouble * dg44.yy, (x).toDouble * dg44.yz, (x).toDouble * dg44.yw, (x).toDouble * dg44.zx, (x).toDouble * dg44.zy, (x).toDouble * dg44.zz, (x).toDouble * dg44.zw, (x).toDouble * dg44.wx, (x).toDouble * dg44.wy, (x).toDouble * dg44.wz, (x).toDouble * dg44.ww)
    def max(sg2: GVec2S) = new IVec2L(math.max(x,(sg2.x).toLong), math.max(x,(sg2.y).toLong))
    def max(ig2: GVec2I) = new IVec2L(math.max(x,(ig2.x).toLong), math.max(x,(ig2.y).toLong))
    def max(lg2: GVec2L) = new IVec2L(math.max(x,lg2.x), math.max(x,lg2.y))
    def max(fg2: GVec2F) = new IVec2D(math.max((x).toDouble,(fg2.x).toDouble), math.max((x).toDouble,(fg2.y).toDouble))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((x).toDouble,dg2.y))
    def max(sg22: GMat2S) = new IMat2L(math.max(x,(sg22.xx).toLong), math.max(x,(sg22.xy).toLong), math.max(x,(sg22.yx).toLong), math.max(x,(sg22.yy).toLong))
    def max(ig22: GMat2I) = new IMat2L(math.max(x,(ig22.xx).toLong), math.max(x,(ig22.xy).toLong), math.max(x,(ig22.yx).toLong), math.max(x,(ig22.yy).toLong))
    def max(lg22: GMat2L) = new IMat2L(math.max(x,lg22.xx), math.max(x,lg22.xy), math.max(x,lg22.yx), math.max(x,lg22.yy))
    def max(fg22: GMat2F) = new IMat2D(math.max((x).toDouble,(fg22.xx).toDouble), math.max((x).toDouble,(fg22.xy).toDouble), math.max((x).toDouble,(fg22.yx).toDouble), math.max((x).toDouble,(fg22.yy).toDouble))
    def max(dg22: GMat2D) = new IMat2D(math.max((x).toDouble,dg22.xx), math.max((x).toDouble,dg22.xy), math.max((x).toDouble,dg22.yx), math.max((x).toDouble,dg22.yy))
    def max(sg3: GVec3S) = new IVec3L(math.max(x,(sg3.x).toLong), math.max(x,(sg3.y).toLong), math.max(x,(sg3.z).toLong))
    def max(ig3: GVec3I) = new IVec3L(math.max(x,(ig3.x).toLong), math.max(x,(ig3.y).toLong), math.max(x,(ig3.z).toLong))
    def max(lg3: GVec3L) = new IVec3L(math.max(x,lg3.x), math.max(x,lg3.y), math.max(x,lg3.z))
    def max(fg3: GVec3F) = new IVec3D(math.max((x).toDouble,(fg3.x).toDouble), math.max((x).toDouble,(fg3.y).toDouble), math.max((x).toDouble,(fg3.z).toDouble))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((x).toDouble,dg3.y), math.max((x).toDouble,dg3.z))
    def max(sg33: GMat3S) = new IMat3L(math.max(x,(sg33.xx).toLong), math.max(x,(sg33.xy).toLong), math.max(x,(sg33.xz).toLong), math.max(x,(sg33.yx).toLong), math.max(x,(sg33.yy).toLong), math.max(x,(sg33.yz).toLong), math.max(x,(sg33.zx).toLong), math.max(x,(sg33.zy).toLong), math.max(x,(sg33.zz).toLong))
    def max(ig33: GMat3I) = new IMat3L(math.max(x,(ig33.xx).toLong), math.max(x,(ig33.xy).toLong), math.max(x,(ig33.xz).toLong), math.max(x,(ig33.yx).toLong), math.max(x,(ig33.yy).toLong), math.max(x,(ig33.yz).toLong), math.max(x,(ig33.zx).toLong), math.max(x,(ig33.zy).toLong), math.max(x,(ig33.zz).toLong))
    def max(lg33: GMat3L) = new IMat3L(math.max(x,lg33.xx), math.max(x,lg33.xy), math.max(x,lg33.xz), math.max(x,lg33.yx), math.max(x,lg33.yy), math.max(x,lg33.yz), math.max(x,lg33.zx), math.max(x,lg33.zy), math.max(x,lg33.zz))
    def max(fg33: GMat3F) = new IMat3D(math.max((x).toDouble,(fg33.xx).toDouble), math.max((x).toDouble,(fg33.xy).toDouble), math.max((x).toDouble,(fg33.xz).toDouble), math.max((x).toDouble,(fg33.yx).toDouble), math.max((x).toDouble,(fg33.yy).toDouble), math.max((x).toDouble,(fg33.yz).toDouble), math.max((x).toDouble,(fg33.zx).toDouble), math.max((x).toDouble,(fg33.zy).toDouble), math.max((x).toDouble,(fg33.zz).toDouble))
    def max(dg33: GMat3D) = new IMat3D(math.max((x).toDouble,dg33.xx), math.max((x).toDouble,dg33.xy), math.max((x).toDouble,dg33.xz), math.max((x).toDouble,dg33.yx), math.max((x).toDouble,dg33.yy), math.max((x).toDouble,dg33.yz), math.max((x).toDouble,dg33.zx), math.max((x).toDouble,dg33.zy), math.max((x).toDouble,dg33.zz))
    def max(sg4: GVec4S) = new IVec4L(math.max(x,(sg4.x).toLong), math.max(x,(sg4.y).toLong), math.max(x,(sg4.z).toLong), math.max(x,(sg4.w).toLong))
    def max(ig4: GVec4I) = new IVec4L(math.max(x,(ig4.x).toLong), math.max(x,(ig4.y).toLong), math.max(x,(ig4.z).toLong), math.max(x,(ig4.w).toLong))
    def max(lg4: GVec4L) = new IVec4L(math.max(x,lg4.x), math.max(x,lg4.y), math.max(x,lg4.z), math.max(x,lg4.w))
    def max(fg4: GVec4F) = new IVec4D(math.max((x).toDouble,(fg4.x).toDouble), math.max((x).toDouble,(fg4.y).toDouble), math.max((x).toDouble,(fg4.z).toDouble), math.max((x).toDouble,(fg4.w).toDouble))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((x).toDouble,dg4.y), math.max((x).toDouble,dg4.z), math.max((x).toDouble,dg4.w))
    def max(sg44: GMat4S) = new IMat4L(math.max(x,(sg44.xx).toLong), math.max(x,(sg44.xy).toLong), math.max(x,(sg44.xz).toLong), math.max(x,(sg44.xw).toLong), math.max(x,(sg44.yx).toLong), math.max(x,(sg44.yy).toLong), math.max(x,(sg44.yz).toLong), math.max(x,(sg44.yw).toLong), math.max(x,(sg44.zx).toLong), math.max(x,(sg44.zy).toLong), math.max(x,(sg44.zz).toLong), math.max(x,(sg44.zw).toLong), math.max(x,(sg44.wx).toLong), math.max(x,(sg44.wy).toLong), math.max(x,(sg44.wz).toLong), math.max(x,(sg44.ww).toLong))
    def max(ig44: GMat4I) = new IMat4L(math.max(x,(ig44.xx).toLong), math.max(x,(ig44.xy).toLong), math.max(x,(ig44.xz).toLong), math.max(x,(ig44.xw).toLong), math.max(x,(ig44.yx).toLong), math.max(x,(ig44.yy).toLong), math.max(x,(ig44.yz).toLong), math.max(x,(ig44.yw).toLong), math.max(x,(ig44.zx).toLong), math.max(x,(ig44.zy).toLong), math.max(x,(ig44.zz).toLong), math.max(x,(ig44.zw).toLong), math.max(x,(ig44.wx).toLong), math.max(x,(ig44.wy).toLong), math.max(x,(ig44.wz).toLong), math.max(x,(ig44.ww).toLong))
    def max(lg44: GMat4L) = new IMat4L(math.max(x,lg44.xx), math.max(x,lg44.xy), math.max(x,lg44.xz), math.max(x,lg44.xw), math.max(x,lg44.yx), math.max(x,lg44.yy), math.max(x,lg44.yz), math.max(x,lg44.yw), math.max(x,lg44.zx), math.max(x,lg44.zy), math.max(x,lg44.zz), math.max(x,lg44.zw), math.max(x,lg44.wx), math.max(x,lg44.wy), math.max(x,lg44.wz), math.max(x,lg44.ww))
    def max(fg44: GMat4F) = new IMat4D(math.max((x).toDouble,(fg44.xx).toDouble), math.max((x).toDouble,(fg44.xy).toDouble), math.max((x).toDouble,(fg44.xz).toDouble), math.max((x).toDouble,(fg44.xw).toDouble), math.max((x).toDouble,(fg44.yx).toDouble), math.max((x).toDouble,(fg44.yy).toDouble), math.max((x).toDouble,(fg44.yz).toDouble), math.max((x).toDouble,(fg44.yw).toDouble), math.max((x).toDouble,(fg44.zx).toDouble), math.max((x).toDouble,(fg44.zy).toDouble), math.max((x).toDouble,(fg44.zz).toDouble), math.max((x).toDouble,(fg44.zw).toDouble), math.max((x).toDouble,(fg44.wx).toDouble), math.max((x).toDouble,(fg44.wy).toDouble), math.max((x).toDouble,(fg44.wz).toDouble), math.max((x).toDouble,(fg44.ww).toDouble))
    def max(dg44: GMat4D) = new IMat4D(math.max((x).toDouble,dg44.xx), math.max((x).toDouble,dg44.xy), math.max((x).toDouble,dg44.xz), math.max((x).toDouble,dg44.xw), math.max((x).toDouble,dg44.yx), math.max((x).toDouble,dg44.yy), math.max((x).toDouble,dg44.yz), math.max((x).toDouble,dg44.yw), math.max((x).toDouble,dg44.zx), math.max((x).toDouble,dg44.zy), math.max((x).toDouble,dg44.zz), math.max((x).toDouble,dg44.zw), math.max((x).toDouble,dg44.wx), math.max((x).toDouble,dg44.wy), math.max((x).toDouble,dg44.wz), math.max((x).toDouble,dg44.ww))
    def min(sg2: GVec2S) = new IVec2L(math.min(x,(sg2.x).toLong), math.min(x,(sg2.y).toLong))
    def min(ig2: GVec2I) = new IVec2L(math.min(x,(ig2.x).toLong), math.min(x,(ig2.y).toLong))
    def min(lg2: GVec2L) = new IVec2L(math.min(x,lg2.x), math.min(x,lg2.y))
    def min(fg2: GVec2F) = new IVec2D(math.min((x).toDouble,(fg2.x).toDouble), math.min((x).toDouble,(fg2.y).toDouble))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((x).toDouble,dg2.y))
    def min(sg22: GMat2S) = new IMat2L(math.min(x,(sg22.xx).toLong), math.min(x,(sg22.xy).toLong), math.min(x,(sg22.yx).toLong), math.min(x,(sg22.yy).toLong))
    def min(ig22: GMat2I) = new IMat2L(math.min(x,(ig22.xx).toLong), math.min(x,(ig22.xy).toLong), math.min(x,(ig22.yx).toLong), math.min(x,(ig22.yy).toLong))
    def min(lg22: GMat2L) = new IMat2L(math.min(x,lg22.xx), math.min(x,lg22.xy), math.min(x,lg22.yx), math.min(x,lg22.yy))
    def min(fg22: GMat2F) = new IMat2D(math.min((x).toDouble,(fg22.xx).toDouble), math.min((x).toDouble,(fg22.xy).toDouble), math.min((x).toDouble,(fg22.yx).toDouble), math.min((x).toDouble,(fg22.yy).toDouble))
    def min(dg22: GMat2D) = new IMat2D(math.min((x).toDouble,dg22.xx), math.min((x).toDouble,dg22.xy), math.min((x).toDouble,dg22.yx), math.min((x).toDouble,dg22.yy))
    def min(sg3: GVec3S) = new IVec3L(math.min(x,(sg3.x).toLong), math.min(x,(sg3.y).toLong), math.min(x,(sg3.z).toLong))
    def min(ig3: GVec3I) = new IVec3L(math.min(x,(ig3.x).toLong), math.min(x,(ig3.y).toLong), math.min(x,(ig3.z).toLong))
    def min(lg3: GVec3L) = new IVec3L(math.min(x,lg3.x), math.min(x,lg3.y), math.min(x,lg3.z))
    def min(fg3: GVec3F) = new IVec3D(math.min((x).toDouble,(fg3.x).toDouble), math.min((x).toDouble,(fg3.y).toDouble), math.min((x).toDouble,(fg3.z).toDouble))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((x).toDouble,dg3.y), math.min((x).toDouble,dg3.z))
    def min(sg33: GMat3S) = new IMat3L(math.min(x,(sg33.xx).toLong), math.min(x,(sg33.xy).toLong), math.min(x,(sg33.xz).toLong), math.min(x,(sg33.yx).toLong), math.min(x,(sg33.yy).toLong), math.min(x,(sg33.yz).toLong), math.min(x,(sg33.zx).toLong), math.min(x,(sg33.zy).toLong), math.min(x,(sg33.zz).toLong))
    def min(ig33: GMat3I) = new IMat3L(math.min(x,(ig33.xx).toLong), math.min(x,(ig33.xy).toLong), math.min(x,(ig33.xz).toLong), math.min(x,(ig33.yx).toLong), math.min(x,(ig33.yy).toLong), math.min(x,(ig33.yz).toLong), math.min(x,(ig33.zx).toLong), math.min(x,(ig33.zy).toLong), math.min(x,(ig33.zz).toLong))
    def min(lg33: GMat3L) = new IMat3L(math.min(x,lg33.xx), math.min(x,lg33.xy), math.min(x,lg33.xz), math.min(x,lg33.yx), math.min(x,lg33.yy), math.min(x,lg33.yz), math.min(x,lg33.zx), math.min(x,lg33.zy), math.min(x,lg33.zz))
    def min(fg33: GMat3F) = new IMat3D(math.min((x).toDouble,(fg33.xx).toDouble), math.min((x).toDouble,(fg33.xy).toDouble), math.min((x).toDouble,(fg33.xz).toDouble), math.min((x).toDouble,(fg33.yx).toDouble), math.min((x).toDouble,(fg33.yy).toDouble), math.min((x).toDouble,(fg33.yz).toDouble), math.min((x).toDouble,(fg33.zx).toDouble), math.min((x).toDouble,(fg33.zy).toDouble), math.min((x).toDouble,(fg33.zz).toDouble))
    def min(dg33: GMat3D) = new IMat3D(math.min((x).toDouble,dg33.xx), math.min((x).toDouble,dg33.xy), math.min((x).toDouble,dg33.xz), math.min((x).toDouble,dg33.yx), math.min((x).toDouble,dg33.yy), math.min((x).toDouble,dg33.yz), math.min((x).toDouble,dg33.zx), math.min((x).toDouble,dg33.zy), math.min((x).toDouble,dg33.zz))
    def min(sg4: GVec4S) = new IVec4L(math.min(x,(sg4.x).toLong), math.min(x,(sg4.y).toLong), math.min(x,(sg4.z).toLong), math.min(x,(sg4.w).toLong))
    def min(ig4: GVec4I) = new IVec4L(math.min(x,(ig4.x).toLong), math.min(x,(ig4.y).toLong), math.min(x,(ig4.z).toLong), math.min(x,(ig4.w).toLong))
    def min(lg4: GVec4L) = new IVec4L(math.min(x,lg4.x), math.min(x,lg4.y), math.min(x,lg4.z), math.min(x,lg4.w))
    def min(fg4: GVec4F) = new IVec4D(math.min((x).toDouble,(fg4.x).toDouble), math.min((x).toDouble,(fg4.y).toDouble), math.min((x).toDouble,(fg4.z).toDouble), math.min((x).toDouble,(fg4.w).toDouble))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((x).toDouble,dg4.y), math.min((x).toDouble,dg4.z), math.min((x).toDouble,dg4.w))
    def min(sg44: GMat4S) = new IMat4L(math.min(x,(sg44.xx).toLong), math.min(x,(sg44.xy).toLong), math.min(x,(sg44.xz).toLong), math.min(x,(sg44.xw).toLong), math.min(x,(sg44.yx).toLong), math.min(x,(sg44.yy).toLong), math.min(x,(sg44.yz).toLong), math.min(x,(sg44.yw).toLong), math.min(x,(sg44.zx).toLong), math.min(x,(sg44.zy).toLong), math.min(x,(sg44.zz).toLong), math.min(x,(sg44.zw).toLong), math.min(x,(sg44.wx).toLong), math.min(x,(sg44.wy).toLong), math.min(x,(sg44.wz).toLong), math.min(x,(sg44.ww).toLong))
    def min(ig44: GMat4I) = new IMat4L(math.min(x,(ig44.xx).toLong), math.min(x,(ig44.xy).toLong), math.min(x,(ig44.xz).toLong), math.min(x,(ig44.xw).toLong), math.min(x,(ig44.yx).toLong), math.min(x,(ig44.yy).toLong), math.min(x,(ig44.yz).toLong), math.min(x,(ig44.yw).toLong), math.min(x,(ig44.zx).toLong), math.min(x,(ig44.zy).toLong), math.min(x,(ig44.zz).toLong), math.min(x,(ig44.zw).toLong), math.min(x,(ig44.wx).toLong), math.min(x,(ig44.wy).toLong), math.min(x,(ig44.wz).toLong), math.min(x,(ig44.ww).toLong))
    def min(lg44: GMat4L) = new IMat4L(math.min(x,lg44.xx), math.min(x,lg44.xy), math.min(x,lg44.xz), math.min(x,lg44.xw), math.min(x,lg44.yx), math.min(x,lg44.yy), math.min(x,lg44.yz), math.min(x,lg44.yw), math.min(x,lg44.zx), math.min(x,lg44.zy), math.min(x,lg44.zz), math.min(x,lg44.zw), math.min(x,lg44.wx), math.min(x,lg44.wy), math.min(x,lg44.wz), math.min(x,lg44.ww))
    def min(fg44: GMat4F) = new IMat4D(math.min((x).toDouble,(fg44.xx).toDouble), math.min((x).toDouble,(fg44.xy).toDouble), math.min((x).toDouble,(fg44.xz).toDouble), math.min((x).toDouble,(fg44.xw).toDouble), math.min((x).toDouble,(fg44.yx).toDouble), math.min((x).toDouble,(fg44.yy).toDouble), math.min((x).toDouble,(fg44.yz).toDouble), math.min((x).toDouble,(fg44.yw).toDouble), math.min((x).toDouble,(fg44.zx).toDouble), math.min((x).toDouble,(fg44.zy).toDouble), math.min((x).toDouble,(fg44.zz).toDouble), math.min((x).toDouble,(fg44.zw).toDouble), math.min((x).toDouble,(fg44.wx).toDouble), math.min((x).toDouble,(fg44.wy).toDouble), math.min((x).toDouble,(fg44.wz).toDouble), math.min((x).toDouble,(fg44.ww).toDouble))
    def min(dg44: GMat4D) = new IMat4D(math.min((x).toDouble,dg44.xx), math.min((x).toDouble,dg44.xy), math.min((x).toDouble,dg44.xz), math.min((x).toDouble,dg44.xw), math.min((x).toDouble,dg44.yx), math.min((x).toDouble,dg44.yy), math.min((x).toDouble,dg44.yz), math.min((x).toDouble,dg44.yw), math.min((x).toDouble,dg44.zx), math.min((x).toDouble,dg44.zy), math.min((x).toDouble,dg44.zz), math.min((x).toDouble,dg44.zw), math.min((x).toDouble,dg44.wx), math.min((x).toDouble,dg44.wy), math.min((x).toDouble,dg44.wz), math.min((x).toDouble,dg44.ww))
  } // class ScalarL



  final class ScalarF(val x: Float) extends Cloneable {
    override def toString = "["+x+"]"
    override def hashCode = x.##
    override def equals(any: Any) = any match { case sg1: ScalarS => {x==sg1.x }; case ig1: ScalarI => {x==ig1.x }; case lg1: ScalarL => {x==lg1.x }; case fg1: ScalarF => {x==fg1.x }; case dg1: ScalarD => {x==dg1.x }; case _ => false }
    override def clone(): ScalarF = new ScalarF(x)
    def copy(x0: Float = x): ScalarF = new ScalarF(x0)
    def +(sg2: GVec2S) = new IVec2F(x + (sg2.x).toFloat, x + (sg2.y).toFloat)
    def +(ig2: GVec2I) = new IVec2F(x + (ig2.x).toFloat, x + (ig2.y).toFloat)
    def +(lg2: GVec2L) = new IVec2D((x).toDouble + (lg2.x).toDouble, (x).toDouble + (lg2.y).toDouble)
    def +(fg2: GVec2F) = new IVec2F(x + fg2.x, x + fg2.y)
    def +(dg2: GVec2D) = new IVec2D((x).toDouble + dg2.x, (x).toDouble + dg2.y)
    def +(sg22: GMat2S) = new IMat2F(x + (sg22.xx).toFloat, x + (sg22.xy).toFloat, x + (sg22.yx).toFloat, x + (sg22.yy).toFloat)
    def +(ig22: GMat2I) = new IMat2F(x + (ig22.xx).toFloat, x + (ig22.xy).toFloat, x + (ig22.yx).toFloat, x + (ig22.yy).toFloat)
    def +(lg22: GMat2L) = new IMat2D((x).toDouble + (lg22.xx).toDouble, (x).toDouble + (lg22.xy).toDouble, (x).toDouble + (lg22.yx).toDouble, (x).toDouble + (lg22.yy).toDouble)
    def +(fg22: GMat2F) = new IMat2F(x + fg22.xx, x + fg22.xy, x + fg22.yx, x + fg22.yy)
    def +(dg22: GMat2D) = new IMat2D((x).toDouble + dg22.xx, (x).toDouble + dg22.xy, (x).toDouble + dg22.yx, (x).toDouble + dg22.yy)
    def +(sg3: GVec3S) = new IVec3F(x + (sg3.x).toFloat, x + (sg3.y).toFloat, x + (sg3.z).toFloat)
    def +(ig3: GVec3I) = new IVec3F(x + (ig3.x).toFloat, x + (ig3.y).toFloat, x + (ig3.z).toFloat)
    def +(lg3: GVec3L) = new IVec3D((x).toDouble + (lg3.x).toDouble, (x).toDouble + (lg3.y).toDouble, (x).toDouble + (lg3.z).toDouble)
    def +(fg3: GVec3F) = new IVec3F(x + fg3.x, x + fg3.y, x + fg3.z)
    def +(dg3: GVec3D) = new IVec3D((x).toDouble + dg3.x, (x).toDouble + dg3.y, (x).toDouble + dg3.z)
    def +(sg33: GMat3S) = new IMat3F(x + (sg33.xx).toFloat, x + (sg33.xy).toFloat, x + (sg33.xz).toFloat, x + (sg33.yx).toFloat, x + (sg33.yy).toFloat, x + (sg33.yz).toFloat, x + (sg33.zx).toFloat, x + (sg33.zy).toFloat, x + (sg33.zz).toFloat)
    def +(ig33: GMat3I) = new IMat3F(x + (ig33.xx).toFloat, x + (ig33.xy).toFloat, x + (ig33.xz).toFloat, x + (ig33.yx).toFloat, x + (ig33.yy).toFloat, x + (ig33.yz).toFloat, x + (ig33.zx).toFloat, x + (ig33.zy).toFloat, x + (ig33.zz).toFloat)
    def +(lg33: GMat3L) = new IMat3D((x).toDouble + (lg33.xx).toDouble, (x).toDouble + (lg33.xy).toDouble, (x).toDouble + (lg33.xz).toDouble, (x).toDouble + (lg33.yx).toDouble, (x).toDouble + (lg33.yy).toDouble, (x).toDouble + (lg33.yz).toDouble, (x).toDouble + (lg33.zx).toDouble, (x).toDouble + (lg33.zy).toDouble, (x).toDouble + (lg33.zz).toDouble)
    def +(fg33: GMat3F) = new IMat3F(x + fg33.xx, x + fg33.xy, x + fg33.xz, x + fg33.yx, x + fg33.yy, x + fg33.yz, x + fg33.zx, x + fg33.zy, x + fg33.zz)
    def +(dg33: GMat3D) = new IMat3D((x).toDouble + dg33.xx, (x).toDouble + dg33.xy, (x).toDouble + dg33.xz, (x).toDouble + dg33.yx, (x).toDouble + dg33.yy, (x).toDouble + dg33.yz, (x).toDouble + dg33.zx, (x).toDouble + dg33.zy, (x).toDouble + dg33.zz)
    def +(sg4: GVec4S) = new IVec4F(x + (sg4.x).toFloat, x + (sg4.y).toFloat, x + (sg4.z).toFloat, x + (sg4.w).toFloat)
    def +(ig4: GVec4I) = new IVec4F(x + (ig4.x).toFloat, x + (ig4.y).toFloat, x + (ig4.z).toFloat, x + (ig4.w).toFloat)
    def +(lg4: GVec4L) = new IVec4D((x).toDouble + (lg4.x).toDouble, (x).toDouble + (lg4.y).toDouble, (x).toDouble + (lg4.z).toDouble, (x).toDouble + (lg4.w).toDouble)
    def +(fg4: GVec4F) = new IVec4F(x + fg4.x, x + fg4.y, x + fg4.z, x + fg4.w)
    def +(dg4: GVec4D) = new IVec4D((x).toDouble + dg4.x, (x).toDouble + dg4.y, (x).toDouble + dg4.z, (x).toDouble + dg4.w)
    def +(sg44: GMat4S) = new IMat4F(x + (sg44.xx).toFloat, x + (sg44.xy).toFloat, x + (sg44.xz).toFloat, x + (sg44.xw).toFloat, x + (sg44.yx).toFloat, x + (sg44.yy).toFloat, x + (sg44.yz).toFloat, x + (sg44.yw).toFloat, x + (sg44.zx).toFloat, x + (sg44.zy).toFloat, x + (sg44.zz).toFloat, x + (sg44.zw).toFloat, x + (sg44.wx).toFloat, x + (sg44.wy).toFloat, x + (sg44.wz).toFloat, x + (sg44.ww).toFloat)
    def +(ig44: GMat4I) = new IMat4F(x + (ig44.xx).toFloat, x + (ig44.xy).toFloat, x + (ig44.xz).toFloat, x + (ig44.xw).toFloat, x + (ig44.yx).toFloat, x + (ig44.yy).toFloat, x + (ig44.yz).toFloat, x + (ig44.yw).toFloat, x + (ig44.zx).toFloat, x + (ig44.zy).toFloat, x + (ig44.zz).toFloat, x + (ig44.zw).toFloat, x + (ig44.wx).toFloat, x + (ig44.wy).toFloat, x + (ig44.wz).toFloat, x + (ig44.ww).toFloat)
    def +(lg44: GMat4L) = new IMat4D((x).toDouble + (lg44.xx).toDouble, (x).toDouble + (lg44.xy).toDouble, (x).toDouble + (lg44.xz).toDouble, (x).toDouble + (lg44.xw).toDouble, (x).toDouble + (lg44.yx).toDouble, (x).toDouble + (lg44.yy).toDouble, (x).toDouble + (lg44.yz).toDouble, (x).toDouble + (lg44.yw).toDouble, (x).toDouble + (lg44.zx).toDouble, (x).toDouble + (lg44.zy).toDouble, (x).toDouble + (lg44.zz).toDouble, (x).toDouble + (lg44.zw).toDouble, (x).toDouble + (lg44.wx).toDouble, (x).toDouble + (lg44.wy).toDouble, (x).toDouble + (lg44.wz).toDouble, (x).toDouble + (lg44.ww).toDouble)
    def +(fg44: GMat4F) = new IMat4F(x + fg44.xx, x + fg44.xy, x + fg44.xz, x + fg44.xw, x + fg44.yx, x + fg44.yy, x + fg44.yz, x + fg44.yw, x + fg44.zx, x + fg44.zy, x + fg44.zz, x + fg44.zw, x + fg44.wx, x + fg44.wy, x + fg44.wz, x + fg44.ww)
    def +(dg44: GMat4D) = new IMat4D((x).toDouble + dg44.xx, (x).toDouble + dg44.xy, (x).toDouble + dg44.xz, (x).toDouble + dg44.xw, (x).toDouble + dg44.yx, (x).toDouble + dg44.yy, (x).toDouble + dg44.yz, (x).toDouble + dg44.yw, (x).toDouble + dg44.zx, (x).toDouble + dg44.zy, (x).toDouble + dg44.zz, (x).toDouble + dg44.zw, (x).toDouble + dg44.wx, (x).toDouble + dg44.wy, (x).toDouble + dg44.wz, (x).toDouble + dg44.ww)
    def -(sg2: GVec2S) = new IVec2F(x - (sg2.x).toFloat, x - (sg2.y).toFloat)
    def -(ig2: GVec2I) = new IVec2F(x - (ig2.x).toFloat, x - (ig2.y).toFloat)
    def -(lg2: GVec2L) = new IVec2D((x).toDouble - (lg2.x).toDouble, (x).toDouble - (lg2.y).toDouble)
    def -(fg2: GVec2F) = new IVec2F(x - fg2.x, x - fg2.y)
    def -(dg2: GVec2D) = new IVec2D((x).toDouble - dg2.x, (x).toDouble - dg2.y)
    def -(sg22: GMat2S) = new IMat2F(x - (sg22.xx).toFloat, x - (sg22.xy).toFloat, x - (sg22.yx).toFloat, x - (sg22.yy).toFloat)
    def -(ig22: GMat2I) = new IMat2F(x - (ig22.xx).toFloat, x - (ig22.xy).toFloat, x - (ig22.yx).toFloat, x - (ig22.yy).toFloat)
    def -(lg22: GMat2L) = new IMat2D((x).toDouble - (lg22.xx).toDouble, (x).toDouble - (lg22.xy).toDouble, (x).toDouble - (lg22.yx).toDouble, (x).toDouble - (lg22.yy).toDouble)
    def -(fg22: GMat2F) = new IMat2F(x - fg22.xx, x - fg22.xy, x - fg22.yx, x - fg22.yy)
    def -(dg22: GMat2D) = new IMat2D((x).toDouble - dg22.xx, (x).toDouble - dg22.xy, (x).toDouble - dg22.yx, (x).toDouble - dg22.yy)
    def -(sg3: GVec3S) = new IVec3F(x - (sg3.x).toFloat, x - (sg3.y).toFloat, x - (sg3.z).toFloat)
    def -(ig3: GVec3I) = new IVec3F(x - (ig3.x).toFloat, x - (ig3.y).toFloat, x - (ig3.z).toFloat)
    def -(lg3: GVec3L) = new IVec3D((x).toDouble - (lg3.x).toDouble, (x).toDouble - (lg3.y).toDouble, (x).toDouble - (lg3.z).toDouble)
    def -(fg3: GVec3F) = new IVec3F(x - fg3.x, x - fg3.y, x - fg3.z)
    def -(dg3: GVec3D) = new IVec3D((x).toDouble - dg3.x, (x).toDouble - dg3.y, (x).toDouble - dg3.z)
    def -(sg33: GMat3S) = new IMat3F(x - (sg33.xx).toFloat, x - (sg33.xy).toFloat, x - (sg33.xz).toFloat, x - (sg33.yx).toFloat, x - (sg33.yy).toFloat, x - (sg33.yz).toFloat, x - (sg33.zx).toFloat, x - (sg33.zy).toFloat, x - (sg33.zz).toFloat)
    def -(ig33: GMat3I) = new IMat3F(x - (ig33.xx).toFloat, x - (ig33.xy).toFloat, x - (ig33.xz).toFloat, x - (ig33.yx).toFloat, x - (ig33.yy).toFloat, x - (ig33.yz).toFloat, x - (ig33.zx).toFloat, x - (ig33.zy).toFloat, x - (ig33.zz).toFloat)
    def -(lg33: GMat3L) = new IMat3D((x).toDouble - (lg33.xx).toDouble, (x).toDouble - (lg33.xy).toDouble, (x).toDouble - (lg33.xz).toDouble, (x).toDouble - (lg33.yx).toDouble, (x).toDouble - (lg33.yy).toDouble, (x).toDouble - (lg33.yz).toDouble, (x).toDouble - (lg33.zx).toDouble, (x).toDouble - (lg33.zy).toDouble, (x).toDouble - (lg33.zz).toDouble)
    def -(fg33: GMat3F) = new IMat3F(x - fg33.xx, x - fg33.xy, x - fg33.xz, x - fg33.yx, x - fg33.yy, x - fg33.yz, x - fg33.zx, x - fg33.zy, x - fg33.zz)
    def -(dg33: GMat3D) = new IMat3D((x).toDouble - dg33.xx, (x).toDouble - dg33.xy, (x).toDouble - dg33.xz, (x).toDouble - dg33.yx, (x).toDouble - dg33.yy, (x).toDouble - dg33.yz, (x).toDouble - dg33.zx, (x).toDouble - dg33.zy, (x).toDouble - dg33.zz)
    def -(sg4: GVec4S) = new IVec4F(x - (sg4.x).toFloat, x - (sg4.y).toFloat, x - (sg4.z).toFloat, x - (sg4.w).toFloat)
    def -(ig4: GVec4I) = new IVec4F(x - (ig4.x).toFloat, x - (ig4.y).toFloat, x - (ig4.z).toFloat, x - (ig4.w).toFloat)
    def -(lg4: GVec4L) = new IVec4D((x).toDouble - (lg4.x).toDouble, (x).toDouble - (lg4.y).toDouble, (x).toDouble - (lg4.z).toDouble, (x).toDouble - (lg4.w).toDouble)
    def -(fg4: GVec4F) = new IVec4F(x - fg4.x, x - fg4.y, x - fg4.z, x - fg4.w)
    def -(dg4: GVec4D) = new IVec4D((x).toDouble - dg4.x, (x).toDouble - dg4.y, (x).toDouble - dg4.z, (x).toDouble - dg4.w)
    def -(sg44: GMat4S) = new IMat4F(x - (sg44.xx).toFloat, x - (sg44.xy).toFloat, x - (sg44.xz).toFloat, x - (sg44.xw).toFloat, x - (sg44.yx).toFloat, x - (sg44.yy).toFloat, x - (sg44.yz).toFloat, x - (sg44.yw).toFloat, x - (sg44.zx).toFloat, x - (sg44.zy).toFloat, x - (sg44.zz).toFloat, x - (sg44.zw).toFloat, x - (sg44.wx).toFloat, x - (sg44.wy).toFloat, x - (sg44.wz).toFloat, x - (sg44.ww).toFloat)
    def -(ig44: GMat4I) = new IMat4F(x - (ig44.xx).toFloat, x - (ig44.xy).toFloat, x - (ig44.xz).toFloat, x - (ig44.xw).toFloat, x - (ig44.yx).toFloat, x - (ig44.yy).toFloat, x - (ig44.yz).toFloat, x - (ig44.yw).toFloat, x - (ig44.zx).toFloat, x - (ig44.zy).toFloat, x - (ig44.zz).toFloat, x - (ig44.zw).toFloat, x - (ig44.wx).toFloat, x - (ig44.wy).toFloat, x - (ig44.wz).toFloat, x - (ig44.ww).toFloat)
    def -(lg44: GMat4L) = new IMat4D((x).toDouble - (lg44.xx).toDouble, (x).toDouble - (lg44.xy).toDouble, (x).toDouble - (lg44.xz).toDouble, (x).toDouble - (lg44.xw).toDouble, (x).toDouble - (lg44.yx).toDouble, (x).toDouble - (lg44.yy).toDouble, (x).toDouble - (lg44.yz).toDouble, (x).toDouble - (lg44.yw).toDouble, (x).toDouble - (lg44.zx).toDouble, (x).toDouble - (lg44.zy).toDouble, (x).toDouble - (lg44.zz).toDouble, (x).toDouble - (lg44.zw).toDouble, (x).toDouble - (lg44.wx).toDouble, (x).toDouble - (lg44.wy).toDouble, (x).toDouble - (lg44.wz).toDouble, (x).toDouble - (lg44.ww).toDouble)
    def -(fg44: GMat4F) = new IMat4F(x - fg44.xx, x - fg44.xy, x - fg44.xz, x - fg44.xw, x - fg44.yx, x - fg44.yy, x - fg44.yz, x - fg44.yw, x - fg44.zx, x - fg44.zy, x - fg44.zz, x - fg44.zw, x - fg44.wx, x - fg44.wy, x - fg44.wz, x - fg44.ww)
    def -(dg44: GMat4D) = new IMat4D((x).toDouble - dg44.xx, (x).toDouble - dg44.xy, (x).toDouble - dg44.xz, (x).toDouble - dg44.xw, (x).toDouble - dg44.yx, (x).toDouble - dg44.yy, (x).toDouble - dg44.yz, (x).toDouble - dg44.yw, (x).toDouble - dg44.zx, (x).toDouble - dg44.zy, (x).toDouble - dg44.zz, (x).toDouble - dg44.zw, (x).toDouble - dg44.wx, (x).toDouble - dg44.wy, (x).toDouble - dg44.wz, (x).toDouble - dg44.ww)
    def *(sg2: GVec2S) = new IVec2F(x * (sg2.x).toFloat, x * (sg2.y).toFloat)
    def *(ig2: GVec2I) = new IVec2F(x * (ig2.x).toFloat, x * (ig2.y).toFloat)
    def *(lg2: GVec2L) = new IVec2D((x).toDouble * (lg2.x).toDouble, (x).toDouble * (lg2.y).toDouble)
    def *(fg2: GVec2F) = new IVec2F(x * fg2.x, x * fg2.y)
    def *(dg2: GVec2D) = new IVec2D((x).toDouble * dg2.x, (x).toDouble * dg2.y)
    def *(sg22: GMat2S) = new IMat2F(x * (sg22.xx).toFloat, x * (sg22.xy).toFloat, x * (sg22.yx).toFloat, x * (sg22.yy).toFloat)
    def *(ig22: GMat2I) = new IMat2F(x * (ig22.xx).toFloat, x * (ig22.xy).toFloat, x * (ig22.yx).toFloat, x * (ig22.yy).toFloat)
    def *(lg22: GMat2L) = new IMat2D((x).toDouble * (lg22.xx).toDouble, (x).toDouble * (lg22.xy).toDouble, (x).toDouble * (lg22.yx).toDouble, (x).toDouble * (lg22.yy).toDouble)
    def *(fg22: GMat2F) = new IMat2F(x * fg22.xx, x * fg22.xy, x * fg22.yx, x * fg22.yy)
    def *(dg22: GMat2D) = new IMat2D((x).toDouble * dg22.xx, (x).toDouble * dg22.xy, (x).toDouble * dg22.yx, (x).toDouble * dg22.yy)
    def *(sg3: GVec3S) = new IVec3F(x * (sg3.x).toFloat, x * (sg3.y).toFloat, x * (sg3.z).toFloat)
    def *(ig3: GVec3I) = new IVec3F(x * (ig3.x).toFloat, x * (ig3.y).toFloat, x * (ig3.z).toFloat)
    def *(lg3: GVec3L) = new IVec3D((x).toDouble * (lg3.x).toDouble, (x).toDouble * (lg3.y).toDouble, (x).toDouble * (lg3.z).toDouble)
    def *(fg3: GVec3F) = new IVec3F(x * fg3.x, x * fg3.y, x * fg3.z)
    def *(dg3: GVec3D) = new IVec3D((x).toDouble * dg3.x, (x).toDouble * dg3.y, (x).toDouble * dg3.z)
    def *(sg33: GMat3S) = new IMat3F(x * (sg33.xx).toFloat, x * (sg33.xy).toFloat, x * (sg33.xz).toFloat, x * (sg33.yx).toFloat, x * (sg33.yy).toFloat, x * (sg33.yz).toFloat, x * (sg33.zx).toFloat, x * (sg33.zy).toFloat, x * (sg33.zz).toFloat)
    def *(ig33: GMat3I) = new IMat3F(x * (ig33.xx).toFloat, x * (ig33.xy).toFloat, x * (ig33.xz).toFloat, x * (ig33.yx).toFloat, x * (ig33.yy).toFloat, x * (ig33.yz).toFloat, x * (ig33.zx).toFloat, x * (ig33.zy).toFloat, x * (ig33.zz).toFloat)
    def *(lg33: GMat3L) = new IMat3D((x).toDouble * (lg33.xx).toDouble, (x).toDouble * (lg33.xy).toDouble, (x).toDouble * (lg33.xz).toDouble, (x).toDouble * (lg33.yx).toDouble, (x).toDouble * (lg33.yy).toDouble, (x).toDouble * (lg33.yz).toDouble, (x).toDouble * (lg33.zx).toDouble, (x).toDouble * (lg33.zy).toDouble, (x).toDouble * (lg33.zz).toDouble)
    def *(fg33: GMat3F) = new IMat3F(x * fg33.xx, x * fg33.xy, x * fg33.xz, x * fg33.yx, x * fg33.yy, x * fg33.yz, x * fg33.zx, x * fg33.zy, x * fg33.zz)
    def *(dg33: GMat3D) = new IMat3D((x).toDouble * dg33.xx, (x).toDouble * dg33.xy, (x).toDouble * dg33.xz, (x).toDouble * dg33.yx, (x).toDouble * dg33.yy, (x).toDouble * dg33.yz, (x).toDouble * dg33.zx, (x).toDouble * dg33.zy, (x).toDouble * dg33.zz)
    def *(sg4: GVec4S) = new IVec4F(x * (sg4.x).toFloat, x * (sg4.y).toFloat, x * (sg4.z).toFloat, x * (sg4.w).toFloat)
    def *(ig4: GVec4I) = new IVec4F(x * (ig4.x).toFloat, x * (ig4.y).toFloat, x * (ig4.z).toFloat, x * (ig4.w).toFloat)
    def *(lg4: GVec4L) = new IVec4D((x).toDouble * (lg4.x).toDouble, (x).toDouble * (lg4.y).toDouble, (x).toDouble * (lg4.z).toDouble, (x).toDouble * (lg4.w).toDouble)
    def *(fg4: GVec4F) = new IVec4F(x * fg4.x, x * fg4.y, x * fg4.z, x * fg4.w)
    def *(dg4: GVec4D) = new IVec4D((x).toDouble * dg4.x, (x).toDouble * dg4.y, (x).toDouble * dg4.z, (x).toDouble * dg4.w)
    def *(sg44: GMat4S) = new IMat4F(x * (sg44.xx).toFloat, x * (sg44.xy).toFloat, x * (sg44.xz).toFloat, x * (sg44.xw).toFloat, x * (sg44.yx).toFloat, x * (sg44.yy).toFloat, x * (sg44.yz).toFloat, x * (sg44.yw).toFloat, x * (sg44.zx).toFloat, x * (sg44.zy).toFloat, x * (sg44.zz).toFloat, x * (sg44.zw).toFloat, x * (sg44.wx).toFloat, x * (sg44.wy).toFloat, x * (sg44.wz).toFloat, x * (sg44.ww).toFloat)
    def *(ig44: GMat4I) = new IMat4F(x * (ig44.xx).toFloat, x * (ig44.xy).toFloat, x * (ig44.xz).toFloat, x * (ig44.xw).toFloat, x * (ig44.yx).toFloat, x * (ig44.yy).toFloat, x * (ig44.yz).toFloat, x * (ig44.yw).toFloat, x * (ig44.zx).toFloat, x * (ig44.zy).toFloat, x * (ig44.zz).toFloat, x * (ig44.zw).toFloat, x * (ig44.wx).toFloat, x * (ig44.wy).toFloat, x * (ig44.wz).toFloat, x * (ig44.ww).toFloat)
    def *(lg44: GMat4L) = new IMat4D((x).toDouble * (lg44.xx).toDouble, (x).toDouble * (lg44.xy).toDouble, (x).toDouble * (lg44.xz).toDouble, (x).toDouble * (lg44.xw).toDouble, (x).toDouble * (lg44.yx).toDouble, (x).toDouble * (lg44.yy).toDouble, (x).toDouble * (lg44.yz).toDouble, (x).toDouble * (lg44.yw).toDouble, (x).toDouble * (lg44.zx).toDouble, (x).toDouble * (lg44.zy).toDouble, (x).toDouble * (lg44.zz).toDouble, (x).toDouble * (lg44.zw).toDouble, (x).toDouble * (lg44.wx).toDouble, (x).toDouble * (lg44.wy).toDouble, (x).toDouble * (lg44.wz).toDouble, (x).toDouble * (lg44.ww).toDouble)
    def *(fg44: GMat4F) = new IMat4F(x * fg44.xx, x * fg44.xy, x * fg44.xz, x * fg44.xw, x * fg44.yx, x * fg44.yy, x * fg44.yz, x * fg44.yw, x * fg44.zx, x * fg44.zy, x * fg44.zz, x * fg44.zw, x * fg44.wx, x * fg44.wy, x * fg44.wz, x * fg44.ww)
    def *(dg44: GMat4D) = new IMat4D((x).toDouble * dg44.xx, (x).toDouble * dg44.xy, (x).toDouble * dg44.xz, (x).toDouble * dg44.xw, (x).toDouble * dg44.yx, (x).toDouble * dg44.yy, (x).toDouble * dg44.yz, (x).toDouble * dg44.yw, (x).toDouble * dg44.zx, (x).toDouble * dg44.zy, (x).toDouble * dg44.zz, (x).toDouble * dg44.zw, (x).toDouble * dg44.wx, (x).toDouble * dg44.wy, (x).toDouble * dg44.wz, (x).toDouble * dg44.ww)
    def max(sg2: GVec2S) = new IVec2F(math.max(x,(sg2.x).toFloat), math.max(x,(sg2.y).toFloat))
    def max(ig2: GVec2I) = new IVec2F(math.max(x,(ig2.x).toFloat), math.max(x,(ig2.y).toFloat))
    def max(lg2: GVec2L) = new IVec2D(math.max((x).toDouble,(lg2.x).toDouble), math.max((x).toDouble,(lg2.y).toDouble))
    def max(fg2: GVec2F) = new IVec2F(math.max(x,fg2.x), math.max(x,fg2.y))
    def max(dg2: GVec2D) = new IVec2D(math.max((x).toDouble,dg2.x), math.max((x).toDouble,dg2.y))
    def max(sg22: GMat2S) = new IMat2F(math.max(x,(sg22.xx).toFloat), math.max(x,(sg22.xy).toFloat), math.max(x,(sg22.yx).toFloat), math.max(x,(sg22.yy).toFloat))
    def max(ig22: GMat2I) = new IMat2F(math.max(x,(ig22.xx).toFloat), math.max(x,(ig22.xy).toFloat), math.max(x,(ig22.yx).toFloat), math.max(x,(ig22.yy).toFloat))
    def max(lg22: GMat2L) = new IMat2D(math.max((x).toDouble,(lg22.xx).toDouble), math.max((x).toDouble,(lg22.xy).toDouble), math.max((x).toDouble,(lg22.yx).toDouble), math.max((x).toDouble,(lg22.yy).toDouble))
    def max(fg22: GMat2F) = new IMat2F(math.max(x,fg22.xx), math.max(x,fg22.xy), math.max(x,fg22.yx), math.max(x,fg22.yy))
    def max(dg22: GMat2D) = new IMat2D(math.max((x).toDouble,dg22.xx), math.max((x).toDouble,dg22.xy), math.max((x).toDouble,dg22.yx), math.max((x).toDouble,dg22.yy))
    def max(sg3: GVec3S) = new IVec3F(math.max(x,(sg3.x).toFloat), math.max(x,(sg3.y).toFloat), math.max(x,(sg3.z).toFloat))
    def max(ig3: GVec3I) = new IVec3F(math.max(x,(ig3.x).toFloat), math.max(x,(ig3.y).toFloat), math.max(x,(ig3.z).toFloat))
    def max(lg3: GVec3L) = new IVec3D(math.max((x).toDouble,(lg3.x).toDouble), math.max((x).toDouble,(lg3.y).toDouble), math.max((x).toDouble,(lg3.z).toDouble))
    def max(fg3: GVec3F) = new IVec3F(math.max(x,fg3.x), math.max(x,fg3.y), math.max(x,fg3.z))
    def max(dg3: GVec3D) = new IVec3D(math.max((x).toDouble,dg3.x), math.max((x).toDouble,dg3.y), math.max((x).toDouble,dg3.z))
    def max(sg33: GMat3S) = new IMat3F(math.max(x,(sg33.xx).toFloat), math.max(x,(sg33.xy).toFloat), math.max(x,(sg33.xz).toFloat), math.max(x,(sg33.yx).toFloat), math.max(x,(sg33.yy).toFloat), math.max(x,(sg33.yz).toFloat), math.max(x,(sg33.zx).toFloat), math.max(x,(sg33.zy).toFloat), math.max(x,(sg33.zz).toFloat))
    def max(ig33: GMat3I) = new IMat3F(math.max(x,(ig33.xx).toFloat), math.max(x,(ig33.xy).toFloat), math.max(x,(ig33.xz).toFloat), math.max(x,(ig33.yx).toFloat), math.max(x,(ig33.yy).toFloat), math.max(x,(ig33.yz).toFloat), math.max(x,(ig33.zx).toFloat), math.max(x,(ig33.zy).toFloat), math.max(x,(ig33.zz).toFloat))
    def max(lg33: GMat3L) = new IMat3D(math.max((x).toDouble,(lg33.xx).toDouble), math.max((x).toDouble,(lg33.xy).toDouble), math.max((x).toDouble,(lg33.xz).toDouble), math.max((x).toDouble,(lg33.yx).toDouble), math.max((x).toDouble,(lg33.yy).toDouble), math.max((x).toDouble,(lg33.yz).toDouble), math.max((x).toDouble,(lg33.zx).toDouble), math.max((x).toDouble,(lg33.zy).toDouble), math.max((x).toDouble,(lg33.zz).toDouble))
    def max(fg33: GMat3F) = new IMat3F(math.max(x,fg33.xx), math.max(x,fg33.xy), math.max(x,fg33.xz), math.max(x,fg33.yx), math.max(x,fg33.yy), math.max(x,fg33.yz), math.max(x,fg33.zx), math.max(x,fg33.zy), math.max(x,fg33.zz))
    def max(dg33: GMat3D) = new IMat3D(math.max((x).toDouble,dg33.xx), math.max((x).toDouble,dg33.xy), math.max((x).toDouble,dg33.xz), math.max((x).toDouble,dg33.yx), math.max((x).toDouble,dg33.yy), math.max((x).toDouble,dg33.yz), math.max((x).toDouble,dg33.zx), math.max((x).toDouble,dg33.zy), math.max((x).toDouble,dg33.zz))
    def max(sg4: GVec4S) = new IVec4F(math.max(x,(sg4.x).toFloat), math.max(x,(sg4.y).toFloat), math.max(x,(sg4.z).toFloat), math.max(x,(sg4.w).toFloat))
    def max(ig4: GVec4I) = new IVec4F(math.max(x,(ig4.x).toFloat), math.max(x,(ig4.y).toFloat), math.max(x,(ig4.z).toFloat), math.max(x,(ig4.w).toFloat))
    def max(lg4: GVec4L) = new IVec4D(math.max((x).toDouble,(lg4.x).toDouble), math.max((x).toDouble,(lg4.y).toDouble), math.max((x).toDouble,(lg4.z).toDouble), math.max((x).toDouble,(lg4.w).toDouble))
    def max(fg4: GVec4F) = new IVec4F(math.max(x,fg4.x), math.max(x,fg4.y), math.max(x,fg4.z), math.max(x,fg4.w))
    def max(dg4: GVec4D) = new IVec4D(math.max((x).toDouble,dg4.x), math.max((x).toDouble,dg4.y), math.max((x).toDouble,dg4.z), math.max((x).toDouble,dg4.w))
    def max(sg44: GMat4S) = new IMat4F(math.max(x,(sg44.xx).toFloat), math.max(x,(sg44.xy).toFloat), math.max(x,(sg44.xz).toFloat), math.max(x,(sg44.xw).toFloat), math.max(x,(sg44.yx).toFloat), math.max(x,(sg44.yy).toFloat), math.max(x,(sg44.yz).toFloat), math.max(x,(sg44.yw).toFloat), math.max(x,(sg44.zx).toFloat), math.max(x,(sg44.zy).toFloat), math.max(x,(sg44.zz).toFloat), math.max(x,(sg44.zw).toFloat), math.max(x,(sg44.wx).toFloat), math.max(x,(sg44.wy).toFloat), math.max(x,(sg44.wz).toFloat), math.max(x,(sg44.ww).toFloat))
    def max(ig44: GMat4I) = new IMat4F(math.max(x,(ig44.xx).toFloat), math.max(x,(ig44.xy).toFloat), math.max(x,(ig44.xz).toFloat), math.max(x,(ig44.xw).toFloat), math.max(x,(ig44.yx).toFloat), math.max(x,(ig44.yy).toFloat), math.max(x,(ig44.yz).toFloat), math.max(x,(ig44.yw).toFloat), math.max(x,(ig44.zx).toFloat), math.max(x,(ig44.zy).toFloat), math.max(x,(ig44.zz).toFloat), math.max(x,(ig44.zw).toFloat), math.max(x,(ig44.wx).toFloat), math.max(x,(ig44.wy).toFloat), math.max(x,(ig44.wz).toFloat), math.max(x,(ig44.ww).toFloat))
    def max(lg44: GMat4L) = new IMat4D(math.max((x).toDouble,(lg44.xx).toDouble), math.max((x).toDouble,(lg44.xy).toDouble), math.max((x).toDouble,(lg44.xz).toDouble), math.max((x).toDouble,(lg44.xw).toDouble), math.max((x).toDouble,(lg44.yx).toDouble), math.max((x).toDouble,(lg44.yy).toDouble), math.max((x).toDouble,(lg44.yz).toDouble), math.max((x).toDouble,(lg44.yw).toDouble), math.max((x).toDouble,(lg44.zx).toDouble), math.max((x).toDouble,(lg44.zy).toDouble), math.max((x).toDouble,(lg44.zz).toDouble), math.max((x).toDouble,(lg44.zw).toDouble), math.max((x).toDouble,(lg44.wx).toDouble), math.max((x).toDouble,(lg44.wy).toDouble), math.max((x).toDouble,(lg44.wz).toDouble), math.max((x).toDouble,(lg44.ww).toDouble))
    def max(fg44: GMat4F) = new IMat4F(math.max(x,fg44.xx), math.max(x,fg44.xy), math.max(x,fg44.xz), math.max(x,fg44.xw), math.max(x,fg44.yx), math.max(x,fg44.yy), math.max(x,fg44.yz), math.max(x,fg44.yw), math.max(x,fg44.zx), math.max(x,fg44.zy), math.max(x,fg44.zz), math.max(x,fg44.zw), math.max(x,fg44.wx), math.max(x,fg44.wy), math.max(x,fg44.wz), math.max(x,fg44.ww))
    def max(dg44: GMat4D) = new IMat4D(math.max((x).toDouble,dg44.xx), math.max((x).toDouble,dg44.xy), math.max((x).toDouble,dg44.xz), math.max((x).toDouble,dg44.xw), math.max((x).toDouble,dg44.yx), math.max((x).toDouble,dg44.yy), math.max((x).toDouble,dg44.yz), math.max((x).toDouble,dg44.yw), math.max((x).toDouble,dg44.zx), math.max((x).toDouble,dg44.zy), math.max((x).toDouble,dg44.zz), math.max((x).toDouble,dg44.zw), math.max((x).toDouble,dg44.wx), math.max((x).toDouble,dg44.wy), math.max((x).toDouble,dg44.wz), math.max((x).toDouble,dg44.ww))
    def min(sg2: GVec2S) = new IVec2F(math.min(x,(sg2.x).toFloat), math.min(x,(sg2.y).toFloat))
    def min(ig2: GVec2I) = new IVec2F(math.min(x,(ig2.x).toFloat), math.min(x,(ig2.y).toFloat))
    def min(lg2: GVec2L) = new IVec2D(math.min((x).toDouble,(lg2.x).toDouble), math.min((x).toDouble,(lg2.y).toDouble))
    def min(fg2: GVec2F) = new IVec2F(math.min(x,fg2.x), math.min(x,fg2.y))
    def min(dg2: GVec2D) = new IVec2D(math.min((x).toDouble,dg2.x), math.min((x).toDouble,dg2.y))
    def min(sg22: GMat2S) = new IMat2F(math.min(x,(sg22.xx).toFloat), math.min(x,(sg22.xy).toFloat), math.min(x,(sg22.yx).toFloat), math.min(x,(sg22.yy).toFloat))
    def min(ig22: GMat2I) = new IMat2F(math.min(x,(ig22.xx).toFloat), math.min(x,(ig22.xy).toFloat), math.min(x,(ig22.yx).toFloat), math.min(x,(ig22.yy).toFloat))
    def min(lg22: GMat2L) = new IMat2D(math.min((x).toDouble,(lg22.xx).toDouble), math.min((x).toDouble,(lg22.xy).toDouble), math.min((x).toDouble,(lg22.yx).toDouble), math.min((x).toDouble,(lg22.yy).toDouble))
    def min(fg22: GMat2F) = new IMat2F(math.min(x,fg22.xx), math.min(x,fg22.xy), math.min(x,fg22.yx), math.min(x,fg22.yy))
    def min(dg22: GMat2D) = new IMat2D(math.min((x).toDouble,dg22.xx), math.min((x).toDouble,dg22.xy), math.min((x).toDouble,dg22.yx), math.min((x).toDouble,dg22.yy))
    def min(sg3: GVec3S) = new IVec3F(math.min(x,(sg3.x).toFloat), math.min(x,(sg3.y).toFloat), math.min(x,(sg3.z).toFloat))
    def min(ig3: GVec3I) = new IVec3F(math.min(x,(ig3.x).toFloat), math.min(x,(ig3.y).toFloat), math.min(x,(ig3.z).toFloat))
    def min(lg3: GVec3L) = new IVec3D(math.min((x).toDouble,(lg3.x).toDouble), math.min((x).toDouble,(lg3.y).toDouble), math.min((x).toDouble,(lg3.z).toDouble))
    def min(fg3: GVec3F) = new IVec3F(math.min(x,fg3.x), math.min(x,fg3.y), math.min(x,fg3.z))
    def min(dg3: GVec3D) = new IVec3D(math.min((x).toDouble,dg3.x), math.min((x).toDouble,dg3.y), math.min((x).toDouble,dg3.z))
    def min(sg33: GMat3S) = new IMat3F(math.min(x,(sg33.xx).toFloat), math.min(x,(sg33.xy).toFloat), math.min(x,(sg33.xz).toFloat), math.min(x,(sg33.yx).toFloat), math.min(x,(sg33.yy).toFloat), math.min(x,(sg33.yz).toFloat), math.min(x,(sg33.zx).toFloat), math.min(x,(sg33.zy).toFloat), math.min(x,(sg33.zz).toFloat))
    def min(ig33: GMat3I) = new IMat3F(math.min(x,(ig33.xx).toFloat), math.min(x,(ig33.xy).toFloat), math.min(x,(ig33.xz).toFloat), math.min(x,(ig33.yx).toFloat), math.min(x,(ig33.yy).toFloat), math.min(x,(ig33.yz).toFloat), math.min(x,(ig33.zx).toFloat), math.min(x,(ig33.zy).toFloat), math.min(x,(ig33.zz).toFloat))
    def min(lg33: GMat3L) = new IMat3D(math.min((x).toDouble,(lg33.xx).toDouble), math.min((x).toDouble,(lg33.xy).toDouble), math.min((x).toDouble,(lg33.xz).toDouble), math.min((x).toDouble,(lg33.yx).toDouble), math.min((x).toDouble,(lg33.yy).toDouble), math.min((x).toDouble,(lg33.yz).toDouble), math.min((x).toDouble,(lg33.zx).toDouble), math.min((x).toDouble,(lg33.zy).toDouble), math.min((x).toDouble,(lg33.zz).toDouble))
    def min(fg33: GMat3F) = new IMat3F(math.min(x,fg33.xx), math.min(x,fg33.xy), math.min(x,fg33.xz), math.min(x,fg33.yx), math.min(x,fg33.yy), math.min(x,fg33.yz), math.min(x,fg33.zx), math.min(x,fg33.zy), math.min(x,fg33.zz))
    def min(dg33: GMat3D) = new IMat3D(math.min((x).toDouble,dg33.xx), math.min((x).toDouble,dg33.xy), math.min((x).toDouble,dg33.xz), math.min((x).toDouble,dg33.yx), math.min((x).toDouble,dg33.yy), math.min((x).toDouble,dg33.yz), math.min((x).toDouble,dg33.zx), math.min((x).toDouble,dg33.zy), math.min((x).toDouble,dg33.zz))
    def min(sg4: GVec4S) = new IVec4F(math.min(x,(sg4.x).toFloat), math.min(x,(sg4.y).toFloat), math.min(x,(sg4.z).toFloat), math.min(x,(sg4.w).toFloat))
    def min(ig4: GVec4I) = new IVec4F(math.min(x,(ig4.x).toFloat), math.min(x,(ig4.y).toFloat), math.min(x,(ig4.z).toFloat), math.min(x,(ig4.w).toFloat))
    def min(lg4: GVec4L) = new IVec4D(math.min((x).toDouble,(lg4.x).toDouble), math.min((x).toDouble,(lg4.y).toDouble), math.min((x).toDouble,(lg4.z).toDouble), math.min((x).toDouble,(lg4.w).toDouble))
    def min(fg4: GVec4F) = new IVec4F(math.min(x,fg4.x), math.min(x,fg4.y), math.min(x,fg4.z), math.min(x,fg4.w))
    def min(dg4: GVec4D) = new IVec4D(math.min((x).toDouble,dg4.x), math.min((x).toDouble,dg4.y), math.min((x).toDouble,dg4.z), math.min((x).toDouble,dg4.w))
    def min(sg44: GMat4S) = new IMat4F(math.min(x,(sg44.xx).toFloat), math.min(x,(sg44.xy).toFloat), math.min(x,(sg44.xz).toFloat), math.min(x,(sg44.xw).toFloat), math.min(x,(sg44.yx).toFloat), math.min(x,(sg44.yy).toFloat), math.min(x,(sg44.yz).toFloat), math.min(x,(sg44.yw).toFloat), math.min(x,(sg44.zx).toFloat), math.min(x,(sg44.zy).toFloat), math.min(x,(sg44.zz).toFloat), math.min(x,(sg44.zw).toFloat), math.min(x,(sg44.wx).toFloat), math.min(x,(sg44.wy).toFloat), math.min(x,(sg44.wz).toFloat), math.min(x,(sg44.ww).toFloat))
    def min(ig44: GMat4I) = new IMat4F(math.min(x,(ig44.xx).toFloat), math.min(x,(ig44.xy).toFloat), math.min(x,(ig44.xz).toFloat), math.min(x,(ig44.xw).toFloat), math.min(x,(ig44.yx).toFloat), math.min(x,(ig44.yy).toFloat), math.min(x,(ig44.yz).toFloat), math.min(x,(ig44.yw).toFloat), math.min(x,(ig44.zx).toFloat), math.min(x,(ig44.zy).toFloat), math.min(x,(ig44.zz).toFloat), math.min(x,(ig44.zw).toFloat), math.min(x,(ig44.wx).toFloat), math.min(x,(ig44.wy).toFloat), math.min(x,(ig44.wz).toFloat), math.min(x,(ig44.ww).toFloat))
    def min(lg44: GMat4L) = new IMat4D(math.min((x).toDouble,(lg44.xx).toDouble), math.min((x).toDouble,(lg44.xy).toDouble), math.min((x).toDouble,(lg44.xz).toDouble), math.min((x).toDouble,(lg44.xw).toDouble), math.min((x).toDouble,(lg44.yx).toDouble), math.min((x).toDouble,(lg44.yy).toDouble), math.min((x).toDouble,(lg44.yz).toDouble), math.min((x).toDouble,(lg44.yw).toDouble), math.min((x).toDouble,(lg44.zx).toDouble), math.min((x).toDouble,(lg44.zy).toDouble), math.min((x).toDouble,(lg44.zz).toDouble), math.min((x).toDouble,(lg44.zw).toDouble), math.min((x).toDouble,(lg44.wx).toDouble), math.min((x).toDouble,(lg44.wy).toDouble), math.min((x).toDouble,(lg44.wz).toDouble), math.min((x).toDouble,(lg44.ww).toDouble))
    def min(fg44: GMat4F) = new IMat4F(math.min(x,fg44.xx), math.min(x,fg44.xy), math.min(x,fg44.xz), math.min(x,fg44.xw), math.min(x,fg44.yx), math.min(x,fg44.yy), math.min(x,fg44.yz), math.min(x,fg44.yw), math.min(x,fg44.zx), math.min(x,fg44.zy), math.min(x,fg44.zz), math.min(x,fg44.zw), math.min(x,fg44.wx), math.min(x,fg44.wy), math.min(x,fg44.wz), math.min(x,fg44.ww))
    def min(dg44: GMat4D) = new IMat4D(math.min((x).toDouble,dg44.xx), math.min((x).toDouble,dg44.xy), math.min((x).toDouble,dg44.xz), math.min((x).toDouble,dg44.xw), math.min((x).toDouble,dg44.yx), math.min((x).toDouble,dg44.yy), math.min((x).toDouble,dg44.yz), math.min((x).toDouble,dg44.yw), math.min((x).toDouble,dg44.zx), math.min((x).toDouble,dg44.zy), math.min((x).toDouble,dg44.zz), math.min((x).toDouble,dg44.zw), math.min((x).toDouble,dg44.wx), math.min((x).toDouble,dg44.wy), math.min((x).toDouble,dg44.wz), math.min((x).toDouble,dg44.ww))
  } // class ScalarF

  object ScalarF {
    def close(a: Float, b: Float, eps: Float) = eps*math.max(1.0,a*a+b*b) >= (a-b)*(a-b)
  } // object ScalarF


  final class ScalarD(val x: Double) extends Cloneable {
    override def toString = "["+x+"]"
    override def hashCode = x.##
    override def equals(any: Any) = any match { case sg1: ScalarS => {x==sg1.x }; case ig1: ScalarI => {x==ig1.x }; case lg1: ScalarL => {x==lg1.x }; case fg1: ScalarF => {x==fg1.x }; case dg1: ScalarD => {x==dg1.x }; case _ => false }
    override def clone(): ScalarD = new ScalarD(x)
    def copy(x0: Double = x): ScalarD = new ScalarD(x0)
    def +(sg2: GVec2S) = new IVec2D(x + (sg2.x).toDouble, x + (sg2.y).toDouble)
    def +(ig2: GVec2I) = new IVec2D(x + (ig2.x).toDouble, x + (ig2.y).toDouble)
    def +(lg2: GVec2L) = new IVec2D(x + (lg2.x).toDouble, x + (lg2.y).toDouble)
    def +(fg2: GVec2F) = new IVec2D(x + (fg2.x).toDouble, x + (fg2.y).toDouble)
    def +(dg2: GVec2D) = new IVec2D(x + dg2.x, x + dg2.y)
    def +(sg22: GMat2S) = new IMat2D(x + (sg22.xx).toDouble, x + (sg22.xy).toDouble, x + (sg22.yx).toDouble, x + (sg22.yy).toDouble)
    def +(ig22: GMat2I) = new IMat2D(x + (ig22.xx).toDouble, x + (ig22.xy).toDouble, x + (ig22.yx).toDouble, x + (ig22.yy).toDouble)
    def +(lg22: GMat2L) = new IMat2D(x + (lg22.xx).toDouble, x + (lg22.xy).toDouble, x + (lg22.yx).toDouble, x + (lg22.yy).toDouble)
    def +(fg22: GMat2F) = new IMat2D(x + (fg22.xx).toDouble, x + (fg22.xy).toDouble, x + (fg22.yx).toDouble, x + (fg22.yy).toDouble)
    def +(dg22: GMat2D) = new IMat2D(x + dg22.xx, x + dg22.xy, x + dg22.yx, x + dg22.yy)
    def +(sg3: GVec3S) = new IVec3D(x + (sg3.x).toDouble, x + (sg3.y).toDouble, x + (sg3.z).toDouble)
    def +(ig3: GVec3I) = new IVec3D(x + (ig3.x).toDouble, x + (ig3.y).toDouble, x + (ig3.z).toDouble)
    def +(lg3: GVec3L) = new IVec3D(x + (lg3.x).toDouble, x + (lg3.y).toDouble, x + (lg3.z).toDouble)
    def +(fg3: GVec3F) = new IVec3D(x + (fg3.x).toDouble, x + (fg3.y).toDouble, x + (fg3.z).toDouble)
    def +(dg3: GVec3D) = new IVec3D(x + dg3.x, x + dg3.y, x + dg3.z)
    def +(sg33: GMat3S) = new IMat3D(x + (sg33.xx).toDouble, x + (sg33.xy).toDouble, x + (sg33.xz).toDouble, x + (sg33.yx).toDouble, x + (sg33.yy).toDouble, x + (sg33.yz).toDouble, x + (sg33.zx).toDouble, x + (sg33.zy).toDouble, x + (sg33.zz).toDouble)
    def +(ig33: GMat3I) = new IMat3D(x + (ig33.xx).toDouble, x + (ig33.xy).toDouble, x + (ig33.xz).toDouble, x + (ig33.yx).toDouble, x + (ig33.yy).toDouble, x + (ig33.yz).toDouble, x + (ig33.zx).toDouble, x + (ig33.zy).toDouble, x + (ig33.zz).toDouble)
    def +(lg33: GMat3L) = new IMat3D(x + (lg33.xx).toDouble, x + (lg33.xy).toDouble, x + (lg33.xz).toDouble, x + (lg33.yx).toDouble, x + (lg33.yy).toDouble, x + (lg33.yz).toDouble, x + (lg33.zx).toDouble, x + (lg33.zy).toDouble, x + (lg33.zz).toDouble)
    def +(fg33: GMat3F) = new IMat3D(x + (fg33.xx).toDouble, x + (fg33.xy).toDouble, x + (fg33.xz).toDouble, x + (fg33.yx).toDouble, x + (fg33.yy).toDouble, x + (fg33.yz).toDouble, x + (fg33.zx).toDouble, x + (fg33.zy).toDouble, x + (fg33.zz).toDouble)
    def +(dg33: GMat3D) = new IMat3D(x + dg33.xx, x + dg33.xy, x + dg33.xz, x + dg33.yx, x + dg33.yy, x + dg33.yz, x + dg33.zx, x + dg33.zy, x + dg33.zz)
    def +(sg4: GVec4S) = new IVec4D(x + (sg4.x).toDouble, x + (sg4.y).toDouble, x + (sg4.z).toDouble, x + (sg4.w).toDouble)
    def +(ig4: GVec4I) = new IVec4D(x + (ig4.x).toDouble, x + (ig4.y).toDouble, x + (ig4.z).toDouble, x + (ig4.w).toDouble)
    def +(lg4: GVec4L) = new IVec4D(x + (lg4.x).toDouble, x + (lg4.y).toDouble, x + (lg4.z).toDouble, x + (lg4.w).toDouble)
    def +(fg4: GVec4F) = new IVec4D(x + (fg4.x).toDouble, x + (fg4.y).toDouble, x + (fg4.z).toDouble, x + (fg4.w).toDouble)
    def +(dg4: GVec4D) = new IVec4D(x + dg4.x, x + dg4.y, x + dg4.z, x + dg4.w)
    def +(sg44: GMat4S) = new IMat4D(x + (sg44.xx).toDouble, x + (sg44.xy).toDouble, x + (sg44.xz).toDouble, x + (sg44.xw).toDouble, x + (sg44.yx).toDouble, x + (sg44.yy).toDouble, x + (sg44.yz).toDouble, x + (sg44.yw).toDouble, x + (sg44.zx).toDouble, x + (sg44.zy).toDouble, x + (sg44.zz).toDouble, x + (sg44.zw).toDouble, x + (sg44.wx).toDouble, x + (sg44.wy).toDouble, x + (sg44.wz).toDouble, x + (sg44.ww).toDouble)
    def +(ig44: GMat4I) = new IMat4D(x + (ig44.xx).toDouble, x + (ig44.xy).toDouble, x + (ig44.xz).toDouble, x + (ig44.xw).toDouble, x + (ig44.yx).toDouble, x + (ig44.yy).toDouble, x + (ig44.yz).toDouble, x + (ig44.yw).toDouble, x + (ig44.zx).toDouble, x + (ig44.zy).toDouble, x + (ig44.zz).toDouble, x + (ig44.zw).toDouble, x + (ig44.wx).toDouble, x + (ig44.wy).toDouble, x + (ig44.wz).toDouble, x + (ig44.ww).toDouble)
    def +(lg44: GMat4L) = new IMat4D(x + (lg44.xx).toDouble, x + (lg44.xy).toDouble, x + (lg44.xz).toDouble, x + (lg44.xw).toDouble, x + (lg44.yx).toDouble, x + (lg44.yy).toDouble, x + (lg44.yz).toDouble, x + (lg44.yw).toDouble, x + (lg44.zx).toDouble, x + (lg44.zy).toDouble, x + (lg44.zz).toDouble, x + (lg44.zw).toDouble, x + (lg44.wx).toDouble, x + (lg44.wy).toDouble, x + (lg44.wz).toDouble, x + (lg44.ww).toDouble)
    def +(fg44: GMat4F) = new IMat4D(x + (fg44.xx).toDouble, x + (fg44.xy).toDouble, x + (fg44.xz).toDouble, x + (fg44.xw).toDouble, x + (fg44.yx).toDouble, x + (fg44.yy).toDouble, x + (fg44.yz).toDouble, x + (fg44.yw).toDouble, x + (fg44.zx).toDouble, x + (fg44.zy).toDouble, x + (fg44.zz).toDouble, x + (fg44.zw).toDouble, x + (fg44.wx).toDouble, x + (fg44.wy).toDouble, x + (fg44.wz).toDouble, x + (fg44.ww).toDouble)
    def +(dg44: GMat4D) = new IMat4D(x + dg44.xx, x + dg44.xy, x + dg44.xz, x + dg44.xw, x + dg44.yx, x + dg44.yy, x + dg44.yz, x + dg44.yw, x + dg44.zx, x + dg44.zy, x + dg44.zz, x + dg44.zw, x + dg44.wx, x + dg44.wy, x + dg44.wz, x + dg44.ww)
    def -(sg2: GVec2S) = new IVec2D(x - (sg2.x).toDouble, x - (sg2.y).toDouble)
    def -(ig2: GVec2I) = new IVec2D(x - (ig2.x).toDouble, x - (ig2.y).toDouble)
    def -(lg2: GVec2L) = new IVec2D(x - (lg2.x).toDouble, x - (lg2.y).toDouble)
    def -(fg2: GVec2F) = new IVec2D(x - (fg2.x).toDouble, x - (fg2.y).toDouble)
    def -(dg2: GVec2D) = new IVec2D(x - dg2.x, x - dg2.y)
    def -(sg22: GMat2S) = new IMat2D(x - (sg22.xx).toDouble, x - (sg22.xy).toDouble, x - (sg22.yx).toDouble, x - (sg22.yy).toDouble)
    def -(ig22: GMat2I) = new IMat2D(x - (ig22.xx).toDouble, x - (ig22.xy).toDouble, x - (ig22.yx).toDouble, x - (ig22.yy).toDouble)
    def -(lg22: GMat2L) = new IMat2D(x - (lg22.xx).toDouble, x - (lg22.xy).toDouble, x - (lg22.yx).toDouble, x - (lg22.yy).toDouble)
    def -(fg22: GMat2F) = new IMat2D(x - (fg22.xx).toDouble, x - (fg22.xy).toDouble, x - (fg22.yx).toDouble, x - (fg22.yy).toDouble)
    def -(dg22: GMat2D) = new IMat2D(x - dg22.xx, x - dg22.xy, x - dg22.yx, x - dg22.yy)
    def -(sg3: GVec3S) = new IVec3D(x - (sg3.x).toDouble, x - (sg3.y).toDouble, x - (sg3.z).toDouble)
    def -(ig3: GVec3I) = new IVec3D(x - (ig3.x).toDouble, x - (ig3.y).toDouble, x - (ig3.z).toDouble)
    def -(lg3: GVec3L) = new IVec3D(x - (lg3.x).toDouble, x - (lg3.y).toDouble, x - (lg3.z).toDouble)
    def -(fg3: GVec3F) = new IVec3D(x - (fg3.x).toDouble, x - (fg3.y).toDouble, x - (fg3.z).toDouble)
    def -(dg3: GVec3D) = new IVec3D(x - dg3.x, x - dg3.y, x - dg3.z)
    def -(sg33: GMat3S) = new IMat3D(x - (sg33.xx).toDouble, x - (sg33.xy).toDouble, x - (sg33.xz).toDouble, x - (sg33.yx).toDouble, x - (sg33.yy).toDouble, x - (sg33.yz).toDouble, x - (sg33.zx).toDouble, x - (sg33.zy).toDouble, x - (sg33.zz).toDouble)
    def -(ig33: GMat3I) = new IMat3D(x - (ig33.xx).toDouble, x - (ig33.xy).toDouble, x - (ig33.xz).toDouble, x - (ig33.yx).toDouble, x - (ig33.yy).toDouble, x - (ig33.yz).toDouble, x - (ig33.zx).toDouble, x - (ig33.zy).toDouble, x - (ig33.zz).toDouble)
    def -(lg33: GMat3L) = new IMat3D(x - (lg33.xx).toDouble, x - (lg33.xy).toDouble, x - (lg33.xz).toDouble, x - (lg33.yx).toDouble, x - (lg33.yy).toDouble, x - (lg33.yz).toDouble, x - (lg33.zx).toDouble, x - (lg33.zy).toDouble, x - (lg33.zz).toDouble)
    def -(fg33: GMat3F) = new IMat3D(x - (fg33.xx).toDouble, x - (fg33.xy).toDouble, x - (fg33.xz).toDouble, x - (fg33.yx).toDouble, x - (fg33.yy).toDouble, x - (fg33.yz).toDouble, x - (fg33.zx).toDouble, x - (fg33.zy).toDouble, x - (fg33.zz).toDouble)
    def -(dg33: GMat3D) = new IMat3D(x - dg33.xx, x - dg33.xy, x - dg33.xz, x - dg33.yx, x - dg33.yy, x - dg33.yz, x - dg33.zx, x - dg33.zy, x - dg33.zz)
    def -(sg4: GVec4S) = new IVec4D(x - (sg4.x).toDouble, x - (sg4.y).toDouble, x - (sg4.z).toDouble, x - (sg4.w).toDouble)
    def -(ig4: GVec4I) = new IVec4D(x - (ig4.x).toDouble, x - (ig4.y).toDouble, x - (ig4.z).toDouble, x - (ig4.w).toDouble)
    def -(lg4: GVec4L) = new IVec4D(x - (lg4.x).toDouble, x - (lg4.y).toDouble, x - (lg4.z).toDouble, x - (lg4.w).toDouble)
    def -(fg4: GVec4F) = new IVec4D(x - (fg4.x).toDouble, x - (fg4.y).toDouble, x - (fg4.z).toDouble, x - (fg4.w).toDouble)
    def -(dg4: GVec4D) = new IVec4D(x - dg4.x, x - dg4.y, x - dg4.z, x - dg4.w)
    def -(sg44: GMat4S) = new IMat4D(x - (sg44.xx).toDouble, x - (sg44.xy).toDouble, x - (sg44.xz).toDouble, x - (sg44.xw).toDouble, x - (sg44.yx).toDouble, x - (sg44.yy).toDouble, x - (sg44.yz).toDouble, x - (sg44.yw).toDouble, x - (sg44.zx).toDouble, x - (sg44.zy).toDouble, x - (sg44.zz).toDouble, x - (sg44.zw).toDouble, x - (sg44.wx).toDouble, x - (sg44.wy).toDouble, x - (sg44.wz).toDouble, x - (sg44.ww).toDouble)
    def -(ig44: GMat4I) = new IMat4D(x - (ig44.xx).toDouble, x - (ig44.xy).toDouble, x - (ig44.xz).toDouble, x - (ig44.xw).toDouble, x - (ig44.yx).toDouble, x - (ig44.yy).toDouble, x - (ig44.yz).toDouble, x - (ig44.yw).toDouble, x - (ig44.zx).toDouble, x - (ig44.zy).toDouble, x - (ig44.zz).toDouble, x - (ig44.zw).toDouble, x - (ig44.wx).toDouble, x - (ig44.wy).toDouble, x - (ig44.wz).toDouble, x - (ig44.ww).toDouble)
    def -(lg44: GMat4L) = new IMat4D(x - (lg44.xx).toDouble, x - (lg44.xy).toDouble, x - (lg44.xz).toDouble, x - (lg44.xw).toDouble, x - (lg44.yx).toDouble, x - (lg44.yy).toDouble, x - (lg44.yz).toDouble, x - (lg44.yw).toDouble, x - (lg44.zx).toDouble, x - (lg44.zy).toDouble, x - (lg44.zz).toDouble, x - (lg44.zw).toDouble, x - (lg44.wx).toDouble, x - (lg44.wy).toDouble, x - (lg44.wz).toDouble, x - (lg44.ww).toDouble)
    def -(fg44: GMat4F) = new IMat4D(x - (fg44.xx).toDouble, x - (fg44.xy).toDouble, x - (fg44.xz).toDouble, x - (fg44.xw).toDouble, x - (fg44.yx).toDouble, x - (fg44.yy).toDouble, x - (fg44.yz).toDouble, x - (fg44.yw).toDouble, x - (fg44.zx).toDouble, x - (fg44.zy).toDouble, x - (fg44.zz).toDouble, x - (fg44.zw).toDouble, x - (fg44.wx).toDouble, x - (fg44.wy).toDouble, x - (fg44.wz).toDouble, x - (fg44.ww).toDouble)
    def -(dg44: GMat4D) = new IMat4D(x - dg44.xx, x - dg44.xy, x - dg44.xz, x - dg44.xw, x - dg44.yx, x - dg44.yy, x - dg44.yz, x - dg44.yw, x - dg44.zx, x - dg44.zy, x - dg44.zz, x - dg44.zw, x - dg44.wx, x - dg44.wy, x - dg44.wz, x - dg44.ww)
    def *(sg2: GVec2S) = new IVec2D(x * (sg2.x).toDouble, x * (sg2.y).toDouble)
    def *(ig2: GVec2I) = new IVec2D(x * (ig2.x).toDouble, x * (ig2.y).toDouble)
    def *(lg2: GVec2L) = new IVec2D(x * (lg2.x).toDouble, x * (lg2.y).toDouble)
    def *(fg2: GVec2F) = new IVec2D(x * (fg2.x).toDouble, x * (fg2.y).toDouble)
    def *(dg2: GVec2D) = new IVec2D(x * dg2.x, x * dg2.y)
    def *(sg22: GMat2S) = new IMat2D(x * (sg22.xx).toDouble, x * (sg22.xy).toDouble, x * (sg22.yx).toDouble, x * (sg22.yy).toDouble)
    def *(ig22: GMat2I) = new IMat2D(x * (ig22.xx).toDouble, x * (ig22.xy).toDouble, x * (ig22.yx).toDouble, x * (ig22.yy).toDouble)
    def *(lg22: GMat2L) = new IMat2D(x * (lg22.xx).toDouble, x * (lg22.xy).toDouble, x * (lg22.yx).toDouble, x * (lg22.yy).toDouble)
    def *(fg22: GMat2F) = new IMat2D(x * (fg22.xx).toDouble, x * (fg22.xy).toDouble, x * (fg22.yx).toDouble, x * (fg22.yy).toDouble)
    def *(dg22: GMat2D) = new IMat2D(x * dg22.xx, x * dg22.xy, x * dg22.yx, x * dg22.yy)
    def *(sg3: GVec3S) = new IVec3D(x * (sg3.x).toDouble, x * (sg3.y).toDouble, x * (sg3.z).toDouble)
    def *(ig3: GVec3I) = new IVec3D(x * (ig3.x).toDouble, x * (ig3.y).toDouble, x * (ig3.z).toDouble)
    def *(lg3: GVec3L) = new IVec3D(x * (lg3.x).toDouble, x * (lg3.y).toDouble, x * (lg3.z).toDouble)
    def *(fg3: GVec3F) = new IVec3D(x * (fg3.x).toDouble, x * (fg3.y).toDouble, x * (fg3.z).toDouble)
    def *(dg3: GVec3D) = new IVec3D(x * dg3.x, x * dg3.y, x * dg3.z)
    def *(sg33: GMat3S) = new IMat3D(x * (sg33.xx).toDouble, x * (sg33.xy).toDouble, x * (sg33.xz).toDouble, x * (sg33.yx).toDouble, x * (sg33.yy).toDouble, x * (sg33.yz).toDouble, x * (sg33.zx).toDouble, x * (sg33.zy).toDouble, x * (sg33.zz).toDouble)
    def *(ig33: GMat3I) = new IMat3D(x * (ig33.xx).toDouble, x * (ig33.xy).toDouble, x * (ig33.xz).toDouble, x * (ig33.yx).toDouble, x * (ig33.yy).toDouble, x * (ig33.yz).toDouble, x * (ig33.zx).toDouble, x * (ig33.zy).toDouble, x * (ig33.zz).toDouble)
    def *(lg33: GMat3L) = new IMat3D(x * (lg33.xx).toDouble, x * (lg33.xy).toDouble, x * (lg33.xz).toDouble, x * (lg33.yx).toDouble, x * (lg33.yy).toDouble, x * (lg33.yz).toDouble, x * (lg33.zx).toDouble, x * (lg33.zy).toDouble, x * (lg33.zz).toDouble)
    def *(fg33: GMat3F) = new IMat3D(x * (fg33.xx).toDouble, x * (fg33.xy).toDouble, x * (fg33.xz).toDouble, x * (fg33.yx).toDouble, x * (fg33.yy).toDouble, x * (fg33.yz).toDouble, x * (fg33.zx).toDouble, x * (fg33.zy).toDouble, x * (fg33.zz).toDouble)
    def *(dg33: GMat3D) = new IMat3D(x * dg33.xx, x * dg33.xy, x * dg33.xz, x * dg33.yx, x * dg33.yy, x * dg33.yz, x * dg33.zx, x * dg33.zy, x * dg33.zz)
    def *(sg4: GVec4S) = new IVec4D(x * (sg4.x).toDouble, x * (sg4.y).toDouble, x * (sg4.z).toDouble, x * (sg4.w).toDouble)
    def *(ig4: GVec4I) = new IVec4D(x * (ig4.x).toDouble, x * (ig4.y).toDouble, x * (ig4.z).toDouble, x * (ig4.w).toDouble)
    def *(lg4: GVec4L) = new IVec4D(x * (lg4.x).toDouble, x * (lg4.y).toDouble, x * (lg4.z).toDouble, x * (lg4.w).toDouble)
    def *(fg4: GVec4F) = new IVec4D(x * (fg4.x).toDouble, x * (fg4.y).toDouble, x * (fg4.z).toDouble, x * (fg4.w).toDouble)
    def *(dg4: GVec4D) = new IVec4D(x * dg4.x, x * dg4.y, x * dg4.z, x * dg4.w)
    def *(sg44: GMat4S) = new IMat4D(x * (sg44.xx).toDouble, x * (sg44.xy).toDouble, x * (sg44.xz).toDouble, x * (sg44.xw).toDouble, x * (sg44.yx).toDouble, x * (sg44.yy).toDouble, x * (sg44.yz).toDouble, x * (sg44.yw).toDouble, x * (sg44.zx).toDouble, x * (sg44.zy).toDouble, x * (sg44.zz).toDouble, x * (sg44.zw).toDouble, x * (sg44.wx).toDouble, x * (sg44.wy).toDouble, x * (sg44.wz).toDouble, x * (sg44.ww).toDouble)
    def *(ig44: GMat4I) = new IMat4D(x * (ig44.xx).toDouble, x * (ig44.xy).toDouble, x * (ig44.xz).toDouble, x * (ig44.xw).toDouble, x * (ig44.yx).toDouble, x * (ig44.yy).toDouble, x * (ig44.yz).toDouble, x * (ig44.yw).toDouble, x * (ig44.zx).toDouble, x * (ig44.zy).toDouble, x * (ig44.zz).toDouble, x * (ig44.zw).toDouble, x * (ig44.wx).toDouble, x * (ig44.wy).toDouble, x * (ig44.wz).toDouble, x * (ig44.ww).toDouble)
    def *(lg44: GMat4L) = new IMat4D(x * (lg44.xx).toDouble, x * (lg44.xy).toDouble, x * (lg44.xz).toDouble, x * (lg44.xw).toDouble, x * (lg44.yx).toDouble, x * (lg44.yy).toDouble, x * (lg44.yz).toDouble, x * (lg44.yw).toDouble, x * (lg44.zx).toDouble, x * (lg44.zy).toDouble, x * (lg44.zz).toDouble, x * (lg44.zw).toDouble, x * (lg44.wx).toDouble, x * (lg44.wy).toDouble, x * (lg44.wz).toDouble, x * (lg44.ww).toDouble)
    def *(fg44: GMat4F) = new IMat4D(x * (fg44.xx).toDouble, x * (fg44.xy).toDouble, x * (fg44.xz).toDouble, x * (fg44.xw).toDouble, x * (fg44.yx).toDouble, x * (fg44.yy).toDouble, x * (fg44.yz).toDouble, x * (fg44.yw).toDouble, x * (fg44.zx).toDouble, x * (fg44.zy).toDouble, x * (fg44.zz).toDouble, x * (fg44.zw).toDouble, x * (fg44.wx).toDouble, x * (fg44.wy).toDouble, x * (fg44.wz).toDouble, x * (fg44.ww).toDouble)
    def *(dg44: GMat4D) = new IMat4D(x * dg44.xx, x * dg44.xy, x * dg44.xz, x * dg44.xw, x * dg44.yx, x * dg44.yy, x * dg44.yz, x * dg44.yw, x * dg44.zx, x * dg44.zy, x * dg44.zz, x * dg44.zw, x * dg44.wx, x * dg44.wy, x * dg44.wz, x * dg44.ww)
    def max(sg2: GVec2S) = new IVec2D(math.max(x,(sg2.x).toDouble), math.max(x,(sg2.y).toDouble))
    def max(ig2: GVec2I) = new IVec2D(math.max(x,(ig2.x).toDouble), math.max(x,(ig2.y).toDouble))
    def max(lg2: GVec2L) = new IVec2D(math.max(x,(lg2.x).toDouble), math.max(x,(lg2.y).toDouble))
    def max(fg2: GVec2F) = new IVec2D(math.max(x,(fg2.x).toDouble), math.max(x,(fg2.y).toDouble))
    def max(dg2: GVec2D) = new IVec2D(math.max(x,dg2.x), math.max(x,dg2.y))
    def max(sg22: GMat2S) = new IMat2D(math.max(x,(sg22.xx).toDouble), math.max(x,(sg22.xy).toDouble), math.max(x,(sg22.yx).toDouble), math.max(x,(sg22.yy).toDouble))
    def max(ig22: GMat2I) = new IMat2D(math.max(x,(ig22.xx).toDouble), math.max(x,(ig22.xy).toDouble), math.max(x,(ig22.yx).toDouble), math.max(x,(ig22.yy).toDouble))
    def max(lg22: GMat2L) = new IMat2D(math.max(x,(lg22.xx).toDouble), math.max(x,(lg22.xy).toDouble), math.max(x,(lg22.yx).toDouble), math.max(x,(lg22.yy).toDouble))
    def max(fg22: GMat2F) = new IMat2D(math.max(x,(fg22.xx).toDouble), math.max(x,(fg22.xy).toDouble), math.max(x,(fg22.yx).toDouble), math.max(x,(fg22.yy).toDouble))
    def max(dg22: GMat2D) = new IMat2D(math.max(x,dg22.xx), math.max(x,dg22.xy), math.max(x,dg22.yx), math.max(x,dg22.yy))
    def max(sg3: GVec3S) = new IVec3D(math.max(x,(sg3.x).toDouble), math.max(x,(sg3.y).toDouble), math.max(x,(sg3.z).toDouble))
    def max(ig3: GVec3I) = new IVec3D(math.max(x,(ig3.x).toDouble), math.max(x,(ig3.y).toDouble), math.max(x,(ig3.z).toDouble))
    def max(lg3: GVec3L) = new IVec3D(math.max(x,(lg3.x).toDouble), math.max(x,(lg3.y).toDouble), math.max(x,(lg3.z).toDouble))
    def max(fg3: GVec3F) = new IVec3D(math.max(x,(fg3.x).toDouble), math.max(x,(fg3.y).toDouble), math.max(x,(fg3.z).toDouble))
    def max(dg3: GVec3D) = new IVec3D(math.max(x,dg3.x), math.max(x,dg3.y), math.max(x,dg3.z))
    def max(sg33: GMat3S) = new IMat3D(math.max(x,(sg33.xx).toDouble), math.max(x,(sg33.xy).toDouble), math.max(x,(sg33.xz).toDouble), math.max(x,(sg33.yx).toDouble), math.max(x,(sg33.yy).toDouble), math.max(x,(sg33.yz).toDouble), math.max(x,(sg33.zx).toDouble), math.max(x,(sg33.zy).toDouble), math.max(x,(sg33.zz).toDouble))
    def max(ig33: GMat3I) = new IMat3D(math.max(x,(ig33.xx).toDouble), math.max(x,(ig33.xy).toDouble), math.max(x,(ig33.xz).toDouble), math.max(x,(ig33.yx).toDouble), math.max(x,(ig33.yy).toDouble), math.max(x,(ig33.yz).toDouble), math.max(x,(ig33.zx).toDouble), math.max(x,(ig33.zy).toDouble), math.max(x,(ig33.zz).toDouble))
    def max(lg33: GMat3L) = new IMat3D(math.max(x,(lg33.xx).toDouble), math.max(x,(lg33.xy).toDouble), math.max(x,(lg33.xz).toDouble), math.max(x,(lg33.yx).toDouble), math.max(x,(lg33.yy).toDouble), math.max(x,(lg33.yz).toDouble), math.max(x,(lg33.zx).toDouble), math.max(x,(lg33.zy).toDouble), math.max(x,(lg33.zz).toDouble))
    def max(fg33: GMat3F) = new IMat3D(math.max(x,(fg33.xx).toDouble), math.max(x,(fg33.xy).toDouble), math.max(x,(fg33.xz).toDouble), math.max(x,(fg33.yx).toDouble), math.max(x,(fg33.yy).toDouble), math.max(x,(fg33.yz).toDouble), math.max(x,(fg33.zx).toDouble), math.max(x,(fg33.zy).toDouble), math.max(x,(fg33.zz).toDouble))
    def max(dg33: GMat3D) = new IMat3D(math.max(x,dg33.xx), math.max(x,dg33.xy), math.max(x,dg33.xz), math.max(x,dg33.yx), math.max(x,dg33.yy), math.max(x,dg33.yz), math.max(x,dg33.zx), math.max(x,dg33.zy), math.max(x,dg33.zz))
    def max(sg4: GVec4S) = new IVec4D(math.max(x,(sg4.x).toDouble), math.max(x,(sg4.y).toDouble), math.max(x,(sg4.z).toDouble), math.max(x,(sg4.w).toDouble))
    def max(ig4: GVec4I) = new IVec4D(math.max(x,(ig4.x).toDouble), math.max(x,(ig4.y).toDouble), math.max(x,(ig4.z).toDouble), math.max(x,(ig4.w).toDouble))
    def max(lg4: GVec4L) = new IVec4D(math.max(x,(lg4.x).toDouble), math.max(x,(lg4.y).toDouble), math.max(x,(lg4.z).toDouble), math.max(x,(lg4.w).toDouble))
    def max(fg4: GVec4F) = new IVec4D(math.max(x,(fg4.x).toDouble), math.max(x,(fg4.y).toDouble), math.max(x,(fg4.z).toDouble), math.max(x,(fg4.w).toDouble))
    def max(dg4: GVec4D) = new IVec4D(math.max(x,dg4.x), math.max(x,dg4.y), math.max(x,dg4.z), math.max(x,dg4.w))
    def max(sg44: GMat4S) = new IMat4D(math.max(x,(sg44.xx).toDouble), math.max(x,(sg44.xy).toDouble), math.max(x,(sg44.xz).toDouble), math.max(x,(sg44.xw).toDouble), math.max(x,(sg44.yx).toDouble), math.max(x,(sg44.yy).toDouble), math.max(x,(sg44.yz).toDouble), math.max(x,(sg44.yw).toDouble), math.max(x,(sg44.zx).toDouble), math.max(x,(sg44.zy).toDouble), math.max(x,(sg44.zz).toDouble), math.max(x,(sg44.zw).toDouble), math.max(x,(sg44.wx).toDouble), math.max(x,(sg44.wy).toDouble), math.max(x,(sg44.wz).toDouble), math.max(x,(sg44.ww).toDouble))
    def max(ig44: GMat4I) = new IMat4D(math.max(x,(ig44.xx).toDouble), math.max(x,(ig44.xy).toDouble), math.max(x,(ig44.xz).toDouble), math.max(x,(ig44.xw).toDouble), math.max(x,(ig44.yx).toDouble), math.max(x,(ig44.yy).toDouble), math.max(x,(ig44.yz).toDouble), math.max(x,(ig44.yw).toDouble), math.max(x,(ig44.zx).toDouble), math.max(x,(ig44.zy).toDouble), math.max(x,(ig44.zz).toDouble), math.max(x,(ig44.zw).toDouble), math.max(x,(ig44.wx).toDouble), math.max(x,(ig44.wy).toDouble), math.max(x,(ig44.wz).toDouble), math.max(x,(ig44.ww).toDouble))
    def max(lg44: GMat4L) = new IMat4D(math.max(x,(lg44.xx).toDouble), math.max(x,(lg44.xy).toDouble), math.max(x,(lg44.xz).toDouble), math.max(x,(lg44.xw).toDouble), math.max(x,(lg44.yx).toDouble), math.max(x,(lg44.yy).toDouble), math.max(x,(lg44.yz).toDouble), math.max(x,(lg44.yw).toDouble), math.max(x,(lg44.zx).toDouble), math.max(x,(lg44.zy).toDouble), math.max(x,(lg44.zz).toDouble), math.max(x,(lg44.zw).toDouble), math.max(x,(lg44.wx).toDouble), math.max(x,(lg44.wy).toDouble), math.max(x,(lg44.wz).toDouble), math.max(x,(lg44.ww).toDouble))
    def max(fg44: GMat4F) = new IMat4D(math.max(x,(fg44.xx).toDouble), math.max(x,(fg44.xy).toDouble), math.max(x,(fg44.xz).toDouble), math.max(x,(fg44.xw).toDouble), math.max(x,(fg44.yx).toDouble), math.max(x,(fg44.yy).toDouble), math.max(x,(fg44.yz).toDouble), math.max(x,(fg44.yw).toDouble), math.max(x,(fg44.zx).toDouble), math.max(x,(fg44.zy).toDouble), math.max(x,(fg44.zz).toDouble), math.max(x,(fg44.zw).toDouble), math.max(x,(fg44.wx).toDouble), math.max(x,(fg44.wy).toDouble), math.max(x,(fg44.wz).toDouble), math.max(x,(fg44.ww).toDouble))
    def max(dg44: GMat4D) = new IMat4D(math.max(x,dg44.xx), math.max(x,dg44.xy), math.max(x,dg44.xz), math.max(x,dg44.xw), math.max(x,dg44.yx), math.max(x,dg44.yy), math.max(x,dg44.yz), math.max(x,dg44.yw), math.max(x,dg44.zx), math.max(x,dg44.zy), math.max(x,dg44.zz), math.max(x,dg44.zw), math.max(x,dg44.wx), math.max(x,dg44.wy), math.max(x,dg44.wz), math.max(x,dg44.ww))
    def min(sg2: GVec2S) = new IVec2D(math.min(x,(sg2.x).toDouble), math.min(x,(sg2.y).toDouble))
    def min(ig2: GVec2I) = new IVec2D(math.min(x,(ig2.x).toDouble), math.min(x,(ig2.y).toDouble))
    def min(lg2: GVec2L) = new IVec2D(math.min(x,(lg2.x).toDouble), math.min(x,(lg2.y).toDouble))
    def min(fg2: GVec2F) = new IVec2D(math.min(x,(fg2.x).toDouble), math.min(x,(fg2.y).toDouble))
    def min(dg2: GVec2D) = new IVec2D(math.min(x,dg2.x), math.min(x,dg2.y))
    def min(sg22: GMat2S) = new IMat2D(math.min(x,(sg22.xx).toDouble), math.min(x,(sg22.xy).toDouble), math.min(x,(sg22.yx).toDouble), math.min(x,(sg22.yy).toDouble))
    def min(ig22: GMat2I) = new IMat2D(math.min(x,(ig22.xx).toDouble), math.min(x,(ig22.xy).toDouble), math.min(x,(ig22.yx).toDouble), math.min(x,(ig22.yy).toDouble))
    def min(lg22: GMat2L) = new IMat2D(math.min(x,(lg22.xx).toDouble), math.min(x,(lg22.xy).toDouble), math.min(x,(lg22.yx).toDouble), math.min(x,(lg22.yy).toDouble))
    def min(fg22: GMat2F) = new IMat2D(math.min(x,(fg22.xx).toDouble), math.min(x,(fg22.xy).toDouble), math.min(x,(fg22.yx).toDouble), math.min(x,(fg22.yy).toDouble))
    def min(dg22: GMat2D) = new IMat2D(math.min(x,dg22.xx), math.min(x,dg22.xy), math.min(x,dg22.yx), math.min(x,dg22.yy))
    def min(sg3: GVec3S) = new IVec3D(math.min(x,(sg3.x).toDouble), math.min(x,(sg3.y).toDouble), math.min(x,(sg3.z).toDouble))
    def min(ig3: GVec3I) = new IVec3D(math.min(x,(ig3.x).toDouble), math.min(x,(ig3.y).toDouble), math.min(x,(ig3.z).toDouble))
    def min(lg3: GVec3L) = new IVec3D(math.min(x,(lg3.x).toDouble), math.min(x,(lg3.y).toDouble), math.min(x,(lg3.z).toDouble))
    def min(fg3: GVec3F) = new IVec3D(math.min(x,(fg3.x).toDouble), math.min(x,(fg3.y).toDouble), math.min(x,(fg3.z).toDouble))
    def min(dg3: GVec3D) = new IVec3D(math.min(x,dg3.x), math.min(x,dg3.y), math.min(x,dg3.z))
    def min(sg33: GMat3S) = new IMat3D(math.min(x,(sg33.xx).toDouble), math.min(x,(sg33.xy).toDouble), math.min(x,(sg33.xz).toDouble), math.min(x,(sg33.yx).toDouble), math.min(x,(sg33.yy).toDouble), math.min(x,(sg33.yz).toDouble), math.min(x,(sg33.zx).toDouble), math.min(x,(sg33.zy).toDouble), math.min(x,(sg33.zz).toDouble))
    def min(ig33: GMat3I) = new IMat3D(math.min(x,(ig33.xx).toDouble), math.min(x,(ig33.xy).toDouble), math.min(x,(ig33.xz).toDouble), math.min(x,(ig33.yx).toDouble), math.min(x,(ig33.yy).toDouble), math.min(x,(ig33.yz).toDouble), math.min(x,(ig33.zx).toDouble), math.min(x,(ig33.zy).toDouble), math.min(x,(ig33.zz).toDouble))
    def min(lg33: GMat3L) = new IMat3D(math.min(x,(lg33.xx).toDouble), math.min(x,(lg33.xy).toDouble), math.min(x,(lg33.xz).toDouble), math.min(x,(lg33.yx).toDouble), math.min(x,(lg33.yy).toDouble), math.min(x,(lg33.yz).toDouble), math.min(x,(lg33.zx).toDouble), math.min(x,(lg33.zy).toDouble), math.min(x,(lg33.zz).toDouble))
    def min(fg33: GMat3F) = new IMat3D(math.min(x,(fg33.xx).toDouble), math.min(x,(fg33.xy).toDouble), math.min(x,(fg33.xz).toDouble), math.min(x,(fg33.yx).toDouble), math.min(x,(fg33.yy).toDouble), math.min(x,(fg33.yz).toDouble), math.min(x,(fg33.zx).toDouble), math.min(x,(fg33.zy).toDouble), math.min(x,(fg33.zz).toDouble))
    def min(dg33: GMat3D) = new IMat3D(math.min(x,dg33.xx), math.min(x,dg33.xy), math.min(x,dg33.xz), math.min(x,dg33.yx), math.min(x,dg33.yy), math.min(x,dg33.yz), math.min(x,dg33.zx), math.min(x,dg33.zy), math.min(x,dg33.zz))
    def min(sg4: GVec4S) = new IVec4D(math.min(x,(sg4.x).toDouble), math.min(x,(sg4.y).toDouble), math.min(x,(sg4.z).toDouble), math.min(x,(sg4.w).toDouble))
    def min(ig4: GVec4I) = new IVec4D(math.min(x,(ig4.x).toDouble), math.min(x,(ig4.y).toDouble), math.min(x,(ig4.z).toDouble), math.min(x,(ig4.w).toDouble))
    def min(lg4: GVec4L) = new IVec4D(math.min(x,(lg4.x).toDouble), math.min(x,(lg4.y).toDouble), math.min(x,(lg4.z).toDouble), math.min(x,(lg4.w).toDouble))
    def min(fg4: GVec4F) = new IVec4D(math.min(x,(fg4.x).toDouble), math.min(x,(fg4.y).toDouble), math.min(x,(fg4.z).toDouble), math.min(x,(fg4.w).toDouble))
    def min(dg4: GVec4D) = new IVec4D(math.min(x,dg4.x), math.min(x,dg4.y), math.min(x,dg4.z), math.min(x,dg4.w))
    def min(sg44: GMat4S) = new IMat4D(math.min(x,(sg44.xx).toDouble), math.min(x,(sg44.xy).toDouble), math.min(x,(sg44.xz).toDouble), math.min(x,(sg44.xw).toDouble), math.min(x,(sg44.yx).toDouble), math.min(x,(sg44.yy).toDouble), math.min(x,(sg44.yz).toDouble), math.min(x,(sg44.yw).toDouble), math.min(x,(sg44.zx).toDouble), math.min(x,(sg44.zy).toDouble), math.min(x,(sg44.zz).toDouble), math.min(x,(sg44.zw).toDouble), math.min(x,(sg44.wx).toDouble), math.min(x,(sg44.wy).toDouble), math.min(x,(sg44.wz).toDouble), math.min(x,(sg44.ww).toDouble))
    def min(ig44: GMat4I) = new IMat4D(math.min(x,(ig44.xx).toDouble), math.min(x,(ig44.xy).toDouble), math.min(x,(ig44.xz).toDouble), math.min(x,(ig44.xw).toDouble), math.min(x,(ig44.yx).toDouble), math.min(x,(ig44.yy).toDouble), math.min(x,(ig44.yz).toDouble), math.min(x,(ig44.yw).toDouble), math.min(x,(ig44.zx).toDouble), math.min(x,(ig44.zy).toDouble), math.min(x,(ig44.zz).toDouble), math.min(x,(ig44.zw).toDouble), math.min(x,(ig44.wx).toDouble), math.min(x,(ig44.wy).toDouble), math.min(x,(ig44.wz).toDouble), math.min(x,(ig44.ww).toDouble))
    def min(lg44: GMat4L) = new IMat4D(math.min(x,(lg44.xx).toDouble), math.min(x,(lg44.xy).toDouble), math.min(x,(lg44.xz).toDouble), math.min(x,(lg44.xw).toDouble), math.min(x,(lg44.yx).toDouble), math.min(x,(lg44.yy).toDouble), math.min(x,(lg44.yz).toDouble), math.min(x,(lg44.yw).toDouble), math.min(x,(lg44.zx).toDouble), math.min(x,(lg44.zy).toDouble), math.min(x,(lg44.zz).toDouble), math.min(x,(lg44.zw).toDouble), math.min(x,(lg44.wx).toDouble), math.min(x,(lg44.wy).toDouble), math.min(x,(lg44.wz).toDouble), math.min(x,(lg44.ww).toDouble))
    def min(fg44: GMat4F) = new IMat4D(math.min(x,(fg44.xx).toDouble), math.min(x,(fg44.xy).toDouble), math.min(x,(fg44.xz).toDouble), math.min(x,(fg44.xw).toDouble), math.min(x,(fg44.yx).toDouble), math.min(x,(fg44.yy).toDouble), math.min(x,(fg44.yz).toDouble), math.min(x,(fg44.yw).toDouble), math.min(x,(fg44.zx).toDouble), math.min(x,(fg44.zy).toDouble), math.min(x,(fg44.zz).toDouble), math.min(x,(fg44.zw).toDouble), math.min(x,(fg44.wx).toDouble), math.min(x,(fg44.wy).toDouble), math.min(x,(fg44.wz).toDouble), math.min(x,(fg44.ww).toDouble))
    def min(dg44: GMat4D) = new IMat4D(math.min(x,dg44.xx), math.min(x,dg44.xy), math.min(x,dg44.xz), math.min(x,dg44.xw), math.min(x,dg44.yx), math.min(x,dg44.yy), math.min(x,dg44.yz), math.min(x,dg44.yw), math.min(x,dg44.zx), math.min(x,dg44.zy), math.min(x,dg44.zz), math.min(x,dg44.zw), math.min(x,dg44.wx), math.min(x,dg44.wy), math.min(x,dg44.wz), math.min(x,dg44.ww))
  } // class ScalarD

  object ScalarD {
    def close(a: Double, b: Double, eps: Double) = eps*math.max(1.0,a*a+b*b) >= (a-b)*(a-b)
  } // object ScalarD


}



package object conversions {
  import scalar._
  import vector._
  import matrix._
  implicit def primitive_to_scalars(x0: Short) = new ScalarS(x0)
  implicit def scalars_to_primitive(vec: ScalarS) = vec.x
  implicit def primitive_to_scalari(x0: Int) = new ScalarI(x0)
  implicit def scalari_to_primitive(vec: ScalarI) = vec.x
  implicit def primitive_to_scalarl(x0: Long) = new ScalarL(x0)
  implicit def scalarl_to_primitive(vec: ScalarL) = vec.x
  implicit def primitive_to_scalarf(x0: Float) = new ScalarF(x0)
  implicit def scalarf_to_primitive(vec: ScalarF) = vec.x
  implicit def primitive_to_scalard(x0: Double) = new ScalarD(x0)
  implicit def scalard_to_primitive(vec: ScalarD) = vec.x
  implicit def gvec2i_to_point(vec: GVec2I) = new java.awt.Point(vec.x, vec.y)
  implicit def gvec2i_to_dimension(vec: GVec2I) = new java.awt.Dimension(vec.x, vec.y)
  implicit def gvec2f_to_point2df(vec: GVec2F) = new java.awt.geom.Point2D.Float(vec.x, vec.y)
  implicit def gvec2d_to_point2d(vec: GVec2D) = new java.awt.geom.Point2D.Double(vec.x, vec.y)
  implicit def gvec2d_to_dimension2d(vec: GVec2D) = new java.awt.geom.Dimension2D { private[this] var width = vec.x; private[this] var height = vec.y; def getWidth = width; def getHeight = height; def setSize(w: Double, h: Double) { width=w; height=h } }
  implicit def tuple_to_ivec2s(tup: (Short,Short)) = new IVec2S(tup._1,tup._2)
  implicit def ivec2s_to_tuple(vec: IVec2S) = (vec.x,vec.y)
  implicit def tuple_to_ivec2i(tup: (Int,Int)) = new IVec2I(tup._1,tup._2)
  implicit def ivec2i_to_tuple(vec: IVec2I) = (vec.x,vec.y)
  implicit def point_to_ivec2i(point: java.awt.Point) = new IVec2I(point.x, point.y)
  implicit def dimension_to_ivec2i(dim: java.awt.Dimension) = new IVec2I(dim.width,dim.height)
  implicit def tuple_to_ivec2l(tup: (Long,Long)) = new IVec2L(tup._1,tup._2)
  implicit def ivec2l_to_tuple(vec: IVec2L) = (vec.x,vec.y)
  implicit def tuple_to_ivec2f(tup: (Float,Float)) = new IVec2F(tup._1,tup._2)
  implicit def ivec2f_to_tuple(vec: IVec2F) = (vec.x,vec.y)
  implicit def point2df_to_ivec2f(point: java.awt.geom.Point2D.Float) = new IVec2F(point.x, point.y)
  implicit def tuple_to_ivec2d(tup: (Double,Double)) = new IVec2D(tup._1,tup._2)
  implicit def ivec2d_to_tuple(vec: IVec2D) = (vec.x,vec.y)
  implicit def point2d_to_ivec2d(point: java.awt.geom.Point2D) = new IVec2D(point.getX, point.getY)
  implicit def dimension2d_to_ivec2d(dim: java.awt.geom.Dimension2D) = new IVec2D(dim.getWidth, dim.getHeight)
  implicit def gmat2i_to_rect(mat: GMat2I) = new java.awt.Rectangle(mat.xx, mat.yx, mat.xy-mat.xx, mat.yy-mat.yx)
  implicit def gmat2f_to_rect2df(mat: GMat2F) = new java.awt.geom.Rectangle2D.Float(mat.xx, mat.yx, mat.xy-mat.xx, mat.yy-mat.yx)
  implicit def gmat2d_to_rect2d(mat: GMat2D) = new java.awt.geom.Rectangle2D.Double(mat.xx, mat.yx, mat.xy-mat.xx, mat.yy-mat.yx)
  implicit def tuptup_to_imat2s(tt: ((Short,Short), (Short,Short))) = new IMat2S(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2s_to_tuptup(mat: IMat2S) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def tuptup_to_imat2i(tt: ((Int,Int), (Int,Int))) = new IMat2I(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2i_to_tuptup(mat: IMat2I) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def rect_to_imat2i(rect: java.awt.Rectangle) = new IMat2I(rect.x, rect.x+rect.width, rect.y, rect.y+rect.height)
  implicit def tuptup_to_imat2l(tt: ((Long,Long), (Long,Long))) = new IMat2L(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2l_to_tuptup(mat: IMat2L) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def tuptup_to_imat2f(tt: ((Float,Float), (Float,Float))) = new IMat2F(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2f_to_tuptup(mat: IMat2F) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def rect2df_to_imat2f(rect: java.awt.geom.Rectangle2D.Float) = new IMat2F(rect.x, rect.x+rect.width, rect.y, rect.y+rect.height)
  implicit def tuptup_to_imat2d(tt: ((Double,Double), (Double,Double))) = new IMat2D(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2d_to_tuptup(mat: IMat2D) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def rectshape_to_imat2d(rect: java.awt.geom.RectangularShape) = new IMat2D(rect.getX, rect.getX+rect.getWidth, rect.getY, rect.getY+rect.getHeight)
  implicit def tuple_to_ivec3s(tup: (Short,Short,Short)) = new IVec3S(tup._1,tup._2,tup._3)
  implicit def ivec3s_to_tuple(vec: IVec3S) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3i(tup: (Int,Int,Int)) = new IVec3I(tup._1,tup._2,tup._3)
  implicit def ivec3i_to_tuple(vec: IVec3I) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3l(tup: (Long,Long,Long)) = new IVec3L(tup._1,tup._2,tup._3)
  implicit def ivec3l_to_tuple(vec: IVec3L) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3f(tup: (Float,Float,Float)) = new IVec3F(tup._1,tup._2,tup._3)
  implicit def ivec3f_to_tuple(vec: IVec3F) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3d(tup: (Double,Double,Double)) = new IVec3D(tup._1,tup._2,tup._3)
  implicit def ivec3d_to_tuple(vec: IVec3D) = (vec.x,vec.y,vec.z)
  implicit def gmat3f_to_affine(vec: GMat3F) = new java.awt.geom.AffineTransform(vec.xx,vec.xy,vec.xz,vec.yx,vec.yy,vec.yz)
  implicit def gmat3d_to_affine(vec: GMat3D) = new java.awt.geom.AffineTransform(vec.xx,vec.xy,vec.xz,vec.yx,vec.yy,vec.yz)
  implicit def tuptup_to_imat3s(tt: ((Short,Short,Short), (Short,Short,Short), (Short,Short,Short))) = new IMat3S(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3s_to_tuptup(mat: IMat3S) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3i(tt: ((Int,Int,Int), (Int,Int,Int), (Int,Int,Int))) = new IMat3I(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3i_to_tuptup(mat: IMat3I) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3l(tt: ((Long,Long,Long), (Long,Long,Long), (Long,Long,Long))) = new IMat3L(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3l_to_tuptup(mat: IMat3L) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3f(tt: ((Float,Float,Float), (Float,Float,Float), (Float,Float,Float))) = new IMat3F(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3f_to_tuptup(mat: IMat3F) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3d(tt: ((Double,Double,Double), (Double,Double,Double), (Double,Double,Double))) = new IMat3D(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3d_to_tuptup(mat: IMat3D) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def affine_to_imat3d(af: java.awt.geom.AffineTransform) = { val ar = new Array[Double](6); af.getMatrix(ar); new IMat3D(ar(1), ar(2), ar(3), ar(4), ar(5), ar(6), 0, 0, 1) }
  implicit def tuple_to_ivec4s(tup: (Short,Short,Short,Short)) = new IVec4S(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4s_to_tuple(vec: IVec4S) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4i(tup: (Int,Int,Int,Int)) = new IVec4I(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4i_to_tuple(vec: IVec4I) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4l(tup: (Long,Long,Long,Long)) = new IVec4L(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4l_to_tuple(vec: IVec4L) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4f(tup: (Float,Float,Float,Float)) = new IVec4F(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4f_to_tuple(vec: IVec4F) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4d(tup: (Double,Double,Double,Double)) = new IVec4D(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4d_to_tuple(vec: IVec4D) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuptup_to_imat4s(tt: ((Short,Short,Short,Short), (Short,Short,Short,Short), (Short,Short,Short,Short), (Short,Short,Short,Short))) = new IMat4S(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4s_to_tuptup(mat: IMat4S) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4i(tt: ((Int,Int,Int,Int), (Int,Int,Int,Int), (Int,Int,Int,Int), (Int,Int,Int,Int))) = new IMat4I(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4i_to_tuptup(mat: IMat4I) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4l(tt: ((Long,Long,Long,Long), (Long,Long,Long,Long), (Long,Long,Long,Long), (Long,Long,Long,Long))) = new IMat4L(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4l_to_tuptup(mat: IMat4L) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4f(tt: ((Float,Float,Float,Float), (Float,Float,Float,Float), (Float,Float,Float,Float), (Float,Float,Float,Float))) = new IMat4F(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4f_to_tuptup(mat: IMat4F) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4d(tt: ((Double,Double,Double,Double), (Double,Double,Double,Double), (Double,Double,Double,Double), (Double,Double,Double,Double))) = new IMat4D(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4d_to_tuptup(mat: IMat4D) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
}



package object ShipVL {
  type ScalarS = scalar.ScalarS
  type ScalarI = scalar.ScalarI
  type ScalarL = scalar.ScalarL
  type ScalarF = scalar.ScalarF
  type ScalarD = scalar.ScalarD
  type GVec2S = vector.GVec2S
  val GVec2S = vector.GVec2S
  type GVec2I = vector.GVec2I
  val GVec2I = vector.GVec2I
  type GVec2L = vector.GVec2L
  val GVec2L = vector.GVec2L
  type GVec2F = vector.GVec2F
  val GVec2F = vector.GVec2F
  type GVec2D = vector.GVec2D
  val GVec2D = vector.GVec2D
  type IVec2S = vector.IVec2S
  val IVec2S = vector.IVec2S
  type IVec2I = vector.IVec2I
  val IVec2I = vector.IVec2I
  type IVec2L = vector.IVec2L
  val IVec2L = vector.IVec2L
  type IVec2F = vector.IVec2F
  val IVec2F = vector.IVec2F
  type IVec2D = vector.IVec2D
  val IVec2D = vector.IVec2D
  type AVec2S = vector.AVec2S
  val AVec2S = vector.AVec2S
  type AVec2I = vector.AVec2I
  val AVec2I = vector.AVec2I
  type AVec2L = vector.AVec2L
  val AVec2L = vector.AVec2L
  type AVec2F = vector.AVec2F
  val AVec2F = vector.AVec2F
  type AVec2D = vector.AVec2D
  val AVec2D = vector.AVec2D
  type MVec2S = vector.MVec2S
  val MVec2S = vector.MVec2S
  type MVec2I = vector.MVec2I
  val MVec2I = vector.MVec2I
  type MVec2L = vector.MVec2L
  val MVec2L = vector.MVec2L
  type MVec2F = vector.MVec2F
  val MVec2F = vector.MVec2F
  type MVec2D = vector.MVec2D
  val MVec2D = vector.MVec2D
  type BVec2S = vector.BVec2S
  val BVec2S = vector.BVec2S
  type BVec2I = vector.BVec2I
  val BVec2I = vector.BVec2I
  type BVec2L = vector.BVec2L
  val BVec2L = vector.BVec2L
  type BVec2F = vector.BVec2F
  val BVec2F = vector.BVec2F
  type BVec2D = vector.BVec2D
  val BVec2D = vector.BVec2D
  type GMat2S = matrix.GMat2S
  val GMat2S = matrix.GMat2S
  type GMat2I = matrix.GMat2I
  val GMat2I = matrix.GMat2I
  type GMat2L = matrix.GMat2L
  val GMat2L = matrix.GMat2L
  type GMat2F = matrix.GMat2F
  val GMat2F = matrix.GMat2F
  type GMat2D = matrix.GMat2D
  val GMat2D = matrix.GMat2D
  type IMat2S = matrix.IMat2S
  val IMat2S = matrix.IMat2S
  type IMat2I = matrix.IMat2I
  val IMat2I = matrix.IMat2I
  type IMat2L = matrix.IMat2L
  val IMat2L = matrix.IMat2L
  type IMat2F = matrix.IMat2F
  val IMat2F = matrix.IMat2F
  type IMat2D = matrix.IMat2D
  val IMat2D = matrix.IMat2D
  type AMat2S = matrix.AMat2S
  val AMat2S = matrix.AMat2S
  type AMat2I = matrix.AMat2I
  val AMat2I = matrix.AMat2I
  type AMat2L = matrix.AMat2L
  val AMat2L = matrix.AMat2L
  type AMat2F = matrix.AMat2F
  val AMat2F = matrix.AMat2F
  type AMat2D = matrix.AMat2D
  val AMat2D = matrix.AMat2D
  type MMat2S = matrix.MMat2S
  val MMat2S = matrix.MMat2S
  type MMat2I = matrix.MMat2I
  val MMat2I = matrix.MMat2I
  type MMat2L = matrix.MMat2L
  val MMat2L = matrix.MMat2L
  type MMat2F = matrix.MMat2F
  val MMat2F = matrix.MMat2F
  type MMat2D = matrix.MMat2D
  val MMat2D = matrix.MMat2D
  type BMat2S = matrix.BMat2S
  val BMat2S = matrix.BMat2S
  type BMat2I = matrix.BMat2I
  val BMat2I = matrix.BMat2I
  type BMat2L = matrix.BMat2L
  val BMat2L = matrix.BMat2L
  type BMat2F = matrix.BMat2F
  val BMat2F = matrix.BMat2F
  type BMat2D = matrix.BMat2D
  val BMat2D = matrix.BMat2D
  type GVec3S = vector.GVec3S
  val GVec3S = vector.GVec3S
  type GVec3I = vector.GVec3I
  val GVec3I = vector.GVec3I
  type GVec3L = vector.GVec3L
  val GVec3L = vector.GVec3L
  type GVec3F = vector.GVec3F
  val GVec3F = vector.GVec3F
  type GVec3D = vector.GVec3D
  val GVec3D = vector.GVec3D
  type IVec3S = vector.IVec3S
  val IVec3S = vector.IVec3S
  type IVec3I = vector.IVec3I
  val IVec3I = vector.IVec3I
  type IVec3L = vector.IVec3L
  val IVec3L = vector.IVec3L
  type IVec3F = vector.IVec3F
  val IVec3F = vector.IVec3F
  type IVec3D = vector.IVec3D
  val IVec3D = vector.IVec3D
  type AVec3S = vector.AVec3S
  val AVec3S = vector.AVec3S
  type AVec3I = vector.AVec3I
  val AVec3I = vector.AVec3I
  type AVec3L = vector.AVec3L
  val AVec3L = vector.AVec3L
  type AVec3F = vector.AVec3F
  val AVec3F = vector.AVec3F
  type AVec3D = vector.AVec3D
  val AVec3D = vector.AVec3D
  type MVec3S = vector.MVec3S
  val MVec3S = vector.MVec3S
  type MVec3I = vector.MVec3I
  val MVec3I = vector.MVec3I
  type MVec3L = vector.MVec3L
  val MVec3L = vector.MVec3L
  type MVec3F = vector.MVec3F
  val MVec3F = vector.MVec3F
  type MVec3D = vector.MVec3D
  val MVec3D = vector.MVec3D
  type BVec3S = vector.BVec3S
  val BVec3S = vector.BVec3S
  type BVec3I = vector.BVec3I
  val BVec3I = vector.BVec3I
  type BVec3L = vector.BVec3L
  val BVec3L = vector.BVec3L
  type BVec3F = vector.BVec3F
  val BVec3F = vector.BVec3F
  type BVec3D = vector.BVec3D
  val BVec3D = vector.BVec3D
  type GMat3S = matrix.GMat3S
  val GMat3S = matrix.GMat3S
  type GMat3I = matrix.GMat3I
  val GMat3I = matrix.GMat3I
  type GMat3L = matrix.GMat3L
  val GMat3L = matrix.GMat3L
  type GMat3F = matrix.GMat3F
  val GMat3F = matrix.GMat3F
  type GMat3D = matrix.GMat3D
  val GMat3D = matrix.GMat3D
  type IMat3S = matrix.IMat3S
  val IMat3S = matrix.IMat3S
  type IMat3I = matrix.IMat3I
  val IMat3I = matrix.IMat3I
  type IMat3L = matrix.IMat3L
  val IMat3L = matrix.IMat3L
  type IMat3F = matrix.IMat3F
  val IMat3F = matrix.IMat3F
  type IMat3D = matrix.IMat3D
  val IMat3D = matrix.IMat3D
  type AMat3S = matrix.AMat3S
  val AMat3S = matrix.AMat3S
  type AMat3I = matrix.AMat3I
  val AMat3I = matrix.AMat3I
  type AMat3L = matrix.AMat3L
  val AMat3L = matrix.AMat3L
  type AMat3F = matrix.AMat3F
  val AMat3F = matrix.AMat3F
  type AMat3D = matrix.AMat3D
  val AMat3D = matrix.AMat3D
  type MMat3S = matrix.MMat3S
  val MMat3S = matrix.MMat3S
  type MMat3I = matrix.MMat3I
  val MMat3I = matrix.MMat3I
  type MMat3L = matrix.MMat3L
  val MMat3L = matrix.MMat3L
  type MMat3F = matrix.MMat3F
  val MMat3F = matrix.MMat3F
  type MMat3D = matrix.MMat3D
  val MMat3D = matrix.MMat3D
  type BMat3S = matrix.BMat3S
  val BMat3S = matrix.BMat3S
  type BMat3I = matrix.BMat3I
  val BMat3I = matrix.BMat3I
  type BMat3L = matrix.BMat3L
  val BMat3L = matrix.BMat3L
  type BMat3F = matrix.BMat3F
  val BMat3F = matrix.BMat3F
  type BMat3D = matrix.BMat3D
  val BMat3D = matrix.BMat3D
  type GVec4S = vector.GVec4S
  val GVec4S = vector.GVec4S
  type GVec4I = vector.GVec4I
  val GVec4I = vector.GVec4I
  type GVec4L = vector.GVec4L
  val GVec4L = vector.GVec4L
  type GVec4F = vector.GVec4F
  val GVec4F = vector.GVec4F
  type GVec4D = vector.GVec4D
  val GVec4D = vector.GVec4D
  type IVec4S = vector.IVec4S
  val IVec4S = vector.IVec4S
  type IVec4I = vector.IVec4I
  val IVec4I = vector.IVec4I
  type IVec4L = vector.IVec4L
  val IVec4L = vector.IVec4L
  type IVec4F = vector.IVec4F
  val IVec4F = vector.IVec4F
  type IVec4D = vector.IVec4D
  val IVec4D = vector.IVec4D
  type AVec4S = vector.AVec4S
  val AVec4S = vector.AVec4S
  type AVec4I = vector.AVec4I
  val AVec4I = vector.AVec4I
  type AVec4L = vector.AVec4L
  val AVec4L = vector.AVec4L
  type AVec4F = vector.AVec4F
  val AVec4F = vector.AVec4F
  type AVec4D = vector.AVec4D
  val AVec4D = vector.AVec4D
  type MVec4S = vector.MVec4S
  val MVec4S = vector.MVec4S
  type MVec4I = vector.MVec4I
  val MVec4I = vector.MVec4I
  type MVec4L = vector.MVec4L
  val MVec4L = vector.MVec4L
  type MVec4F = vector.MVec4F
  val MVec4F = vector.MVec4F
  type MVec4D = vector.MVec4D
  val MVec4D = vector.MVec4D
  type BVec4S = vector.BVec4S
  val BVec4S = vector.BVec4S
  type BVec4I = vector.BVec4I
  val BVec4I = vector.BVec4I
  type BVec4L = vector.BVec4L
  val BVec4L = vector.BVec4L
  type BVec4F = vector.BVec4F
  val BVec4F = vector.BVec4F
  type BVec4D = vector.BVec4D
  val BVec4D = vector.BVec4D
  type GMat4S = matrix.GMat4S
  val GMat4S = matrix.GMat4S
  type GMat4I = matrix.GMat4I
  val GMat4I = matrix.GMat4I
  type GMat4L = matrix.GMat4L
  val GMat4L = matrix.GMat4L
  type GMat4F = matrix.GMat4F
  val GMat4F = matrix.GMat4F
  type GMat4D = matrix.GMat4D
  val GMat4D = matrix.GMat4D
  type IMat4S = matrix.IMat4S
  val IMat4S = matrix.IMat4S
  type IMat4I = matrix.IMat4I
  val IMat4I = matrix.IMat4I
  type IMat4L = matrix.IMat4L
  val IMat4L = matrix.IMat4L
  type IMat4F = matrix.IMat4F
  val IMat4F = matrix.IMat4F
  type IMat4D = matrix.IMat4D
  val IMat4D = matrix.IMat4D
  type AMat4S = matrix.AMat4S
  val AMat4S = matrix.AMat4S
  type AMat4I = matrix.AMat4I
  val AMat4I = matrix.AMat4I
  type AMat4L = matrix.AMat4L
  val AMat4L = matrix.AMat4L
  type AMat4F = matrix.AMat4F
  val AMat4F = matrix.AMat4F
  type AMat4D = matrix.AMat4D
  val AMat4D = matrix.AMat4D
  type MMat4S = matrix.MMat4S
  val MMat4S = matrix.MMat4S
  type MMat4I = matrix.MMat4I
  val MMat4I = matrix.MMat4I
  type MMat4L = matrix.MMat4L
  val MMat4L = matrix.MMat4L
  type MMat4F = matrix.MMat4F
  val MMat4F = matrix.MMat4F
  type MMat4D = matrix.MMat4D
  val MMat4D = matrix.MMat4D
  type BMat4S = matrix.BMat4S
  val BMat4S = matrix.BMat4S
  type BMat4I = matrix.BMat4I
  val BMat4I = matrix.BMat4I
  type BMat4L = matrix.BMat4L
  val BMat4L = matrix.BMat4L
  type BMat4F = matrix.BMat4F
  val BMat4F = matrix.BMat4F
  type BMat4D = matrix.BMat4D
  val BMat4D = matrix.BMat4D
  implicit def primitive_to_scalars(x0: Short) = new ScalarS(x0)
  implicit def scalars_to_primitive(vec: ScalarS) = vec.x
  implicit def primitive_to_scalari(x0: Int) = new ScalarI(x0)
  implicit def scalari_to_primitive(vec: ScalarI) = vec.x
  implicit def primitive_to_scalarl(x0: Long) = new ScalarL(x0)
  implicit def scalarl_to_primitive(vec: ScalarL) = vec.x
  implicit def primitive_to_scalarf(x0: Float) = new ScalarF(x0)
  implicit def scalarf_to_primitive(vec: ScalarF) = vec.x
  implicit def primitive_to_scalard(x0: Double) = new ScalarD(x0)
  implicit def scalard_to_primitive(vec: ScalarD) = vec.x
  implicit def gvec2i_to_point(vec: GVec2I) = new java.awt.Point(vec.x, vec.y)
  implicit def gvec2i_to_dimension(vec: GVec2I) = new java.awt.Dimension(vec.x, vec.y)
  implicit def gvec2f_to_point2df(vec: GVec2F) = new java.awt.geom.Point2D.Float(vec.x, vec.y)
  implicit def gvec2d_to_point2d(vec: GVec2D) = new java.awt.geom.Point2D.Double(vec.x, vec.y)
  implicit def gvec2d_to_dimension2d(vec: GVec2D) = new java.awt.geom.Dimension2D { private[this] var width = vec.x; private[this] var height = vec.y; def getWidth = width; def getHeight = height; def setSize(w: Double, h: Double) { width=w; height=h } }
  implicit def tuple_to_ivec2s(tup: (Short,Short)) = new IVec2S(tup._1,tup._2)
  implicit def ivec2s_to_tuple(vec: IVec2S) = (vec.x,vec.y)
  implicit def tuple_to_ivec2i(tup: (Int,Int)) = new IVec2I(tup._1,tup._2)
  implicit def ivec2i_to_tuple(vec: IVec2I) = (vec.x,vec.y)
  implicit def point_to_ivec2i(point: java.awt.Point) = new IVec2I(point.x, point.y)
  implicit def dimension_to_ivec2i(dim: java.awt.Dimension) = new IVec2I(dim.width,dim.height)
  implicit def tuple_to_ivec2l(tup: (Long,Long)) = new IVec2L(tup._1,tup._2)
  implicit def ivec2l_to_tuple(vec: IVec2L) = (vec.x,vec.y)
  implicit def tuple_to_ivec2f(tup: (Float,Float)) = new IVec2F(tup._1,tup._2)
  implicit def ivec2f_to_tuple(vec: IVec2F) = (vec.x,vec.y)
  implicit def point2df_to_ivec2f(point: java.awt.geom.Point2D.Float) = new IVec2F(point.x, point.y)
  implicit def tuple_to_ivec2d(tup: (Double,Double)) = new IVec2D(tup._1,tup._2)
  implicit def ivec2d_to_tuple(vec: IVec2D) = (vec.x,vec.y)
  implicit def point2d_to_ivec2d(point: java.awt.geom.Point2D) = new IVec2D(point.getX, point.getY)
  implicit def dimension2d_to_ivec2d(dim: java.awt.geom.Dimension2D) = new IVec2D(dim.getWidth, dim.getHeight)
  implicit def gmat2i_to_rect(mat: GMat2I) = new java.awt.Rectangle(mat.xx, mat.yx, mat.xy-mat.xx, mat.yy-mat.yx)
  implicit def gmat2f_to_rect2df(mat: GMat2F) = new java.awt.geom.Rectangle2D.Float(mat.xx, mat.yx, mat.xy-mat.xx, mat.yy-mat.yx)
  implicit def gmat2d_to_rect2d(mat: GMat2D) = new java.awt.geom.Rectangle2D.Double(mat.xx, mat.yx, mat.xy-mat.xx, mat.yy-mat.yx)
  implicit def tuptup_to_imat2s(tt: ((Short,Short), (Short,Short))) = new IMat2S(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2s_to_tuptup(mat: IMat2S) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def tuptup_to_imat2i(tt: ((Int,Int), (Int,Int))) = new IMat2I(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2i_to_tuptup(mat: IMat2I) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def rect_to_imat2i(rect: java.awt.Rectangle) = new IMat2I(rect.x, rect.x+rect.width, rect.y, rect.y+rect.height)
  implicit def tuptup_to_imat2l(tt: ((Long,Long), (Long,Long))) = new IMat2L(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2l_to_tuptup(mat: IMat2L) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def tuptup_to_imat2f(tt: ((Float,Float), (Float,Float))) = new IMat2F(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2f_to_tuptup(mat: IMat2F) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def rect2df_to_imat2f(rect: java.awt.geom.Rectangle2D.Float) = new IMat2F(rect.x, rect.x+rect.width, rect.y, rect.y+rect.height)
  implicit def tuptup_to_imat2d(tt: ((Double,Double), (Double,Double))) = new IMat2D(tt._1._1,tt._1._2, tt._2._1,tt._2._2)
  implicit def imat2d_to_tuptup(mat: IMat2D) = ((mat.xx,mat.xy), (mat.yx,mat.yy))
  implicit def rectshape_to_imat2d(rect: java.awt.geom.RectangularShape) = new IMat2D(rect.getX, rect.getX+rect.getWidth, rect.getY, rect.getY+rect.getHeight)
  implicit def tuple_to_ivec3s(tup: (Short,Short,Short)) = new IVec3S(tup._1,tup._2,tup._3)
  implicit def ivec3s_to_tuple(vec: IVec3S) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3i(tup: (Int,Int,Int)) = new IVec3I(tup._1,tup._2,tup._3)
  implicit def ivec3i_to_tuple(vec: IVec3I) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3l(tup: (Long,Long,Long)) = new IVec3L(tup._1,tup._2,tup._3)
  implicit def ivec3l_to_tuple(vec: IVec3L) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3f(tup: (Float,Float,Float)) = new IVec3F(tup._1,tup._2,tup._3)
  implicit def ivec3f_to_tuple(vec: IVec3F) = (vec.x,vec.y,vec.z)
  implicit def tuple_to_ivec3d(tup: (Double,Double,Double)) = new IVec3D(tup._1,tup._2,tup._3)
  implicit def ivec3d_to_tuple(vec: IVec3D) = (vec.x,vec.y,vec.z)
  implicit def gmat3f_to_affine(vec: GMat3F) = new java.awt.geom.AffineTransform(vec.xx,vec.xy,vec.xz,vec.yx,vec.yy,vec.yz)
  implicit def gmat3d_to_affine(vec: GMat3D) = new java.awt.geom.AffineTransform(vec.xx,vec.xy,vec.xz,vec.yx,vec.yy,vec.yz)
  implicit def tuptup_to_imat3s(tt: ((Short,Short,Short), (Short,Short,Short), (Short,Short,Short))) = new IMat3S(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3s_to_tuptup(mat: IMat3S) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3i(tt: ((Int,Int,Int), (Int,Int,Int), (Int,Int,Int))) = new IMat3I(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3i_to_tuptup(mat: IMat3I) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3l(tt: ((Long,Long,Long), (Long,Long,Long), (Long,Long,Long))) = new IMat3L(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3l_to_tuptup(mat: IMat3L) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3f(tt: ((Float,Float,Float), (Float,Float,Float), (Float,Float,Float))) = new IMat3F(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3f_to_tuptup(mat: IMat3F) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def tuptup_to_imat3d(tt: ((Double,Double,Double), (Double,Double,Double), (Double,Double,Double))) = new IMat3D(tt._1._1,tt._1._2,tt._1._3, tt._2._1,tt._2._2,tt._2._3, tt._3._1,tt._3._2,tt._3._3)
  implicit def imat3d_to_tuptup(mat: IMat3D) = ((mat.xx,mat.xy,mat.xz), (mat.yx,mat.yy,mat.yz), (mat.zx,mat.zy,mat.zz))
  implicit def affine_to_imat3d(af: java.awt.geom.AffineTransform) = { val ar = new Array[Double](6); af.getMatrix(ar); new IMat3D(ar(1), ar(2), ar(3), ar(4), ar(5), ar(6), 0, 0, 1) }
  implicit def tuple_to_ivec4s(tup: (Short,Short,Short,Short)) = new IVec4S(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4s_to_tuple(vec: IVec4S) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4i(tup: (Int,Int,Int,Int)) = new IVec4I(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4i_to_tuple(vec: IVec4I) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4l(tup: (Long,Long,Long,Long)) = new IVec4L(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4l_to_tuple(vec: IVec4L) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4f(tup: (Float,Float,Float,Float)) = new IVec4F(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4f_to_tuple(vec: IVec4F) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuple_to_ivec4d(tup: (Double,Double,Double,Double)) = new IVec4D(tup._1,tup._2,tup._3,tup._4)
  implicit def ivec4d_to_tuple(vec: IVec4D) = (vec.x,vec.y,vec.z,vec.w)
  implicit def tuptup_to_imat4s(tt: ((Short,Short,Short,Short), (Short,Short,Short,Short), (Short,Short,Short,Short), (Short,Short,Short,Short))) = new IMat4S(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4s_to_tuptup(mat: IMat4S) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4i(tt: ((Int,Int,Int,Int), (Int,Int,Int,Int), (Int,Int,Int,Int), (Int,Int,Int,Int))) = new IMat4I(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4i_to_tuptup(mat: IMat4I) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4l(tt: ((Long,Long,Long,Long), (Long,Long,Long,Long), (Long,Long,Long,Long), (Long,Long,Long,Long))) = new IMat4L(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4l_to_tuptup(mat: IMat4L) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4f(tt: ((Float,Float,Float,Float), (Float,Float,Float,Float), (Float,Float,Float,Float), (Float,Float,Float,Float))) = new IMat4F(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4f_to_tuptup(mat: IMat4F) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
  implicit def tuptup_to_imat4d(tt: ((Double,Double,Double,Double), (Double,Double,Double,Double), (Double,Double,Double,Double), (Double,Double,Double,Double))) = new IMat4D(tt._1._1,tt._1._2,tt._1._3,tt._1._4, tt._2._1,tt._2._2,tt._2._3,tt._2._4, tt._3._1,tt._3._2,tt._3._3,tt._3._4, tt._4._1,tt._4._2,tt._4._3,tt._4._4)
  implicit def imat4d_to_tuptup(mat: IMat4D) = ((mat.xx,mat.xy,mat.xz,mat.xw), (mat.yx,mat.yy,mat.yz,mat.yw), (mat.zx,mat.zy,mat.zz,mat.zw), (mat.wx,mat.wy,mat.wz,mat.ww))
}



package object generic {
  type ScalarS = scalar.ScalarS
  type ScalarI = scalar.ScalarI
  type ScalarL = scalar.ScalarL
  type ScalarF = scalar.ScalarF
  type ScalarD = scalar.ScalarD
  type Vec2S = vector.GVec2S
  val Vec2S = vector.GVec2S
  type Vec2I = vector.GVec2I
  val Vec2I = vector.GVec2I
  type Vec2L = vector.GVec2L
  val Vec2L = vector.GVec2L
  type Vec2F = vector.GVec2F
  val Vec2F = vector.GVec2F
  type Vec2D = vector.GVec2D
  val Vec2D = vector.GVec2D
  type Mat2S = matrix.GMat2S
  val Mat2S = matrix.GMat2S
  type Mat2I = matrix.GMat2I
  val Mat2I = matrix.GMat2I
  type Mat2L = matrix.GMat2L
  val Mat2L = matrix.GMat2L
  type Mat2F = matrix.GMat2F
  val Mat2F = matrix.GMat2F
  type Mat2D = matrix.GMat2D
  val Mat2D = matrix.GMat2D
  type Vec3S = vector.GVec3S
  val Vec3S = vector.GVec3S
  type Vec3I = vector.GVec3I
  val Vec3I = vector.GVec3I
  type Vec3L = vector.GVec3L
  val Vec3L = vector.GVec3L
  type Vec3F = vector.GVec3F
  val Vec3F = vector.GVec3F
  type Vec3D = vector.GVec3D
  val Vec3D = vector.GVec3D
  type Mat3S = matrix.GMat3S
  val Mat3S = matrix.GMat3S
  type Mat3I = matrix.GMat3I
  val Mat3I = matrix.GMat3I
  type Mat3L = matrix.GMat3L
  val Mat3L = matrix.GMat3L
  type Mat3F = matrix.GMat3F
  val Mat3F = matrix.GMat3F
  type Mat3D = matrix.GMat3D
  val Mat3D = matrix.GMat3D
  type Vec4S = vector.GVec4S
  val Vec4S = vector.GVec4S
  type Vec4I = vector.GVec4I
  val Vec4I = vector.GVec4I
  type Vec4L = vector.GVec4L
  val Vec4L = vector.GVec4L
  type Vec4F = vector.GVec4F
  val Vec4F = vector.GVec4F
  type Vec4D = vector.GVec4D
  val Vec4D = vector.GVec4D
  type Mat4S = matrix.GMat4S
  val Mat4S = matrix.GMat4S
  type Mat4I = matrix.GMat4I
  val Mat4I = matrix.GMat4I
  type Mat4L = matrix.GMat4L
  val Mat4L = matrix.GMat4L
  type Mat4F = matrix.GMat4F
  val Mat4F = matrix.GMat4F
  type Mat4D = matrix.GMat4D
  val Mat4D = matrix.GMat4D

  object shorttype {
    type Scalar = scalar.ScalarS
    type Vec2 = vector.GVec2S
    val Vec2 = vector.GVec2S
    type Mat2 = matrix.GMat2S
    val Mat2 = matrix.GMat2S
    type Vec3 = vector.GVec3S
    val Vec3 = vector.GVec3S
    type Mat3 = matrix.GMat3S
    val Mat3 = matrix.GMat3S
    type Vec4 = vector.GVec4S
    val Vec4 = vector.GVec4S
    type Mat4 = matrix.GMat4S
    val Mat4 = matrix.GMat4S
  }

  object inttype {
    type Scalar = scalar.ScalarI
    type Vec2 = vector.GVec2I
    val Vec2 = vector.GVec2I
    type Mat2 = matrix.GMat2I
    val Mat2 = matrix.GMat2I
    type Vec3 = vector.GVec3I
    val Vec3 = vector.GVec3I
    type Mat3 = matrix.GMat3I
    val Mat3 = matrix.GMat3I
    type Vec4 = vector.GVec4I
    val Vec4 = vector.GVec4I
    type Mat4 = matrix.GMat4I
    val Mat4 = matrix.GMat4I
  }

  object longtype {
    type Scalar = scalar.ScalarL
    type Vec2 = vector.GVec2L
    val Vec2 = vector.GVec2L
    type Mat2 = matrix.GMat2L
    val Mat2 = matrix.GMat2L
    type Vec3 = vector.GVec3L
    val Vec3 = vector.GVec3L
    type Mat3 = matrix.GMat3L
    val Mat3 = matrix.GMat3L
    type Vec4 = vector.GVec4L
    val Vec4 = vector.GVec4L
    type Mat4 = matrix.GMat4L
    val Mat4 = matrix.GMat4L
  }

  object floattype {
    type Scalar = scalar.ScalarF
    type Vec2 = vector.GVec2F
    val Vec2 = vector.GVec2F
    type Mat2 = matrix.GMat2F
    val Mat2 = matrix.GMat2F
    type Vec3 = vector.GVec3F
    val Vec3 = vector.GVec3F
    type Mat3 = matrix.GMat3F
    val Mat3 = matrix.GMat3F
    type Vec4 = vector.GVec4F
    val Vec4 = vector.GVec4F
    type Mat4 = matrix.GMat4F
    val Mat4 = matrix.GMat4F
  }

  object doubletype {
    type Scalar = scalar.ScalarD
    type Vec2 = vector.GVec2D
    val Vec2 = vector.GVec2D
    type Mat2 = matrix.GMat2D
    val Mat2 = matrix.GMat2D
    type Vec3 = vector.GVec3D
    val Vec3 = vector.GVec3D
    type Mat3 = matrix.GMat3D
    val Mat3 = matrix.GMat3D
    type Vec4 = vector.GVec4D
    val Vec4 = vector.GVec4D
    type Mat4 = matrix.GMat4D
    val Mat4 = matrix.GMat4D
  }
}



package object immutable {
  type ScalarS = scalar.ScalarS
  type ScalarI = scalar.ScalarI
  type ScalarL = scalar.ScalarL
  type ScalarF = scalar.ScalarF
  type ScalarD = scalar.ScalarD
  type Vec2S = vector.IVec2S
  val Vec2S = vector.IVec2S
  type Vec2I = vector.IVec2I
  val Vec2I = vector.IVec2I
  type Vec2L = vector.IVec2L
  val Vec2L = vector.IVec2L
  type Vec2F = vector.IVec2F
  val Vec2F = vector.IVec2F
  type Vec2D = vector.IVec2D
  val Vec2D = vector.IVec2D
  type Mat2S = matrix.IMat2S
  val Mat2S = matrix.IMat2S
  type Mat2I = matrix.IMat2I
  val Mat2I = matrix.IMat2I
  type Mat2L = matrix.IMat2L
  val Mat2L = matrix.IMat2L
  type Mat2F = matrix.IMat2F
  val Mat2F = matrix.IMat2F
  type Mat2D = matrix.IMat2D
  val Mat2D = matrix.IMat2D
  type Vec3S = vector.IVec3S
  val Vec3S = vector.IVec3S
  type Vec3I = vector.IVec3I
  val Vec3I = vector.IVec3I
  type Vec3L = vector.IVec3L
  val Vec3L = vector.IVec3L
  type Vec3F = vector.IVec3F
  val Vec3F = vector.IVec3F
  type Vec3D = vector.IVec3D
  val Vec3D = vector.IVec3D
  type Mat3S = matrix.IMat3S
  val Mat3S = matrix.IMat3S
  type Mat3I = matrix.IMat3I
  val Mat3I = matrix.IMat3I
  type Mat3L = matrix.IMat3L
  val Mat3L = matrix.IMat3L
  type Mat3F = matrix.IMat3F
  val Mat3F = matrix.IMat3F
  type Mat3D = matrix.IMat3D
  val Mat3D = matrix.IMat3D
  type Vec4S = vector.IVec4S
  val Vec4S = vector.IVec4S
  type Vec4I = vector.IVec4I
  val Vec4I = vector.IVec4I
  type Vec4L = vector.IVec4L
  val Vec4L = vector.IVec4L
  type Vec4F = vector.IVec4F
  val Vec4F = vector.IVec4F
  type Vec4D = vector.IVec4D
  val Vec4D = vector.IVec4D
  type Mat4S = matrix.IMat4S
  val Mat4S = matrix.IMat4S
  type Mat4I = matrix.IMat4I
  val Mat4I = matrix.IMat4I
  type Mat4L = matrix.IMat4L
  val Mat4L = matrix.IMat4L
  type Mat4F = matrix.IMat4F
  val Mat4F = matrix.IMat4F
  type Mat4D = matrix.IMat4D
  val Mat4D = matrix.IMat4D

  object shorttype {
    type Scalar = scalar.ScalarS
    type Vec2 = vector.IVec2S
    val Vec2 = vector.IVec2S
    type Mat2 = matrix.IMat2S
    val Mat2 = matrix.IMat2S
    type Vec3 = vector.IVec3S
    val Vec3 = vector.IVec3S
    type Mat3 = matrix.IMat3S
    val Mat3 = matrix.IMat3S
    type Vec4 = vector.IVec4S
    val Vec4 = vector.IVec4S
    type Mat4 = matrix.IMat4S
    val Mat4 = matrix.IMat4S
  }

  object inttype {
    type Scalar = scalar.ScalarI
    type Vec2 = vector.IVec2I
    val Vec2 = vector.IVec2I
    type Mat2 = matrix.IMat2I
    val Mat2 = matrix.IMat2I
    type Vec3 = vector.IVec3I
    val Vec3 = vector.IVec3I
    type Mat3 = matrix.IMat3I
    val Mat3 = matrix.IMat3I
    type Vec4 = vector.IVec4I
    val Vec4 = vector.IVec4I
    type Mat4 = matrix.IMat4I
    val Mat4 = matrix.IMat4I
  }

  object longtype {
    type Scalar = scalar.ScalarL
    type Vec2 = vector.IVec2L
    val Vec2 = vector.IVec2L
    type Mat2 = matrix.IMat2L
    val Mat2 = matrix.IMat2L
    type Vec3 = vector.IVec3L
    val Vec3 = vector.IVec3L
    type Mat3 = matrix.IMat3L
    val Mat3 = matrix.IMat3L
    type Vec4 = vector.IVec4L
    val Vec4 = vector.IVec4L
    type Mat4 = matrix.IMat4L
    val Mat4 = matrix.IMat4L
  }

  object floattype {
    type Scalar = scalar.ScalarF
    type Vec2 = vector.IVec2F
    val Vec2 = vector.IVec2F
    type Mat2 = matrix.IMat2F
    val Mat2 = matrix.IMat2F
    type Vec3 = vector.IVec3F
    val Vec3 = vector.IVec3F
    type Mat3 = matrix.IMat3F
    val Mat3 = matrix.IMat3F
    type Vec4 = vector.IVec4F
    val Vec4 = vector.IVec4F
    type Mat4 = matrix.IMat4F
    val Mat4 = matrix.IMat4F
  }

  object doubletype {
    type Scalar = scalar.ScalarD
    type Vec2 = vector.IVec2D
    val Vec2 = vector.IVec2D
    type Mat2 = matrix.IMat2D
    val Mat2 = matrix.IMat2D
    type Vec3 = vector.IVec3D
    val Vec3 = vector.IVec3D
    type Mat3 = matrix.IMat3D
    val Mat3 = matrix.IMat3D
    type Vec4 = vector.IVec4D
    val Vec4 = vector.IVec4D
    type Mat4 = matrix.IMat4D
    val Mat4 = matrix.IMat4D
  }
}



package object assignable {
  type ScalarS = scalar.ScalarS
  type ScalarI = scalar.ScalarI
  type ScalarL = scalar.ScalarL
  type ScalarF = scalar.ScalarF
  type ScalarD = scalar.ScalarD
  type Vec2S = vector.AVec2S
  val Vec2S = vector.AVec2S
  type Vec2I = vector.AVec2I
  val Vec2I = vector.AVec2I
  type Vec2L = vector.AVec2L
  val Vec2L = vector.AVec2L
  type Vec2F = vector.AVec2F
  val Vec2F = vector.AVec2F
  type Vec2D = vector.AVec2D
  val Vec2D = vector.AVec2D
  type Mat2S = matrix.AMat2S
  val Mat2S = matrix.AMat2S
  type Mat2I = matrix.AMat2I
  val Mat2I = matrix.AMat2I
  type Mat2L = matrix.AMat2L
  val Mat2L = matrix.AMat2L
  type Mat2F = matrix.AMat2F
  val Mat2F = matrix.AMat2F
  type Mat2D = matrix.AMat2D
  val Mat2D = matrix.AMat2D
  type Vec3S = vector.AVec3S
  val Vec3S = vector.AVec3S
  type Vec3I = vector.AVec3I
  val Vec3I = vector.AVec3I
  type Vec3L = vector.AVec3L
  val Vec3L = vector.AVec3L
  type Vec3F = vector.AVec3F
  val Vec3F = vector.AVec3F
  type Vec3D = vector.AVec3D
  val Vec3D = vector.AVec3D
  type Mat3S = matrix.AMat3S
  val Mat3S = matrix.AMat3S
  type Mat3I = matrix.AMat3I
  val Mat3I = matrix.AMat3I
  type Mat3L = matrix.AMat3L
  val Mat3L = matrix.AMat3L
  type Mat3F = matrix.AMat3F
  val Mat3F = matrix.AMat3F
  type Mat3D = matrix.AMat3D
  val Mat3D = matrix.AMat3D
  type Vec4S = vector.AVec4S
  val Vec4S = vector.AVec4S
  type Vec4I = vector.AVec4I
  val Vec4I = vector.AVec4I
  type Vec4L = vector.AVec4L
  val Vec4L = vector.AVec4L
  type Vec4F = vector.AVec4F
  val Vec4F = vector.AVec4F
  type Vec4D = vector.AVec4D
  val Vec4D = vector.AVec4D
  type Mat4S = matrix.AMat4S
  val Mat4S = matrix.AMat4S
  type Mat4I = matrix.AMat4I
  val Mat4I = matrix.AMat4I
  type Mat4L = matrix.AMat4L
  val Mat4L = matrix.AMat4L
  type Mat4F = matrix.AMat4F
  val Mat4F = matrix.AMat4F
  type Mat4D = matrix.AMat4D
  val Mat4D = matrix.AMat4D

  object shorttype {
    type Scalar = scalar.ScalarS
    type Vec2 = vector.AVec2S
    val Vec2 = vector.AVec2S
    type Mat2 = matrix.AMat2S
    val Mat2 = matrix.AMat2S
    type Vec3 = vector.AVec3S
    val Vec3 = vector.AVec3S
    type Mat3 = matrix.AMat3S
    val Mat3 = matrix.AMat3S
    type Vec4 = vector.AVec4S
    val Vec4 = vector.AVec4S
    type Mat4 = matrix.AMat4S
    val Mat4 = matrix.AMat4S
  }

  object inttype {
    type Scalar = scalar.ScalarI
    type Vec2 = vector.AVec2I
    val Vec2 = vector.AVec2I
    type Mat2 = matrix.AMat2I
    val Mat2 = matrix.AMat2I
    type Vec3 = vector.AVec3I
    val Vec3 = vector.AVec3I
    type Mat3 = matrix.AMat3I
    val Mat3 = matrix.AMat3I
    type Vec4 = vector.AVec4I
    val Vec4 = vector.AVec4I
    type Mat4 = matrix.AMat4I
    val Mat4 = matrix.AMat4I
  }

  object longtype {
    type Scalar = scalar.ScalarL
    type Vec2 = vector.AVec2L
    val Vec2 = vector.AVec2L
    type Mat2 = matrix.AMat2L
    val Mat2 = matrix.AMat2L
    type Vec3 = vector.AVec3L
    val Vec3 = vector.AVec3L
    type Mat3 = matrix.AMat3L
    val Mat3 = matrix.AMat3L
    type Vec4 = vector.AVec4L
    val Vec4 = vector.AVec4L
    type Mat4 = matrix.AMat4L
    val Mat4 = matrix.AMat4L
  }

  object floattype {
    type Scalar = scalar.ScalarF
    type Vec2 = vector.AVec2F
    val Vec2 = vector.AVec2F
    type Mat2 = matrix.AMat2F
    val Mat2 = matrix.AMat2F
    type Vec3 = vector.AVec3F
    val Vec3 = vector.AVec3F
    type Mat3 = matrix.AMat3F
    val Mat3 = matrix.AMat3F
    type Vec4 = vector.AVec4F
    val Vec4 = vector.AVec4F
    type Mat4 = matrix.AMat4F
    val Mat4 = matrix.AMat4F
  }

  object doubletype {
    type Scalar = scalar.ScalarD
    type Vec2 = vector.AVec2D
    val Vec2 = vector.AVec2D
    type Mat2 = matrix.AMat2D
    val Mat2 = matrix.AMat2D
    type Vec3 = vector.AVec3D
    val Vec3 = vector.AVec3D
    type Mat3 = matrix.AMat3D
    val Mat3 = matrix.AMat3D
    type Vec4 = vector.AVec4D
    val Vec4 = vector.AVec4D
    type Mat4 = matrix.AMat4D
    val Mat4 = matrix.AMat4D
  }
}



package object mutable {
  type ScalarS = scalar.ScalarS
  type ScalarI = scalar.ScalarI
  type ScalarL = scalar.ScalarL
  type ScalarF = scalar.ScalarF
  type ScalarD = scalar.ScalarD
  type Vec2S = vector.MVec2S
  val Vec2S = vector.MVec2S
  type Vec2I = vector.MVec2I
  val Vec2I = vector.MVec2I
  type Vec2L = vector.MVec2L
  val Vec2L = vector.MVec2L
  type Vec2F = vector.MVec2F
  val Vec2F = vector.MVec2F
  type Vec2D = vector.MVec2D
  val Vec2D = vector.MVec2D
  type Mat2S = matrix.MMat2S
  val Mat2S = matrix.MMat2S
  type Mat2I = matrix.MMat2I
  val Mat2I = matrix.MMat2I
  type Mat2L = matrix.MMat2L
  val Mat2L = matrix.MMat2L
  type Mat2F = matrix.MMat2F
  val Mat2F = matrix.MMat2F
  type Mat2D = matrix.MMat2D
  val Mat2D = matrix.MMat2D
  type Vec3S = vector.MVec3S
  val Vec3S = vector.MVec3S
  type Vec3I = vector.MVec3I
  val Vec3I = vector.MVec3I
  type Vec3L = vector.MVec3L
  val Vec3L = vector.MVec3L
  type Vec3F = vector.MVec3F
  val Vec3F = vector.MVec3F
  type Vec3D = vector.MVec3D
  val Vec3D = vector.MVec3D
  type Mat3S = matrix.MMat3S
  val Mat3S = matrix.MMat3S
  type Mat3I = matrix.MMat3I
  val Mat3I = matrix.MMat3I
  type Mat3L = matrix.MMat3L
  val Mat3L = matrix.MMat3L
  type Mat3F = matrix.MMat3F
  val Mat3F = matrix.MMat3F
  type Mat3D = matrix.MMat3D
  val Mat3D = matrix.MMat3D
  type Vec4S = vector.MVec4S
  val Vec4S = vector.MVec4S
  type Vec4I = vector.MVec4I
  val Vec4I = vector.MVec4I
  type Vec4L = vector.MVec4L
  val Vec4L = vector.MVec4L
  type Vec4F = vector.MVec4F
  val Vec4F = vector.MVec4F
  type Vec4D = vector.MVec4D
  val Vec4D = vector.MVec4D
  type Mat4S = matrix.MMat4S
  val Mat4S = matrix.MMat4S
  type Mat4I = matrix.MMat4I
  val Mat4I = matrix.MMat4I
  type Mat4L = matrix.MMat4L
  val Mat4L = matrix.MMat4L
  type Mat4F = matrix.MMat4F
  val Mat4F = matrix.MMat4F
  type Mat4D = matrix.MMat4D
  val Mat4D = matrix.MMat4D

  object shorttype {
    type Scalar = scalar.ScalarS
    type Vec2 = vector.MVec2S
    val Vec2 = vector.MVec2S
    type Mat2 = matrix.MMat2S
    val Mat2 = matrix.MMat2S
    type Vec3 = vector.MVec3S
    val Vec3 = vector.MVec3S
    type Mat3 = matrix.MMat3S
    val Mat3 = matrix.MMat3S
    type Vec4 = vector.MVec4S
    val Vec4 = vector.MVec4S
    type Mat4 = matrix.MMat4S
    val Mat4 = matrix.MMat4S
  }

  object inttype {
    type Scalar = scalar.ScalarI
    type Vec2 = vector.MVec2I
    val Vec2 = vector.MVec2I
    type Mat2 = matrix.MMat2I
    val Mat2 = matrix.MMat2I
    type Vec3 = vector.MVec3I
    val Vec3 = vector.MVec3I
    type Mat3 = matrix.MMat3I
    val Mat3 = matrix.MMat3I
    type Vec4 = vector.MVec4I
    val Vec4 = vector.MVec4I
    type Mat4 = matrix.MMat4I
    val Mat4 = matrix.MMat4I
  }

  object longtype {
    type Scalar = scalar.ScalarL
    type Vec2 = vector.MVec2L
    val Vec2 = vector.MVec2L
    type Mat2 = matrix.MMat2L
    val Mat2 = matrix.MMat2L
    type Vec3 = vector.MVec3L
    val Vec3 = vector.MVec3L
    type Mat3 = matrix.MMat3L
    val Mat3 = matrix.MMat3L
    type Vec4 = vector.MVec4L
    val Vec4 = vector.MVec4L
    type Mat4 = matrix.MMat4L
    val Mat4 = matrix.MMat4L
  }

  object floattype {
    type Scalar = scalar.ScalarF
    type Vec2 = vector.MVec2F
    val Vec2 = vector.MVec2F
    type Mat2 = matrix.MMat2F
    val Mat2 = matrix.MMat2F
    type Vec3 = vector.MVec3F
    val Vec3 = vector.MVec3F
    type Mat3 = matrix.MMat3F
    val Mat3 = matrix.MMat3F
    type Vec4 = vector.MVec4F
    val Vec4 = vector.MVec4F
    type Mat4 = matrix.MMat4F
    val Mat4 = matrix.MMat4F
  }

  object doubletype {
    type Scalar = scalar.ScalarD
    type Vec2 = vector.MVec2D
    val Vec2 = vector.MVec2D
    type Mat2 = matrix.MMat2D
    val Mat2 = matrix.MMat2D
    type Vec3 = vector.MVec3D
    val Vec3 = vector.MVec3D
    type Mat3 = matrix.MMat3D
    val Mat3 = matrix.MMat3D
    type Vec4 = vector.MVec4D
    val Vec4 = vector.MVec4D
    type Mat4 = matrix.MMat4D
    val Mat4 = matrix.MMat4D
  }
}



package object backed {
  type ScalarS = scalar.ScalarS
  type ScalarI = scalar.ScalarI
  type ScalarL = scalar.ScalarL
  type ScalarF = scalar.ScalarF
  type ScalarD = scalar.ScalarD
  type Vec2S = vector.BVec2S
  val Vec2S = vector.BVec2S
  type Vec2I = vector.BVec2I
  val Vec2I = vector.BVec2I
  type Vec2L = vector.BVec2L
  val Vec2L = vector.BVec2L
  type Vec2F = vector.BVec2F
  val Vec2F = vector.BVec2F
  type Vec2D = vector.BVec2D
  val Vec2D = vector.BVec2D
  type Mat2S = matrix.BMat2S
  val Mat2S = matrix.BMat2S
  type Mat2I = matrix.BMat2I
  val Mat2I = matrix.BMat2I
  type Mat2L = matrix.BMat2L
  val Mat2L = matrix.BMat2L
  type Mat2F = matrix.BMat2F
  val Mat2F = matrix.BMat2F
  type Mat2D = matrix.BMat2D
  val Mat2D = matrix.BMat2D
  type Vec3S = vector.BVec3S
  val Vec3S = vector.BVec3S
  type Vec3I = vector.BVec3I
  val Vec3I = vector.BVec3I
  type Vec3L = vector.BVec3L
  val Vec3L = vector.BVec3L
  type Vec3F = vector.BVec3F
  val Vec3F = vector.BVec3F
  type Vec3D = vector.BVec3D
  val Vec3D = vector.BVec3D
  type Mat3S = matrix.BMat3S
  val Mat3S = matrix.BMat3S
  type Mat3I = matrix.BMat3I
  val Mat3I = matrix.BMat3I
  type Mat3L = matrix.BMat3L
  val Mat3L = matrix.BMat3L
  type Mat3F = matrix.BMat3F
  val Mat3F = matrix.BMat3F
  type Mat3D = matrix.BMat3D
  val Mat3D = matrix.BMat3D
  type Vec4S = vector.BVec4S
  val Vec4S = vector.BVec4S
  type Vec4I = vector.BVec4I
  val Vec4I = vector.BVec4I
  type Vec4L = vector.BVec4L
  val Vec4L = vector.BVec4L
  type Vec4F = vector.BVec4F
  val Vec4F = vector.BVec4F
  type Vec4D = vector.BVec4D
  val Vec4D = vector.BVec4D
  type Mat4S = matrix.BMat4S
  val Mat4S = matrix.BMat4S
  type Mat4I = matrix.BMat4I
  val Mat4I = matrix.BMat4I
  type Mat4L = matrix.BMat4L
  val Mat4L = matrix.BMat4L
  type Mat4F = matrix.BMat4F
  val Mat4F = matrix.BMat4F
  type Mat4D = matrix.BMat4D
  val Mat4D = matrix.BMat4D

  object shorttype {
    type Scalar = scalar.ScalarS
    type Vec2 = vector.BVec2S
    val Vec2 = vector.BVec2S
    type Mat2 = matrix.BMat2S
    val Mat2 = matrix.BMat2S
    type Vec3 = vector.BVec3S
    val Vec3 = vector.BVec3S
    type Mat3 = matrix.BMat3S
    val Mat3 = matrix.BMat3S
    type Vec4 = vector.BVec4S
    val Vec4 = vector.BVec4S
    type Mat4 = matrix.BMat4S
    val Mat4 = matrix.BMat4S
  }

  object inttype {
    type Scalar = scalar.ScalarI
    type Vec2 = vector.BVec2I
    val Vec2 = vector.BVec2I
    type Mat2 = matrix.BMat2I
    val Mat2 = matrix.BMat2I
    type Vec3 = vector.BVec3I
    val Vec3 = vector.BVec3I
    type Mat3 = matrix.BMat3I
    val Mat3 = matrix.BMat3I
    type Vec4 = vector.BVec4I
    val Vec4 = vector.BVec4I
    type Mat4 = matrix.BMat4I
    val Mat4 = matrix.BMat4I
  }

  object longtype {
    type Scalar = scalar.ScalarL
    type Vec2 = vector.BVec2L
    val Vec2 = vector.BVec2L
    type Mat2 = matrix.BMat2L
    val Mat2 = matrix.BMat2L
    type Vec3 = vector.BVec3L
    val Vec3 = vector.BVec3L
    type Mat3 = matrix.BMat3L
    val Mat3 = matrix.BMat3L
    type Vec4 = vector.BVec4L
    val Vec4 = vector.BVec4L
    type Mat4 = matrix.BMat4L
    val Mat4 = matrix.BMat4L
  }

  object floattype {
    type Scalar = scalar.ScalarF
    type Vec2 = vector.BVec2F
    val Vec2 = vector.BVec2F
    type Mat2 = matrix.BMat2F
    val Mat2 = matrix.BMat2F
    type Vec3 = vector.BVec3F
    val Vec3 = vector.BVec3F
    type Mat3 = matrix.BMat3F
    val Mat3 = matrix.BMat3F
    type Vec4 = vector.BVec4F
    val Vec4 = vector.BVec4F
    type Mat4 = matrix.BMat4F
    val Mat4 = matrix.BMat4F
  }

  object doubletype {
    type Scalar = scalar.ScalarD
    type Vec2 = vector.BVec2D
    val Vec2 = vector.BVec2D
    type Mat2 = matrix.BMat2D
    val Mat2 = matrix.BMat2D
    type Vec3 = vector.BVec3D
    val Vec3 = vector.BVec3D
    type Mat3 = matrix.BMat3D
    val Mat3 = matrix.BMat3D
    type Vec4 = vector.BVec4D
    val Vec4 = vector.BVec4D
    type Mat4 = matrix.BMat4D
    val Mat4 = matrix.BMat4D
  }
}



package object verbose {
  type ShortScalar = scalar.ScalarS
  type IntScalar = scalar.ScalarI
  type LongScalar = scalar.ScalarL
  type FloatScalar = scalar.ScalarF
  type DoubleScalar = scalar.ScalarD
  type GenericShortVector2 = vector.GVec2S
  val GenericShortVector2 = vector.GVec2S
  type GenericIntVector2 = vector.GVec2I
  val GenericIntVector2 = vector.GVec2I
  type GenericLongVector2 = vector.GVec2L
  val GenericLongVector2 = vector.GVec2L
  type GenericFloatVector2 = vector.GVec2F
  val GenericFloatVector2 = vector.GVec2F
  type GenericDoubleVector2 = vector.GVec2D
  val GenericDoubleVector2 = vector.GVec2D
  type ImmutableShortVector2 = vector.IVec2S
  val ImmutableShortVector2 = vector.IVec2S
  type ImmutableIntVector2 = vector.IVec2I
  val ImmutableIntVector2 = vector.IVec2I
  type ImmutableLongVector2 = vector.IVec2L
  val ImmutableLongVector2 = vector.IVec2L
  type ImmutableFloatVector2 = vector.IVec2F
  val ImmutableFloatVector2 = vector.IVec2F
  type ImmutableDoubleVector2 = vector.IVec2D
  val ImmutableDoubleVector2 = vector.IVec2D
  type AssignableShortVector2 = vector.AVec2S
  val AssignableShortVector2 = vector.AVec2S
  type AssignableIntVector2 = vector.AVec2I
  val AssignableIntVector2 = vector.AVec2I
  type AssignableLongVector2 = vector.AVec2L
  val AssignableLongVector2 = vector.AVec2L
  type AssignableFloatVector2 = vector.AVec2F
  val AssignableFloatVector2 = vector.AVec2F
  type AssignableDoubleVector2 = vector.AVec2D
  val AssignableDoubleVector2 = vector.AVec2D
  type MutableShortVector2 = vector.MVec2S
  val MutableShortVector2 = vector.MVec2S
  type MutableIntVector2 = vector.MVec2I
  val MutableIntVector2 = vector.MVec2I
  type MutableLongVector2 = vector.MVec2L
  val MutableLongVector2 = vector.MVec2L
  type MutableFloatVector2 = vector.MVec2F
  val MutableFloatVector2 = vector.MVec2F
  type MutableDoubleVector2 = vector.MVec2D
  val MutableDoubleVector2 = vector.MVec2D
  type BackedShortVector2 = vector.BVec2S
  val BackedShortVector2 = vector.BVec2S
  type BackedIntVector2 = vector.BVec2I
  val BackedIntVector2 = vector.BVec2I
  type BackedLongVector2 = vector.BVec2L
  val BackedLongVector2 = vector.BVec2L
  type BackedFloatVector2 = vector.BVec2F
  val BackedFloatVector2 = vector.BVec2F
  type BackedDoubleVector2 = vector.BVec2D
  val BackedDoubleVector2 = vector.BVec2D
  type GenericShortMatrix2x2 = matrix.GMat2S
  val GenericShortMatrix2x2 = matrix.GMat2S
  type GenericIntMatrix2x2 = matrix.GMat2I
  val GenericIntMatrix2x2 = matrix.GMat2I
  type GenericLongMatrix2x2 = matrix.GMat2L
  val GenericLongMatrix2x2 = matrix.GMat2L
  type GenericFloatMatrix2x2 = matrix.GMat2F
  val GenericFloatMatrix2x2 = matrix.GMat2F
  type GenericDoubleMatrix2x2 = matrix.GMat2D
  val GenericDoubleMatrix2x2 = matrix.GMat2D
  type ImmutableShortMatrix2x2 = matrix.IMat2S
  val ImmutableShortMatrix2x2 = matrix.IMat2S
  type ImmutableIntMatrix2x2 = matrix.IMat2I
  val ImmutableIntMatrix2x2 = matrix.IMat2I
  type ImmutableLongMatrix2x2 = matrix.IMat2L
  val ImmutableLongMatrix2x2 = matrix.IMat2L
  type ImmutableFloatMatrix2x2 = matrix.IMat2F
  val ImmutableFloatMatrix2x2 = matrix.IMat2F
  type ImmutableDoubleMatrix2x2 = matrix.IMat2D
  val ImmutableDoubleMatrix2x2 = matrix.IMat2D
  type AssignableShortMatrix2x2 = matrix.AMat2S
  val AssignableShortMatrix2x2 = matrix.AMat2S
  type AssignableIntMatrix2x2 = matrix.AMat2I
  val AssignableIntMatrix2x2 = matrix.AMat2I
  type AssignableLongMatrix2x2 = matrix.AMat2L
  val AssignableLongMatrix2x2 = matrix.AMat2L
  type AssignableFloatMatrix2x2 = matrix.AMat2F
  val AssignableFloatMatrix2x2 = matrix.AMat2F
  type AssignableDoubleMatrix2x2 = matrix.AMat2D
  val AssignableDoubleMatrix2x2 = matrix.AMat2D
  type MutableShortMatrix2x2 = matrix.MMat2S
  val MutableShortMatrix2x2 = matrix.MMat2S
  type MutableIntMatrix2x2 = matrix.MMat2I
  val MutableIntMatrix2x2 = matrix.MMat2I
  type MutableLongMatrix2x2 = matrix.MMat2L
  val MutableLongMatrix2x2 = matrix.MMat2L
  type MutableFloatMatrix2x2 = matrix.MMat2F
  val MutableFloatMatrix2x2 = matrix.MMat2F
  type MutableDoubleMatrix2x2 = matrix.MMat2D
  val MutableDoubleMatrix2x2 = matrix.MMat2D
  type BackedShortMatrix2x2 = matrix.BMat2S
  val BackedShortMatrix2x2 = matrix.BMat2S
  type BackedIntMatrix2x2 = matrix.BMat2I
  val BackedIntMatrix2x2 = matrix.BMat2I
  type BackedLongMatrix2x2 = matrix.BMat2L
  val BackedLongMatrix2x2 = matrix.BMat2L
  type BackedFloatMatrix2x2 = matrix.BMat2F
  val BackedFloatMatrix2x2 = matrix.BMat2F
  type BackedDoubleMatrix2x2 = matrix.BMat2D
  val BackedDoubleMatrix2x2 = matrix.BMat2D
  type GenericShortVector3 = vector.GVec3S
  val GenericShortVector3 = vector.GVec3S
  type GenericIntVector3 = vector.GVec3I
  val GenericIntVector3 = vector.GVec3I
  type GenericLongVector3 = vector.GVec3L
  val GenericLongVector3 = vector.GVec3L
  type GenericFloatVector3 = vector.GVec3F
  val GenericFloatVector3 = vector.GVec3F
  type GenericDoubleVector3 = vector.GVec3D
  val GenericDoubleVector3 = vector.GVec3D
  type ImmutableShortVector3 = vector.IVec3S
  val ImmutableShortVector3 = vector.IVec3S
  type ImmutableIntVector3 = vector.IVec3I
  val ImmutableIntVector3 = vector.IVec3I
  type ImmutableLongVector3 = vector.IVec3L
  val ImmutableLongVector3 = vector.IVec3L
  type ImmutableFloatVector3 = vector.IVec3F
  val ImmutableFloatVector3 = vector.IVec3F
  type ImmutableDoubleVector3 = vector.IVec3D
  val ImmutableDoubleVector3 = vector.IVec3D
  type AssignableShortVector3 = vector.AVec3S
  val AssignableShortVector3 = vector.AVec3S
  type AssignableIntVector3 = vector.AVec3I
  val AssignableIntVector3 = vector.AVec3I
  type AssignableLongVector3 = vector.AVec3L
  val AssignableLongVector3 = vector.AVec3L
  type AssignableFloatVector3 = vector.AVec3F
  val AssignableFloatVector3 = vector.AVec3F
  type AssignableDoubleVector3 = vector.AVec3D
  val AssignableDoubleVector3 = vector.AVec3D
  type MutableShortVector3 = vector.MVec3S
  val MutableShortVector3 = vector.MVec3S
  type MutableIntVector3 = vector.MVec3I
  val MutableIntVector3 = vector.MVec3I
  type MutableLongVector3 = vector.MVec3L
  val MutableLongVector3 = vector.MVec3L
  type MutableFloatVector3 = vector.MVec3F
  val MutableFloatVector3 = vector.MVec3F
  type MutableDoubleVector3 = vector.MVec3D
  val MutableDoubleVector3 = vector.MVec3D
  type BackedShortVector3 = vector.BVec3S
  val BackedShortVector3 = vector.BVec3S
  type BackedIntVector3 = vector.BVec3I
  val BackedIntVector3 = vector.BVec3I
  type BackedLongVector3 = vector.BVec3L
  val BackedLongVector3 = vector.BVec3L
  type BackedFloatVector3 = vector.BVec3F
  val BackedFloatVector3 = vector.BVec3F
  type BackedDoubleVector3 = vector.BVec3D
  val BackedDoubleVector3 = vector.BVec3D
  type GenericShortMatrix3x3 = matrix.GMat3S
  val GenericShortMatrix3x3 = matrix.GMat3S
  type GenericIntMatrix3x3 = matrix.GMat3I
  val GenericIntMatrix3x3 = matrix.GMat3I
  type GenericLongMatrix3x3 = matrix.GMat3L
  val GenericLongMatrix3x3 = matrix.GMat3L
  type GenericFloatMatrix3x3 = matrix.GMat3F
  val GenericFloatMatrix3x3 = matrix.GMat3F
  type GenericDoubleMatrix3x3 = matrix.GMat3D
  val GenericDoubleMatrix3x3 = matrix.GMat3D
  type ImmutableShortMatrix3x3 = matrix.IMat3S
  val ImmutableShortMatrix3x3 = matrix.IMat3S
  type ImmutableIntMatrix3x3 = matrix.IMat3I
  val ImmutableIntMatrix3x3 = matrix.IMat3I
  type ImmutableLongMatrix3x3 = matrix.IMat3L
  val ImmutableLongMatrix3x3 = matrix.IMat3L
  type ImmutableFloatMatrix3x3 = matrix.IMat3F
  val ImmutableFloatMatrix3x3 = matrix.IMat3F
  type ImmutableDoubleMatrix3x3 = matrix.IMat3D
  val ImmutableDoubleMatrix3x3 = matrix.IMat3D
  type AssignableShortMatrix3x3 = matrix.AMat3S
  val AssignableShortMatrix3x3 = matrix.AMat3S
  type AssignableIntMatrix3x3 = matrix.AMat3I
  val AssignableIntMatrix3x3 = matrix.AMat3I
  type AssignableLongMatrix3x3 = matrix.AMat3L
  val AssignableLongMatrix3x3 = matrix.AMat3L
  type AssignableFloatMatrix3x3 = matrix.AMat3F
  val AssignableFloatMatrix3x3 = matrix.AMat3F
  type AssignableDoubleMatrix3x3 = matrix.AMat3D
  val AssignableDoubleMatrix3x3 = matrix.AMat3D
  type MutableShortMatrix3x3 = matrix.MMat3S
  val MutableShortMatrix3x3 = matrix.MMat3S
  type MutableIntMatrix3x3 = matrix.MMat3I
  val MutableIntMatrix3x3 = matrix.MMat3I
  type MutableLongMatrix3x3 = matrix.MMat3L
  val MutableLongMatrix3x3 = matrix.MMat3L
  type MutableFloatMatrix3x3 = matrix.MMat3F
  val MutableFloatMatrix3x3 = matrix.MMat3F
  type MutableDoubleMatrix3x3 = matrix.MMat3D
  val MutableDoubleMatrix3x3 = matrix.MMat3D
  type BackedShortMatrix3x3 = matrix.BMat3S
  val BackedShortMatrix3x3 = matrix.BMat3S
  type BackedIntMatrix3x3 = matrix.BMat3I
  val BackedIntMatrix3x3 = matrix.BMat3I
  type BackedLongMatrix3x3 = matrix.BMat3L
  val BackedLongMatrix3x3 = matrix.BMat3L
  type BackedFloatMatrix3x3 = matrix.BMat3F
  val BackedFloatMatrix3x3 = matrix.BMat3F
  type BackedDoubleMatrix3x3 = matrix.BMat3D
  val BackedDoubleMatrix3x3 = matrix.BMat3D
  type GenericShortVector4 = vector.GVec4S
  val GenericShortVector4 = vector.GVec4S
  type GenericIntVector4 = vector.GVec4I
  val GenericIntVector4 = vector.GVec4I
  type GenericLongVector4 = vector.GVec4L
  val GenericLongVector4 = vector.GVec4L
  type GenericFloatVector4 = vector.GVec4F
  val GenericFloatVector4 = vector.GVec4F
  type GenericDoubleVector4 = vector.GVec4D
  val GenericDoubleVector4 = vector.GVec4D
  type ImmutableShortVector4 = vector.IVec4S
  val ImmutableShortVector4 = vector.IVec4S
  type ImmutableIntVector4 = vector.IVec4I
  val ImmutableIntVector4 = vector.IVec4I
  type ImmutableLongVector4 = vector.IVec4L
  val ImmutableLongVector4 = vector.IVec4L
  type ImmutableFloatVector4 = vector.IVec4F
  val ImmutableFloatVector4 = vector.IVec4F
  type ImmutableDoubleVector4 = vector.IVec4D
  val ImmutableDoubleVector4 = vector.IVec4D
  type AssignableShortVector4 = vector.AVec4S
  val AssignableShortVector4 = vector.AVec4S
  type AssignableIntVector4 = vector.AVec4I
  val AssignableIntVector4 = vector.AVec4I
  type AssignableLongVector4 = vector.AVec4L
  val AssignableLongVector4 = vector.AVec4L
  type AssignableFloatVector4 = vector.AVec4F
  val AssignableFloatVector4 = vector.AVec4F
  type AssignableDoubleVector4 = vector.AVec4D
  val AssignableDoubleVector4 = vector.AVec4D
  type MutableShortVector4 = vector.MVec4S
  val MutableShortVector4 = vector.MVec4S
  type MutableIntVector4 = vector.MVec4I
  val MutableIntVector4 = vector.MVec4I
  type MutableLongVector4 = vector.MVec4L
  val MutableLongVector4 = vector.MVec4L
  type MutableFloatVector4 = vector.MVec4F
  val MutableFloatVector4 = vector.MVec4F
  type MutableDoubleVector4 = vector.MVec4D
  val MutableDoubleVector4 = vector.MVec4D
  type BackedShortVector4 = vector.BVec4S
  val BackedShortVector4 = vector.BVec4S
  type BackedIntVector4 = vector.BVec4I
  val BackedIntVector4 = vector.BVec4I
  type BackedLongVector4 = vector.BVec4L
  val BackedLongVector4 = vector.BVec4L
  type BackedFloatVector4 = vector.BVec4F
  val BackedFloatVector4 = vector.BVec4F
  type BackedDoubleVector4 = vector.BVec4D
  val BackedDoubleVector4 = vector.BVec4D
  type GenericShortMatrix4x4 = matrix.GMat4S
  val GenericShortMatrix4x4 = matrix.GMat4S
  type GenericIntMatrix4x4 = matrix.GMat4I
  val GenericIntMatrix4x4 = matrix.GMat4I
  type GenericLongMatrix4x4 = matrix.GMat4L
  val GenericLongMatrix4x4 = matrix.GMat4L
  type GenericFloatMatrix4x4 = matrix.GMat4F
  val GenericFloatMatrix4x4 = matrix.GMat4F
  type GenericDoubleMatrix4x4 = matrix.GMat4D
  val GenericDoubleMatrix4x4 = matrix.GMat4D
  type ImmutableShortMatrix4x4 = matrix.IMat4S
  val ImmutableShortMatrix4x4 = matrix.IMat4S
  type ImmutableIntMatrix4x4 = matrix.IMat4I
  val ImmutableIntMatrix4x4 = matrix.IMat4I
  type ImmutableLongMatrix4x4 = matrix.IMat4L
  val ImmutableLongMatrix4x4 = matrix.IMat4L
  type ImmutableFloatMatrix4x4 = matrix.IMat4F
  val ImmutableFloatMatrix4x4 = matrix.IMat4F
  type ImmutableDoubleMatrix4x4 = matrix.IMat4D
  val ImmutableDoubleMatrix4x4 = matrix.IMat4D
  type AssignableShortMatrix4x4 = matrix.AMat4S
  val AssignableShortMatrix4x4 = matrix.AMat4S
  type AssignableIntMatrix4x4 = matrix.AMat4I
  val AssignableIntMatrix4x4 = matrix.AMat4I
  type AssignableLongMatrix4x4 = matrix.AMat4L
  val AssignableLongMatrix4x4 = matrix.AMat4L
  type AssignableFloatMatrix4x4 = matrix.AMat4F
  val AssignableFloatMatrix4x4 = matrix.AMat4F
  type AssignableDoubleMatrix4x4 = matrix.AMat4D
  val AssignableDoubleMatrix4x4 = matrix.AMat4D
  type MutableShortMatrix4x4 = matrix.MMat4S
  val MutableShortMatrix4x4 = matrix.MMat4S
  type MutableIntMatrix4x4 = matrix.MMat4I
  val MutableIntMatrix4x4 = matrix.MMat4I
  type MutableLongMatrix4x4 = matrix.MMat4L
  val MutableLongMatrix4x4 = matrix.MMat4L
  type MutableFloatMatrix4x4 = matrix.MMat4F
  val MutableFloatMatrix4x4 = matrix.MMat4F
  type MutableDoubleMatrix4x4 = matrix.MMat4D
  val MutableDoubleMatrix4x4 = matrix.MMat4D
  type BackedShortMatrix4x4 = matrix.BMat4S
  val BackedShortMatrix4x4 = matrix.BMat4S
  type BackedIntMatrix4x4 = matrix.BMat4I
  val BackedIntMatrix4x4 = matrix.BMat4I
  type BackedLongMatrix4x4 = matrix.BMat4L
  val BackedLongMatrix4x4 = matrix.BMat4L
  type BackedFloatMatrix4x4 = matrix.BMat4F
  val BackedFloatMatrix4x4 = matrix.BMat4F
  type BackedDoubleMatrix4x4 = matrix.BMat4D
  val BackedDoubleMatrix4x4 = matrix.BMat4D
  object generic {
    type ShortScalar = scalar.ScalarS
    type IntScalar = scalar.ScalarI
    type LongScalar = scalar.ScalarL
    type FloatScalar = scalar.ScalarF
    type DoubleScalar = scalar.ScalarD
    type ShortVector2 = vector.GVec2S
    val ShortVector2 = vector.GVec2S
    type IntVector2 = vector.GVec2I
    val IntVector2 = vector.GVec2I
    type LongVector2 = vector.GVec2L
    val LongVector2 = vector.GVec2L
    type FloatVector2 = vector.GVec2F
    val FloatVector2 = vector.GVec2F
    type DoubleVector2 = vector.GVec2D
    val DoubleVector2 = vector.GVec2D
    type ShortMatrix2x2 = matrix.GMat2S
    val ShortMatrix2x2 = matrix.GMat2S
    type IntMatrix2x2 = matrix.GMat2I
    val IntMatrix2x2 = matrix.GMat2I
    type LongMatrix2x2 = matrix.GMat2L
    val LongMatrix2x2 = matrix.GMat2L
    type FloatMatrix2x2 = matrix.GMat2F
    val FloatMatrix2x2 = matrix.GMat2F
    type DoubleMatrix2x2 = matrix.GMat2D
    val DoubleMatrix2x2 = matrix.GMat2D
    type ShortVector3 = vector.GVec3S
    val ShortVector3 = vector.GVec3S
    type IntVector3 = vector.GVec3I
    val IntVector3 = vector.GVec3I
    type LongVector3 = vector.GVec3L
    val LongVector3 = vector.GVec3L
    type FloatVector3 = vector.GVec3F
    val FloatVector3 = vector.GVec3F
    type DoubleVector3 = vector.GVec3D
    val DoubleVector3 = vector.GVec3D
    type ShortMatrix3x3 = matrix.GMat3S
    val ShortMatrix3x3 = matrix.GMat3S
    type IntMatrix3x3 = matrix.GMat3I
    val IntMatrix3x3 = matrix.GMat3I
    type LongMatrix3x3 = matrix.GMat3L
    val LongMatrix3x3 = matrix.GMat3L
    type FloatMatrix3x3 = matrix.GMat3F
    val FloatMatrix3x3 = matrix.GMat3F
    type DoubleMatrix3x3 = matrix.GMat3D
    val DoubleMatrix3x3 = matrix.GMat3D
    type ShortVector4 = vector.GVec4S
    val ShortVector4 = vector.GVec4S
    type IntVector4 = vector.GVec4I
    val IntVector4 = vector.GVec4I
    type LongVector4 = vector.GVec4L
    val LongVector4 = vector.GVec4L
    type FloatVector4 = vector.GVec4F
    val FloatVector4 = vector.GVec4F
    type DoubleVector4 = vector.GVec4D
    val DoubleVector4 = vector.GVec4D
    type ShortMatrix4x4 = matrix.GMat4S
    val ShortMatrix4x4 = matrix.GMat4S
    type IntMatrix4x4 = matrix.GMat4I
    val IntMatrix4x4 = matrix.GMat4I
    type LongMatrix4x4 = matrix.GMat4L
    val LongMatrix4x4 = matrix.GMat4L
    type FloatMatrix4x4 = matrix.GMat4F
    val FloatMatrix4x4 = matrix.GMat4F
    type DoubleMatrix4x4 = matrix.GMat4D
    val DoubleMatrix4x4 = matrix.GMat4D

    object shorttype {
      type Scalar = scalar.ScalarS
      type Vector2 = vector.GVec2S
      val Vector2 = vector.GVec2S
      type Matrix2x2 = matrix.GMat2S
      val Matrix2x2 = matrix.GMat2S
      type Vector3 = vector.GVec3S
      val Vector3 = vector.GVec3S
      type Matrix3x3 = matrix.GMat3S
      val Matrix3x3 = matrix.GMat3S
      type Vector4 = vector.GVec4S
      val Vector4 = vector.GVec4S
      type Matrix4x4 = matrix.GMat4S
      val Matrix4x4 = matrix.GMat4S
    }

    object inttype {
      type Scalar = scalar.ScalarI
      type Vector2 = vector.GVec2I
      val Vector2 = vector.GVec2I
      type Matrix2x2 = matrix.GMat2I
      val Matrix2x2 = matrix.GMat2I
      type Vector3 = vector.GVec3I
      val Vector3 = vector.GVec3I
      type Matrix3x3 = matrix.GMat3I
      val Matrix3x3 = matrix.GMat3I
      type Vector4 = vector.GVec4I
      val Vector4 = vector.GVec4I
      type Matrix4x4 = matrix.GMat4I
      val Matrix4x4 = matrix.GMat4I
    }

    object longtype {
      type Scalar = scalar.ScalarL
      type Vector2 = vector.GVec2L
      val Vector2 = vector.GVec2L
      type Matrix2x2 = matrix.GMat2L
      val Matrix2x2 = matrix.GMat2L
      type Vector3 = vector.GVec3L
      val Vector3 = vector.GVec3L
      type Matrix3x3 = matrix.GMat3L
      val Matrix3x3 = matrix.GMat3L
      type Vector4 = vector.GVec4L
      val Vector4 = vector.GVec4L
      type Matrix4x4 = matrix.GMat4L
      val Matrix4x4 = matrix.GMat4L
    }

    object floattype {
      type Scalar = scalar.ScalarF
      type Vector2 = vector.GVec2F
      val Vector2 = vector.GVec2F
      type Matrix2x2 = matrix.GMat2F
      val Matrix2x2 = matrix.GMat2F
      type Vector3 = vector.GVec3F
      val Vector3 = vector.GVec3F
      type Matrix3x3 = matrix.GMat3F
      val Matrix3x3 = matrix.GMat3F
      type Vector4 = vector.GVec4F
      val Vector4 = vector.GVec4F
      type Matrix4x4 = matrix.GMat4F
      val Matrix4x4 = matrix.GMat4F
    }

    object doubletype {
      type Scalar = scalar.ScalarD
      type Vector2 = vector.GVec2D
      val Vector2 = vector.GVec2D
      type Matrix2x2 = matrix.GMat2D
      val Matrix2x2 = matrix.GMat2D
      type Vector3 = vector.GVec3D
      val Vector3 = vector.GVec3D
      type Matrix3x3 = matrix.GMat3D
      val Matrix3x3 = matrix.GMat3D
      type Vector4 = vector.GVec4D
      val Vector4 = vector.GVec4D
      type Matrix4x4 = matrix.GMat4D
      val Matrix4x4 = matrix.GMat4D
    }
  }

  object immutable {
    type ShortScalar = scalar.ScalarS
    type IntScalar = scalar.ScalarI
    type LongScalar = scalar.ScalarL
    type FloatScalar = scalar.ScalarF
    type DoubleScalar = scalar.ScalarD
    type ShortVector2 = vector.IVec2S
    val ShortVector2 = vector.IVec2S
    type IntVector2 = vector.IVec2I
    val IntVector2 = vector.IVec2I
    type LongVector2 = vector.IVec2L
    val LongVector2 = vector.IVec2L
    type FloatVector2 = vector.IVec2F
    val FloatVector2 = vector.IVec2F
    type DoubleVector2 = vector.IVec2D
    val DoubleVector2 = vector.IVec2D
    type ShortMatrix2x2 = matrix.IMat2S
    val ShortMatrix2x2 = matrix.IMat2S
    type IntMatrix2x2 = matrix.IMat2I
    val IntMatrix2x2 = matrix.IMat2I
    type LongMatrix2x2 = matrix.IMat2L
    val LongMatrix2x2 = matrix.IMat2L
    type FloatMatrix2x2 = matrix.IMat2F
    val FloatMatrix2x2 = matrix.IMat2F
    type DoubleMatrix2x2 = matrix.IMat2D
    val DoubleMatrix2x2 = matrix.IMat2D
    type ShortVector3 = vector.IVec3S
    val ShortVector3 = vector.IVec3S
    type IntVector3 = vector.IVec3I
    val IntVector3 = vector.IVec3I
    type LongVector3 = vector.IVec3L
    val LongVector3 = vector.IVec3L
    type FloatVector3 = vector.IVec3F
    val FloatVector3 = vector.IVec3F
    type DoubleVector3 = vector.IVec3D
    val DoubleVector3 = vector.IVec3D
    type ShortMatrix3x3 = matrix.IMat3S
    val ShortMatrix3x3 = matrix.IMat3S
    type IntMatrix3x3 = matrix.IMat3I
    val IntMatrix3x3 = matrix.IMat3I
    type LongMatrix3x3 = matrix.IMat3L
    val LongMatrix3x3 = matrix.IMat3L
    type FloatMatrix3x3 = matrix.IMat3F
    val FloatMatrix3x3 = matrix.IMat3F
    type DoubleMatrix3x3 = matrix.IMat3D
    val DoubleMatrix3x3 = matrix.IMat3D
    type ShortVector4 = vector.IVec4S
    val ShortVector4 = vector.IVec4S
    type IntVector4 = vector.IVec4I
    val IntVector4 = vector.IVec4I
    type LongVector4 = vector.IVec4L
    val LongVector4 = vector.IVec4L
    type FloatVector4 = vector.IVec4F
    val FloatVector4 = vector.IVec4F
    type DoubleVector4 = vector.IVec4D
    val DoubleVector4 = vector.IVec4D
    type ShortMatrix4x4 = matrix.IMat4S
    val ShortMatrix4x4 = matrix.IMat4S
    type IntMatrix4x4 = matrix.IMat4I
    val IntMatrix4x4 = matrix.IMat4I
    type LongMatrix4x4 = matrix.IMat4L
    val LongMatrix4x4 = matrix.IMat4L
    type FloatMatrix4x4 = matrix.IMat4F
    val FloatMatrix4x4 = matrix.IMat4F
    type DoubleMatrix4x4 = matrix.IMat4D
    val DoubleMatrix4x4 = matrix.IMat4D

    object shorttype {
      type Scalar = scalar.ScalarS
      type Vector2 = vector.IVec2S
      val Vector2 = vector.IVec2S
      type Matrix2x2 = matrix.IMat2S
      val Matrix2x2 = matrix.IMat2S
      type Vector3 = vector.IVec3S
      val Vector3 = vector.IVec3S
      type Matrix3x3 = matrix.IMat3S
      val Matrix3x3 = matrix.IMat3S
      type Vector4 = vector.IVec4S
      val Vector4 = vector.IVec4S
      type Matrix4x4 = matrix.IMat4S
      val Matrix4x4 = matrix.IMat4S
    }

    object inttype {
      type Scalar = scalar.ScalarI
      type Vector2 = vector.IVec2I
      val Vector2 = vector.IVec2I
      type Matrix2x2 = matrix.IMat2I
      val Matrix2x2 = matrix.IMat2I
      type Vector3 = vector.IVec3I
      val Vector3 = vector.IVec3I
      type Matrix3x3 = matrix.IMat3I
      val Matrix3x3 = matrix.IMat3I
      type Vector4 = vector.IVec4I
      val Vector4 = vector.IVec4I
      type Matrix4x4 = matrix.IMat4I
      val Matrix4x4 = matrix.IMat4I
    }

    object longtype {
      type Scalar = scalar.ScalarL
      type Vector2 = vector.IVec2L
      val Vector2 = vector.IVec2L
      type Matrix2x2 = matrix.IMat2L
      val Matrix2x2 = matrix.IMat2L
      type Vector3 = vector.IVec3L
      val Vector3 = vector.IVec3L
      type Matrix3x3 = matrix.IMat3L
      val Matrix3x3 = matrix.IMat3L
      type Vector4 = vector.IVec4L
      val Vector4 = vector.IVec4L
      type Matrix4x4 = matrix.IMat4L
      val Matrix4x4 = matrix.IMat4L
    }

    object floattype {
      type Scalar = scalar.ScalarF
      type Vector2 = vector.IVec2F
      val Vector2 = vector.IVec2F
      type Matrix2x2 = matrix.IMat2F
      val Matrix2x2 = matrix.IMat2F
      type Vector3 = vector.IVec3F
      val Vector3 = vector.IVec3F
      type Matrix3x3 = matrix.IMat3F
      val Matrix3x3 = matrix.IMat3F
      type Vector4 = vector.IVec4F
      val Vector4 = vector.IVec4F
      type Matrix4x4 = matrix.IMat4F
      val Matrix4x4 = matrix.IMat4F
    }

    object doubletype {
      type Scalar = scalar.ScalarD
      type Vector2 = vector.IVec2D
      val Vector2 = vector.IVec2D
      type Matrix2x2 = matrix.IMat2D
      val Matrix2x2 = matrix.IMat2D
      type Vector3 = vector.IVec3D
      val Vector3 = vector.IVec3D
      type Matrix3x3 = matrix.IMat3D
      val Matrix3x3 = matrix.IMat3D
      type Vector4 = vector.IVec4D
      val Vector4 = vector.IVec4D
      type Matrix4x4 = matrix.IMat4D
      val Matrix4x4 = matrix.IMat4D
    }
  }

  object assignable {
    type ShortScalar = scalar.ScalarS
    type IntScalar = scalar.ScalarI
    type LongScalar = scalar.ScalarL
    type FloatScalar = scalar.ScalarF
    type DoubleScalar = scalar.ScalarD
    type ShortVector2 = vector.AVec2S
    val ShortVector2 = vector.AVec2S
    type IntVector2 = vector.AVec2I
    val IntVector2 = vector.AVec2I
    type LongVector2 = vector.AVec2L
    val LongVector2 = vector.AVec2L
    type FloatVector2 = vector.AVec2F
    val FloatVector2 = vector.AVec2F
    type DoubleVector2 = vector.AVec2D
    val DoubleVector2 = vector.AVec2D
    type ShortMatrix2x2 = matrix.AMat2S
    val ShortMatrix2x2 = matrix.AMat2S
    type IntMatrix2x2 = matrix.AMat2I
    val IntMatrix2x2 = matrix.AMat2I
    type LongMatrix2x2 = matrix.AMat2L
    val LongMatrix2x2 = matrix.AMat2L
    type FloatMatrix2x2 = matrix.AMat2F
    val FloatMatrix2x2 = matrix.AMat2F
    type DoubleMatrix2x2 = matrix.AMat2D
    val DoubleMatrix2x2 = matrix.AMat2D
    type ShortVector3 = vector.AVec3S
    val ShortVector3 = vector.AVec3S
    type IntVector3 = vector.AVec3I
    val IntVector3 = vector.AVec3I
    type LongVector3 = vector.AVec3L
    val LongVector3 = vector.AVec3L
    type FloatVector3 = vector.AVec3F
    val FloatVector3 = vector.AVec3F
    type DoubleVector3 = vector.AVec3D
    val DoubleVector3 = vector.AVec3D
    type ShortMatrix3x3 = matrix.AMat3S
    val ShortMatrix3x3 = matrix.AMat3S
    type IntMatrix3x3 = matrix.AMat3I
    val IntMatrix3x3 = matrix.AMat3I
    type LongMatrix3x3 = matrix.AMat3L
    val LongMatrix3x3 = matrix.AMat3L
    type FloatMatrix3x3 = matrix.AMat3F
    val FloatMatrix3x3 = matrix.AMat3F
    type DoubleMatrix3x3 = matrix.AMat3D
    val DoubleMatrix3x3 = matrix.AMat3D
    type ShortVector4 = vector.AVec4S
    val ShortVector4 = vector.AVec4S
    type IntVector4 = vector.AVec4I
    val IntVector4 = vector.AVec4I
    type LongVector4 = vector.AVec4L
    val LongVector4 = vector.AVec4L
    type FloatVector4 = vector.AVec4F
    val FloatVector4 = vector.AVec4F
    type DoubleVector4 = vector.AVec4D
    val DoubleVector4 = vector.AVec4D
    type ShortMatrix4x4 = matrix.AMat4S
    val ShortMatrix4x4 = matrix.AMat4S
    type IntMatrix4x4 = matrix.AMat4I
    val IntMatrix4x4 = matrix.AMat4I
    type LongMatrix4x4 = matrix.AMat4L
    val LongMatrix4x4 = matrix.AMat4L
    type FloatMatrix4x4 = matrix.AMat4F
    val FloatMatrix4x4 = matrix.AMat4F
    type DoubleMatrix4x4 = matrix.AMat4D
    val DoubleMatrix4x4 = matrix.AMat4D

    object shorttype {
      type Scalar = scalar.ScalarS
      type Vector2 = vector.AVec2S
      val Vector2 = vector.AVec2S
      type Matrix2x2 = matrix.AMat2S
      val Matrix2x2 = matrix.AMat2S
      type Vector3 = vector.AVec3S
      val Vector3 = vector.AVec3S
      type Matrix3x3 = matrix.AMat3S
      val Matrix3x3 = matrix.AMat3S
      type Vector4 = vector.AVec4S
      val Vector4 = vector.AVec4S
      type Matrix4x4 = matrix.AMat4S
      val Matrix4x4 = matrix.AMat4S
    }

    object inttype {
      type Scalar = scalar.ScalarI
      type Vector2 = vector.AVec2I
      val Vector2 = vector.AVec2I
      type Matrix2x2 = matrix.AMat2I
      val Matrix2x2 = matrix.AMat2I
      type Vector3 = vector.AVec3I
      val Vector3 = vector.AVec3I
      type Matrix3x3 = matrix.AMat3I
      val Matrix3x3 = matrix.AMat3I
      type Vector4 = vector.AVec4I
      val Vector4 = vector.AVec4I
      type Matrix4x4 = matrix.AMat4I
      val Matrix4x4 = matrix.AMat4I
    }

    object longtype {
      type Scalar = scalar.ScalarL
      type Vector2 = vector.AVec2L
      val Vector2 = vector.AVec2L
      type Matrix2x2 = matrix.AMat2L
      val Matrix2x2 = matrix.AMat2L
      type Vector3 = vector.AVec3L
      val Vector3 = vector.AVec3L
      type Matrix3x3 = matrix.AMat3L
      val Matrix3x3 = matrix.AMat3L
      type Vector4 = vector.AVec4L
      val Vector4 = vector.AVec4L
      type Matrix4x4 = matrix.AMat4L
      val Matrix4x4 = matrix.AMat4L
    }

    object floattype {
      type Scalar = scalar.ScalarF
      type Vector2 = vector.AVec2F
      val Vector2 = vector.AVec2F
      type Matrix2x2 = matrix.AMat2F
      val Matrix2x2 = matrix.AMat2F
      type Vector3 = vector.AVec3F
      val Vector3 = vector.AVec3F
      type Matrix3x3 = matrix.AMat3F
      val Matrix3x3 = matrix.AMat3F
      type Vector4 = vector.AVec4F
      val Vector4 = vector.AVec4F
      type Matrix4x4 = matrix.AMat4F
      val Matrix4x4 = matrix.AMat4F
    }

    object doubletype {
      type Scalar = scalar.ScalarD
      type Vector2 = vector.AVec2D
      val Vector2 = vector.AVec2D
      type Matrix2x2 = matrix.AMat2D
      val Matrix2x2 = matrix.AMat2D
      type Vector3 = vector.AVec3D
      val Vector3 = vector.AVec3D
      type Matrix3x3 = matrix.AMat3D
      val Matrix3x3 = matrix.AMat3D
      type Vector4 = vector.AVec4D
      val Vector4 = vector.AVec4D
      type Matrix4x4 = matrix.AMat4D
      val Matrix4x4 = matrix.AMat4D
    }
  }

  object mutable {
    type ShortScalar = scalar.ScalarS
    type IntScalar = scalar.ScalarI
    type LongScalar = scalar.ScalarL
    type FloatScalar = scalar.ScalarF
    type DoubleScalar = scalar.ScalarD
    type ShortVector2 = vector.MVec2S
    val ShortVector2 = vector.MVec2S
    type IntVector2 = vector.MVec2I
    val IntVector2 = vector.MVec2I
    type LongVector2 = vector.MVec2L
    val LongVector2 = vector.MVec2L
    type FloatVector2 = vector.MVec2F
    val FloatVector2 = vector.MVec2F
    type DoubleVector2 = vector.MVec2D
    val DoubleVector2 = vector.MVec2D
    type ShortMatrix2x2 = matrix.MMat2S
    val ShortMatrix2x2 = matrix.MMat2S
    type IntMatrix2x2 = matrix.MMat2I
    val IntMatrix2x2 = matrix.MMat2I
    type LongMatrix2x2 = matrix.MMat2L
    val LongMatrix2x2 = matrix.MMat2L
    type FloatMatrix2x2 = matrix.MMat2F
    val FloatMatrix2x2 = matrix.MMat2F
    type DoubleMatrix2x2 = matrix.MMat2D
    val DoubleMatrix2x2 = matrix.MMat2D
    type ShortVector3 = vector.MVec3S
    val ShortVector3 = vector.MVec3S
    type IntVector3 = vector.MVec3I
    val IntVector3 = vector.MVec3I
    type LongVector3 = vector.MVec3L
    val LongVector3 = vector.MVec3L
    type FloatVector3 = vector.MVec3F
    val FloatVector3 = vector.MVec3F
    type DoubleVector3 = vector.MVec3D
    val DoubleVector3 = vector.MVec3D
    type ShortMatrix3x3 = matrix.MMat3S
    val ShortMatrix3x3 = matrix.MMat3S
    type IntMatrix3x3 = matrix.MMat3I
    val IntMatrix3x3 = matrix.MMat3I
    type LongMatrix3x3 = matrix.MMat3L
    val LongMatrix3x3 = matrix.MMat3L
    type FloatMatrix3x3 = matrix.MMat3F
    val FloatMatrix3x3 = matrix.MMat3F
    type DoubleMatrix3x3 = matrix.MMat3D
    val DoubleMatrix3x3 = matrix.MMat3D
    type ShortVector4 = vector.MVec4S
    val ShortVector4 = vector.MVec4S
    type IntVector4 = vector.MVec4I
    val IntVector4 = vector.MVec4I
    type LongVector4 = vector.MVec4L
    val LongVector4 = vector.MVec4L
    type FloatVector4 = vector.MVec4F
    val FloatVector4 = vector.MVec4F
    type DoubleVector4 = vector.MVec4D
    val DoubleVector4 = vector.MVec4D
    type ShortMatrix4x4 = matrix.MMat4S
    val ShortMatrix4x4 = matrix.MMat4S
    type IntMatrix4x4 = matrix.MMat4I
    val IntMatrix4x4 = matrix.MMat4I
    type LongMatrix4x4 = matrix.MMat4L
    val LongMatrix4x4 = matrix.MMat4L
    type FloatMatrix4x4 = matrix.MMat4F
    val FloatMatrix4x4 = matrix.MMat4F
    type DoubleMatrix4x4 = matrix.MMat4D
    val DoubleMatrix4x4 = matrix.MMat4D

    object shorttype {
      type Scalar = scalar.ScalarS
      type Vector2 = vector.MVec2S
      val Vector2 = vector.MVec2S
      type Matrix2x2 = matrix.MMat2S
      val Matrix2x2 = matrix.MMat2S
      type Vector3 = vector.MVec3S
      val Vector3 = vector.MVec3S
      type Matrix3x3 = matrix.MMat3S
      val Matrix3x3 = matrix.MMat3S
      type Vector4 = vector.MVec4S
      val Vector4 = vector.MVec4S
      type Matrix4x4 = matrix.MMat4S
      val Matrix4x4 = matrix.MMat4S
    }

    object inttype {
      type Scalar = scalar.ScalarI
      type Vector2 = vector.MVec2I
      val Vector2 = vector.MVec2I
      type Matrix2x2 = matrix.MMat2I
      val Matrix2x2 = matrix.MMat2I
      type Vector3 = vector.MVec3I
      val Vector3 = vector.MVec3I
      type Matrix3x3 = matrix.MMat3I
      val Matrix3x3 = matrix.MMat3I
      type Vector4 = vector.MVec4I
      val Vector4 = vector.MVec4I
      type Matrix4x4 = matrix.MMat4I
      val Matrix4x4 = matrix.MMat4I
    }

    object longtype {
      type Scalar = scalar.ScalarL
      type Vector2 = vector.MVec2L
      val Vector2 = vector.MVec2L
      type Matrix2x2 = matrix.MMat2L
      val Matrix2x2 = matrix.MMat2L
      type Vector3 = vector.MVec3L
      val Vector3 = vector.MVec3L
      type Matrix3x3 = matrix.MMat3L
      val Matrix3x3 = matrix.MMat3L
      type Vector4 = vector.MVec4L
      val Vector4 = vector.MVec4L
      type Matrix4x4 = matrix.MMat4L
      val Matrix4x4 = matrix.MMat4L
    }

    object floattype {
      type Scalar = scalar.ScalarF
      type Vector2 = vector.MVec2F
      val Vector2 = vector.MVec2F
      type Matrix2x2 = matrix.MMat2F
      val Matrix2x2 = matrix.MMat2F
      type Vector3 = vector.MVec3F
      val Vector3 = vector.MVec3F
      type Matrix3x3 = matrix.MMat3F
      val Matrix3x3 = matrix.MMat3F
      type Vector4 = vector.MVec4F
      val Vector4 = vector.MVec4F
      type Matrix4x4 = matrix.MMat4F
      val Matrix4x4 = matrix.MMat4F
    }

    object doubletype {
      type Scalar = scalar.ScalarD
      type Vector2 = vector.MVec2D
      val Vector2 = vector.MVec2D
      type Matrix2x2 = matrix.MMat2D
      val Matrix2x2 = matrix.MMat2D
      type Vector3 = vector.MVec3D
      val Vector3 = vector.MVec3D
      type Matrix3x3 = matrix.MMat3D
      val Matrix3x3 = matrix.MMat3D
      type Vector4 = vector.MVec4D
      val Vector4 = vector.MVec4D
      type Matrix4x4 = matrix.MMat4D
      val Matrix4x4 = matrix.MMat4D
    }
  }

  object backed {
    type ShortScalar = scalar.ScalarS
    type IntScalar = scalar.ScalarI
    type LongScalar = scalar.ScalarL
    type FloatScalar = scalar.ScalarF
    type DoubleScalar = scalar.ScalarD
    type ShortVector2 = vector.BVec2S
    val ShortVector2 = vector.BVec2S
    type IntVector2 = vector.BVec2I
    val IntVector2 = vector.BVec2I
    type LongVector2 = vector.BVec2L
    val LongVector2 = vector.BVec2L
    type FloatVector2 = vector.BVec2F
    val FloatVector2 = vector.BVec2F
    type DoubleVector2 = vector.BVec2D
    val DoubleVector2 = vector.BVec2D
    type ShortMatrix2x2 = matrix.BMat2S
    val ShortMatrix2x2 = matrix.BMat2S
    type IntMatrix2x2 = matrix.BMat2I
    val IntMatrix2x2 = matrix.BMat2I
    type LongMatrix2x2 = matrix.BMat2L
    val LongMatrix2x2 = matrix.BMat2L
    type FloatMatrix2x2 = matrix.BMat2F
    val FloatMatrix2x2 = matrix.BMat2F
    type DoubleMatrix2x2 = matrix.BMat2D
    val DoubleMatrix2x2 = matrix.BMat2D
    type ShortVector3 = vector.BVec3S
    val ShortVector3 = vector.BVec3S
    type IntVector3 = vector.BVec3I
    val IntVector3 = vector.BVec3I
    type LongVector3 = vector.BVec3L
    val LongVector3 = vector.BVec3L
    type FloatVector3 = vector.BVec3F
    val FloatVector3 = vector.BVec3F
    type DoubleVector3 = vector.BVec3D
    val DoubleVector3 = vector.BVec3D
    type ShortMatrix3x3 = matrix.BMat3S
    val ShortMatrix3x3 = matrix.BMat3S
    type IntMatrix3x3 = matrix.BMat3I
    val IntMatrix3x3 = matrix.BMat3I
    type LongMatrix3x3 = matrix.BMat3L
    val LongMatrix3x3 = matrix.BMat3L
    type FloatMatrix3x3 = matrix.BMat3F
    val FloatMatrix3x3 = matrix.BMat3F
    type DoubleMatrix3x3 = matrix.BMat3D
    val DoubleMatrix3x3 = matrix.BMat3D
    type ShortVector4 = vector.BVec4S
    val ShortVector4 = vector.BVec4S
    type IntVector4 = vector.BVec4I
    val IntVector4 = vector.BVec4I
    type LongVector4 = vector.BVec4L
    val LongVector4 = vector.BVec4L
    type FloatVector4 = vector.BVec4F
    val FloatVector4 = vector.BVec4F
    type DoubleVector4 = vector.BVec4D
    val DoubleVector4 = vector.BVec4D
    type ShortMatrix4x4 = matrix.BMat4S
    val ShortMatrix4x4 = matrix.BMat4S
    type IntMatrix4x4 = matrix.BMat4I
    val IntMatrix4x4 = matrix.BMat4I
    type LongMatrix4x4 = matrix.BMat4L
    val LongMatrix4x4 = matrix.BMat4L
    type FloatMatrix4x4 = matrix.BMat4F
    val FloatMatrix4x4 = matrix.BMat4F
    type DoubleMatrix4x4 = matrix.BMat4D
    val DoubleMatrix4x4 = matrix.BMat4D

    object shorttype {
      type Scalar = scalar.ScalarS
      type Vector2 = vector.BVec2S
      val Vector2 = vector.BVec2S
      type Matrix2x2 = matrix.BMat2S
      val Matrix2x2 = matrix.BMat2S
      type Vector3 = vector.BVec3S
      val Vector3 = vector.BVec3S
      type Matrix3x3 = matrix.BMat3S
      val Matrix3x3 = matrix.BMat3S
      type Vector4 = vector.BVec4S
      val Vector4 = vector.BVec4S
      type Matrix4x4 = matrix.BMat4S
      val Matrix4x4 = matrix.BMat4S
    }

    object inttype {
      type Scalar = scalar.ScalarI
      type Vector2 = vector.BVec2I
      val Vector2 = vector.BVec2I
      type Matrix2x2 = matrix.BMat2I
      val Matrix2x2 = matrix.BMat2I
      type Vector3 = vector.BVec3I
      val Vector3 = vector.BVec3I
      type Matrix3x3 = matrix.BMat3I
      val Matrix3x3 = matrix.BMat3I
      type Vector4 = vector.BVec4I
      val Vector4 = vector.BVec4I
      type Matrix4x4 = matrix.BMat4I
      val Matrix4x4 = matrix.BMat4I
    }

    object longtype {
      type Scalar = scalar.ScalarL
      type Vector2 = vector.BVec2L
      val Vector2 = vector.BVec2L
      type Matrix2x2 = matrix.BMat2L
      val Matrix2x2 = matrix.BMat2L
      type Vector3 = vector.BVec3L
      val Vector3 = vector.BVec3L
      type Matrix3x3 = matrix.BMat3L
      val Matrix3x3 = matrix.BMat3L
      type Vector4 = vector.BVec4L
      val Vector4 = vector.BVec4L
      type Matrix4x4 = matrix.BMat4L
      val Matrix4x4 = matrix.BMat4L
    }

    object floattype {
      type Scalar = scalar.ScalarF
      type Vector2 = vector.BVec2F
      val Vector2 = vector.BVec2F
      type Matrix2x2 = matrix.BMat2F
      val Matrix2x2 = matrix.BMat2F
      type Vector3 = vector.BVec3F
      val Vector3 = vector.BVec3F
      type Matrix3x3 = matrix.BMat3F
      val Matrix3x3 = matrix.BMat3F
      type Vector4 = vector.BVec4F
      val Vector4 = vector.BVec4F
      type Matrix4x4 = matrix.BMat4F
      val Matrix4x4 = matrix.BMat4F
    }

    object doubletype {
      type Scalar = scalar.ScalarD
      type Vector2 = vector.BVec2D
      val Vector2 = vector.BVec2D
      type Matrix2x2 = matrix.BMat2D
      val Matrix2x2 = matrix.BMat2D
      type Vector3 = vector.BVec3D
      val Vector3 = vector.BVec3D
      type Matrix3x3 = matrix.BMat3D
      val Matrix3x3 = matrix.BMat3D
      type Vector4 = vector.BVec4D
      val Vector4 = vector.BVec4D
      type Matrix4x4 = matrix.BMat4D
      val Matrix4x4 = matrix.BMat4D
    }
  }

}
